Skip to content

Prevent model allowlist drift with automated sync between validation and catalog #6024

Description

@lpcox

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:

  1. Single source of truth — Define supported models in one canonical location and derive the validation list and any catalog/pricing references from it.
  2. 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.
  3. 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.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions