Custom LiteLLM model alias gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna fails; /model switch poisons session
What happened
I'm routing Codex to a self-hosted LiteLLM proxy (custom model_provider) fronting Amazon Bedrock / Bedrock Mantle. All three gpt-5.6-* aliases (gpt-5.6-sol, gpt-5.6-terra, gpt-5.6-luna) fail to route, while gpt-5.5 on the same provider works.
Setting model = "gpt-5.6-sol" (or -terra/-luna) in ~/.codex/config.toml fails; model = "gpt-5.5" works. This suggests Codex applies built-in, model-name-specific handling for the recognized gpt-5.6-* slugs instead of forwarding the model string opaquely to the custom provider.
There's also a session-state bug: switching to a gpt-5.6-* model mid-session via /model breaks the session, and switching back to gpt-5.5 afterwards also fails, even though gpt-5.5 worked before the switch.
Expected
- The
modelstring should be forwarded to the custom provider as-is; a name that happens to match a built-in slug should not change routing/request shaping whenmodel_provideris a custom provider. - A failed
/modelswitch should not corrupt session state; switching back to a previously-working model should restore working behavior.
Steps to reproduce
- Configure a custom provider in
~/.codex/config.toml:
```toml
model = "gpt-5.5"
model_provider = "litellm"
[model_providers.litellm]
name = "LiteLLM"
base_url = "https://<your-litellm>/v1"
env_key = "LITELLM_API_KEY"
```
- Expose the aliases on the LiteLLM side (
config.yaml). Both point at Bedrock Mantle OpenAI models; the only difference is the alias name:
```yaml
model_list:
- model_name: gpt-5.5
litellm_params:
model: bedrock_mantle/openai.gpt-5.5
aws_region_name: us-east-1
- model_name: gpt-5.6-sol
litellm_params:
model: bedrock_mantle/openai.gpt-5.6-sol
aws_region_name: us-east-1
```
- Run
codexwithmodel = "gpt-5.5"-> works. - Change to
model = "gpt-5.6-sol"(or/model->gpt-5.6-sol) -> fails. - Switch back to
gpt-5.5via/model-> now also fails (session stays broken).
Actual result / error
No error is surfaced and nothing is written to the logs. Instead, Codex hangs — it waits indefinitely with no response and eventually times out. The request appears to never complete (or never returns anything the TUI can render) for the gpt-5.6-* aliases, whereas gpt-5.5 responds normally. This looks less like a hard rejection and more like the request either isn't sent in a form the backend answers, or the response isn't parsed — leaving the session stuck.
Environment
- Codex version: 0.145.0
- OS: macOS 26.5.2
- Interface: TUI
- Provider: LiteLLM proxy -> Amazon Bedrock Mantle (OpenAI-compatible)
wire_api: not set (provider default)
Notes
Possibly related: #14276 (custom provider slug matching), #30697 (model slug handling).
1 Comment
Turns out it's about LiteLLM version. My situation was with LiteLLM v1.93.0, while v1.95.0 can work properly with GPT 5.6 models. Close this issue now.