Support for overriding Model metada

Resolved 💬 8 comments Opened Feb 20, 2026 by sarilsudha Closed May 10, 2026
💡 Likely answer: A maintainer (etraut-openai, contributor) responded on this thread — see the highlighted reply below.

What variant of Codex are you using?

CLI

What feature would you like to see?

Currently in codex cli , Model metadata for each gpt models are loaded from models.json which is part of the code base or refreshed from open ai servers.
We need a way to override the model metadata file using an env variable or command line options or configuration in config.toml file .

Additional information

_No response_

View original on GitHub ↗

8 Comments

etraut-openai contributor · 5 months ago

Can you describe your use case in more detail? Why would you want to override model metadata? This metadata accurately describes the capabilities and limitations of the model, so we don't recommend overriding it.

sarilsudha · 4 months ago

In our company, we provide GenAI LLM access to developers through an intermediary service. This service adds guardrails, and we also namespace each model with our company identifier (e.g., we refer to GPT‑5 as company123/gpt-5). Developers then use this same value as the model in Codex’s config.toml.

However, when Codex downloads model metadata from its servers, it looks up models by the model slug. In the Codex metadata, the slug is gpt-5, but in our internal developer configuration the slug is company123/gpt-5, so the values don’t match.

It would be helpful to have a way to override the slug used for metadata matching, or to support an additional field in config.toml profiles (e.g., a separate “metadata slug” or “base model” field) so the internal namespaced model can still map correctly to Codex’s canonical model metadata.
@etraut-openai

etraut-openai contributor · 4 months ago

Thanks for the additional context.

Our next release (0.105.0) will support a new config key called model_catalog_json that supplies an optional path to a JSON model catalog loaded at startup. Please take a look at that and let us know if it addresses your needs. I realize this isn't exactly what you're requesting, but it might be enough to unblock you.

sarilsudha · 4 months ago

This will help. Thanks @etraut-openai!

willparsons · 4 months ago

We'd still need to generate that file using the correct slug first, right?

Also, does the metadata change? I'm just thinking if the model catalog is now static it might get stale.

kjsanjay · 4 months ago

@etraut-openai Is there an option for codex CLI to get the model list from an endpoint in the intermediary service?

etraut-openai contributor · 4 months ago
Is there an option for codex CLI to get the model list from an endpoint in the intermediary service?

No, not currently.

etraut-openai contributor · 2 months ago

This feature request hasn't received enough upvotes, so I'm going to close it.