You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What terminal emulator and version are you using (if applicable)?
Ghostty 1.6.2 + tmux 3.5a
What issue are you seeing?
find_model_by_namespaced_suffix in codex-rs/core/src/models_manager/manager.rs rejects any namespace containing a hyphen (-). Model slugs like llm-gateway/gpt-5.4 cannot resolve to the bundled gpt-5.4 metadata, even though the suffix matches a known model.
if !namespace
.chars().all(|c| c.is_ascii_alphanumeric() || c == '_'){returnNone;}
Only allows [a-zA-Z0-9_] in the namespace. Hyphens are common in provider/proxy prefixes (e.g. llm-gateway/, my-proxy/).
Codex falls back to degraded metadata and emits:
⚠ Model metadata for llm-gateway/gpt-5.4 not found. Defaulting to fallback metadata; this can degrade performance and cause issues.
The only workaround is providing a full model_catalog_json that clones the entire bundled catalog (~230 KB) just to add one alias entry.
What steps can reproduce the bug?
Configure a custom model provider in config.toml:
model = "llm-gateway/gpt-5.4"model_provider = "litellm"
[model_providers.litellm]
name = "LiteLLM"base_url = "https://your-litellm-proxy/v1"env_key = "LITELLM_PROXY_KEY"wire_api = "responses"
Start Codex.
Observe the fallback metadata warning.
The namespace llm-gateway contains a hyphen which fails the is_ascii_alphanumeric() || c == '_' check in find_model_by_namespaced_suffix, so the suffix gpt-5.4 is never looked up in the bundled catalog.
What is the expected behavior?
llm-gateway/gpt-5.4 should resolve to the bundled gpt-5.4 model metadata via namespace stripping, the same way custom_provider/gpt-5.4 (underscore namespace) already works.
Suggested fix: allow - in the namespace character set:
.all(|c| c.is_ascii_alphanumeric() || c == '_' || c == '-')
The llm-gateway/ prefix is a common LiteLLM proxy convention and cannot be changed on the proxy side.
Current workaround: provide a full model_catalog_json that clones the entire bundled catalog (~230 KB, 12 models) just to add one alias entry — fragile and depends on models_cache.json (a runtime artifact).
What version of Codex CLI is running?
0.113.0
What subscription do you have?
Plus
Which model were you using?
llm-gateway/gpt-5.4 (via custom model_providers.litellm)
What platform is your computer?
Darwin 25.3.0 arm64 arm
What terminal emulator and version are you using (if applicable)?
Ghostty 1.6.2 + tmux 3.5a
What issue are you seeing?
find_model_by_namespaced_suffixincodex-rs/core/src/models_manager/manager.rsrejects any namespace containing a hyphen (-). Model slugs likellm-gateway/gpt-5.4cannot resolve to the bundledgpt-5.4metadata, even though the suffix matches a known model.The check at L195-L199:
Only allows
[a-zA-Z0-9_]in the namespace. Hyphens are common in provider/proxy prefixes (e.g.llm-gateway/,my-proxy/).Codex falls back to degraded metadata and emits:
The only workaround is providing a full
model_catalog_jsonthat clones the entire bundled catalog (~230 KB) just to add one alias entry.What steps can reproduce the bug?
config.toml:The namespace
llm-gatewaycontains a hyphen which fails theis_ascii_alphanumeric() || c == '_'check infind_model_by_namespaced_suffix, so the suffixgpt-5.4is never looked up in the bundled catalog.What is the expected behavior?
llm-gateway/gpt-5.4should resolve to the bundledgpt-5.4model metadata via namespace stripping, the same waycustom_provider/gpt-5.4(underscore namespace) already works.Suggested fix: allow
-in the namespace character set:Additional information
llm-gateway/prefix is a common LiteLLM proxy convention and cannot be changed on the proxy side.model_catalog_jsonthat clones the entire bundled catalog (~230 KB, 12 models) just to add one alias entry — fragile and depends onmodels_cache.json(a runtime artifact).