Problem
Model validation in src/copilot-model.ts (SUPPORTED_COPILOT_MODELS) can drift out of sync with the repo's model catalog/pricing data. When a new model is added to routing or pricing but not to the host-side validator, AWF rejects valid COPILOT_MODEL values with a misleading "retired or unsupported" error before container startup.
This happened recently with mai-code-1-flash (fixed in #5831) and is likely to recur as new models are onboarded.
Proposed Fix
Add an automated check that keeps the model lists in sync:
- Single source of truth — Define supported models in one canonical location and derive the validation list and any catalog/pricing references from it.
- CI guard — Add a test (or extend an existing one) that fails if any model appears in pricing/routing data but is missing from
SUPPORTED_COPILOT_MODELS, catching drift before it ships.
- Documentation — Add a comment in
src/copilot-model.ts pointing contributors to the single source of truth when adding new models.
This ensures new models like future MAI variants don't require separate fix-up PRs for each list they need to appear in.
Problem
Model validation in
src/copilot-model.ts(SUPPORTED_COPILOT_MODELS) can drift out of sync with the repo's model catalog/pricing data. When a new model is added to routing or pricing but not to the host-side validator, AWF rejects validCOPILOT_MODELvalues with a misleading "retired or unsupported" error before container startup.This happened recently with
mai-code-1-flash(fixed in #5831) and is likely to recur as new models are onboarded.Proposed Fix
Add an automated check that keeps the model lists in sync:
SUPPORTED_COPILOT_MODELS, catching drift before it ships.src/copilot-model.tspointing contributors to the single source of truth when adding new models.This ensures new models like future MAI variants don't require separate fix-up PRs for each list they need to appear in.