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_providerdiffers frommodel - 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
| Field | Purpose |
|---|---|
model_provider | Selects the active provider id |
[model_providers.<id>] | Defines one provider’s detailed configuration |
name | Display name for the provider |
base_url | Root API endpoint |
wire_api | Provider protocol, commonly responses |
model | Default main model ID |
review_model | Model used for code review flows such as /review |
Recommended pattern
Keep the provider id consistent: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
modelas the provider name. - Forgetting that
base_urland 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.
Related docs
- How to configure Codex CLI config.toml
- Codex LLMEasy setup guide
- What are Codex CLI sandbox and approval modes?
- OpenAI-compatible API vs Anthropic-compatible API

