Skip to content

Support for overriding Model metada #12380

Closed

Description

@sarilsudha

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

Activity

  1. added
    enhancement
    on Feb 20, 2026
  2. added
    CLI
    on Feb 20, 2026
  3. etraut-openai commented on Feb 20, 2026

    @etraut-openai
    Contributor

    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.

  4. added
    agent
    and removed
    CLI
    on Feb 20, 2026
  5. sarilsudha commented on Feb 24, 2026

    @sarilsudha
    Author

    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

  6. etraut-openai commented on Feb 24, 2026

    @etraut-openai
    Contributor

    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.

  7. sarilsudha commented on Feb 24, 2026

    @sarilsudha
    Author

    This will help. Thanks @etraut-openai!

  8. willparsons commented on Feb 25, 2026

    @willparsons

    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.

  9. kjsanjay commented on Feb 25, 2026

    @kjsanjay

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

  10. etraut-openai commented on Feb 25, 2026

    @etraut-openai
    Contributor

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

    No, not currently.

  11. etraut-openai commented on May 10, 2026

    @etraut-openai
    Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agentenhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions