Problem
We shipped a regression because model/provider switching logic assumed provider identity was stable across all layers. In practice these are different identifiers:
- config key, for example
model_provider = "azure"
- human-readable provider name, for example
name = "Azure OpenAI"
- upstream catalog/provider ID, for example
azure in models.dev
That led to two concrete failures:
- Azure model discovery broke when the configured provider name was
Azure OpenAI instead of matching the upstream azure catalog entry directly.
- Copilot model switching broke because config rebuild paths did not preserve the active profile during in-session provider switching.
Scope
Add process/test guardrails so this class of bug is harder to reintroduce.
Acceptance Criteria
- Document that provider identity must be treated as three separate concepts: config key, provider display name, and upstream catalog/provider ID.
- Require regression coverage for
ModelsManager, aliasing, models.dev, or provider /models changes using a non-canonical provider name and a non-canonical host.
- Explicit minimum regression case:
name = "Azure OpenAI" must still resolve to the azure catalog entry even when the base URL is a proxy/localhost URL.
- Require regression coverage that config rebuild, cwd/profile switching, and
/model switching preserve active_profile, model_provider_id, and model unless intentionally reset.
- Require provider-backed catalog tests to cover both picker population and post-selection execution, not just discovery.
- Require diagnosis guidance to inspect effective config and persisted auth before blaming missing environment variables.
Notes
This is process hardening informed by the Azure/Copilot regression fixed in issue #12.
Problem
We shipped a regression because model/provider switching logic assumed provider identity was stable across all layers. In practice these are different identifiers:
model_provider = "azure"name = "Azure OpenAI"azureinmodels.devThat led to two concrete failures:
Azure OpenAIinstead of matching the upstreamazurecatalog entry directly.Scope
Add process/test guardrails so this class of bug is harder to reintroduce.
Acceptance Criteria
ModelsManager, aliasing,models.dev, or provider/modelschanges using a non-canonical provider name and a non-canonical host.name = "Azure OpenAI"must still resolve to theazurecatalog entry even when the base URL is a proxy/localhost URL./modelswitching preserveactive_profile,model_provider_id, andmodelunless intentionally reset.Notes
This is process hardening informed by the Azure/Copilot regression fixed in issue #12.