Proposal: Support openai/ prefix for model slug resolution (e.g. openai/gpt-5.1) to improve compatibility with 3rd-party providers

Resolved 💬 1 comment Opened Dec 17, 2025 by WAcry Closed Dec 19, 2025

What feature would you like to see?

Currently, the Codex model resolution logic in
core/src/openai_models/model_family.rs relies on strict string matching for model slugs (e.g., gpt-5.2).

If a user specifies a model name with an
openai/ prefix—which is a common convention required by third-party routing providers like OpenRouter, Azure, or other API proxies—the system fails to recognize the underlying model family.

For example, using model = "openai/gpt-5.1" falls through to
derive_default_model_family. This triggers a fallback "Unknown model" state, resulting in significant (interestingly) performance degradation:

Concurrent tool calls are disabled (supports_parallel_tool_calls: false).
Shell capabilities are downgraded (from ShellCommand to basic Default array-based execution).
Tailored prompts are lost (uses generic BASE_INSTRUCTIONS instead of GPT_5_1_INSTRUCTIONS).
Reasoning effort & Context window defaults to None/unspecified.

Would the team be open to supporting it or accepting a small PR to accept this prefix just like "openai/gpt-oss" which we already support?
Another option is to allow naming the model alias through configuration. What do you think?

Additional information

_No response_

View original on GitHub ↗

This issue has 1 comment on GitHub. Read the full discussion on GitHub ↗