Skip to main content

Short answer

model_provider tells Codex CLI which provider to use. Its value must match a provider id defined under [model_providers.<id>]. base_url is the API endpoint where model requests are sent. For an OpenAI-compatible provider, it usually points to a /v1 style endpoint. wire_api tells Codex which protocol shape to use when talking to that provider. In the Codex configuration reference, responses is a supported provider protocol value.

When this matters

  • You are configuring a custom OpenAI-compatible provider
  • Codex says the provider cannot be found or model requests fail
  • You are not sure how model_provider differs from model
  • You are putting LLMEasy, OpenAI, or another provider in one config.toml
  • You need to separate Base URL, API Key, and Model ID

Field relationships

FieldPurpose
model_providerSelects the active provider id
[model_providers.<id>]Defines one provider’s detailed configuration
nameDisplay name for the provider
base_urlRoot API endpoint
wire_apiProvider protocol, commonly responses
modelDefault main model ID
review_modelModel used for code review flows such as /review
Keep the provider id consistent:
model_provider = "custom"
model = "gpt-5.5"

[model_providers.custom]
name = "LLMEasy"
base_url = "https://www.llmeasy.ru/v1"
wire_api = "responses"
requires_openai_auth = false
This means Codex uses the provider named custom, sends model requests to https://www.llmeasy.ru/v1, and communicates through the Responses API shape.

Common mistakes

  • Writing the display name instead of the provider id in model_provider.
  • Treating model as the provider name.
  • Forgetting that base_url and the provider protocol must match.
  • Putting an Anthropic-compatible Base URL into an OpenAI-compatible provider.
  • Using a UI display name instead of an API-recognized model ID.

About LLMEasy

LLMEasy can be defined as a custom provider such as [model_providers.custom]. Use https://www.llmeasy.ru/v1 as the base_url and copy the model ID from the GPT Key group. On the LLMEasy regional documentation, use the same custom provider id with the LLMEasy regional Base URL.

References