Feature request: model_aliases mapping for gateway model names to canonical Codex model metadata
What variant of Codex are you using?
CLI, IDE Extension
What feature would you like to see?
### Summary
Please add first-class support for model alias mapping in Codex config, so enterprise gateway model names can map to canonical Codex model IDs for metadata lookup.
### Problem
In enterprise environments, gateways often expose internal/public model names that reflect security tiers, environment boundaries, or compliance profiles (for example: gpt-5-3-codex-public). These names intentionally differ from canonical model IDs (for example: gpt-5.3-codex).
Today, this causes metadata lookup mismatches and warnings such as:
Model metadata for gpt-5-3-codex-public not found. Defaulting to fallback metadata; this can degrade performance and cause issues.
Workarounds exist (explicit metadata overrides in config.toml, or maintaining a custom model_catalog_json), but both add operational burden and drift risk for enterprise-managed installs.
### Requested feature
Add a config-level alias mapping mechanism, e.g.:
[model_aliases]
gpt-5-3-codex-public = "gpt-5.3-codex"
gpt-5-3-codex-il5 = "gpt-5.3-codex"
gpt-5-3-codex-il6 = "gpt-5.3-codex"
### Expected behavior
- If model matches an entry in model_aliases, Codex resolves metadata using the canonical mapped model ID.
- Alias resolution should work with custom providers (model_provider + [model_providers.<name>]).
- Keep precedence explicit and deterministic, ideally:
- explicit per-model overrides in config (model_context_window, model_max_output_tokens, etc.)
- then alias-resolved metadata
- then fallback metadata
- Alias support should work across profile scopes / managed config use cases.
- Logs should clearly indicate alias resolution (for troubleshooting/auditability).
### Why this helps
- Supports enterprise naming conventions without changing gateway public model names.
- Reduces repetitive config workarounds across user/project/managed configs.
- Avoids maintaining custom model catalogs just for naming translation.
- Improves consistency for large deployments with multiple security-tiered aliases.
### Related context
- Existing warning behavior discussion: https://github.com/openai/codex/issues/21070
- Related PR (warning behavior): https://github.com/openai/codex/pull/21090
Additional information
_No response_
This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗