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_
4 Comments
Potential duplicates detected. Please review them and close your issue if it is a duplicate.
Powered by Codex Action
There is a useful workaround that reverses where the aliasing happens: keep the canonical identity inside Codex, and translate only at the gateway boundary.
Codex: gpt-5.3-codex
↓
route: gpt-5.3-codex
↓
enterprise gateway: gpt-5-3-codex-public
Codex therefore does its metadata lookup against gpt-5.3-codex, while the enterprise gateway still receives its required public/security-tier alias.
swobuforge/swobu) separates the client-visible route name from the backend model name, so this mapping doesn't require a custom model_catalog_json.
Native model_aliases would still be cleaner, especially for centrally managed Codex installs. But for gateways that can sit behind a local routing boundary, the naming mismatch does not need to leak back into Codex.
<img width="569" height="289" alt="Image" src="https://github.com/user-attachments/assets/deb60da4-5982-4315-8ea5-5f14456ae6a8" />
I have the same underlying requirement, with a concrete case where separating the canonical model ID from the provider request ID would remove the need for a derived
model_catalog_json.My OpenAI-compatible gateway exposes these models:
They are the same models as their canonical Codex counterparts. Only the gateway-facing IDs are different. For example:
I want Codex to select
gpt-5.6-soland retain all of its built-in metadata, including supported reasoning efforts, context window, compaction limits, service tiers, instructions, and tool capabilities, while sendingopenai-coding/gpt-5.6-solin the Responses API request.My current workaround is to export selected bundled models and rewrite their slugs:
I then configure the namespaced model and generated catalog:
This works, but it makes me maintain a complete copy of model metadata just to translate request IDs. Whenever Codex adds a model or changes reasoning levels, context limits, service tiers, or other metadata, I need to regenerate the file. A stale catalog can silently miss new capabilities.
A provider-level outbound mapping would fit this case well. For example:
or explicit mappings:
Ideally, this mapping would be applied consistently to normal turns, reviews, auto-review, subagents, automations, and other model requests, while model discovery and the picker continue to use canonical Codex IDs and built-in metadata.
If this feature sounds useful to the maintainers, I would be happy to help implement it.
@etraut-openai, would you be willing to take a look at this use case and share whether provider-level outbound model mapping would be a reasonable direction for Codex?
The key requirement is to keep the canonical model ID inside Codex for model discovery, built-in metadata, reasoning levels, context limits, and capability checks, while translating the model ID only when constructing requests for a custom provider.
This would avoid maintaining a derived
model_catalog_jsonsolely to rename model IDs.If the maintainers consider this direction appropriate, I would be happy to help implement it. Thank you!