Skip to content

Allow overriding the base URL for OpenAI in config.toml #11698

Closed

Description

@theblixguy

What variant of Codex are you using?

CLI

What feature would you like to see?

If I have this in my config:

model_provider = "openai"

[model_providers.openai]
name = "OpenAI"
base_url = "http://localhost:8080/v1"
wire_api = "responses"

Codex doesn't seem to respect it. If I am understanding the code correctly, since it's a built-in provider, we don't take into account any overrides in the TOML.

It would be great if this was supported so I can permanently use codex through a proxy (this is needed for my use case).

(I know I can override it via env vars, but config would be better for my use case)

Additional information

No response

Activity

  1. etraut-openai commented on Feb 13, 2026

    @etraut-openai
    Contributor

    We don't currently allow overriding the built-in provider. You can define a different provider name.

    Alternatively, you can use the OPENAI_BASE_URL environment variable if the URL is the only parameter you want to override.

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

    CLIIssues related to the Codex CLIenhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions