Adds `provider_options.openai.reasoning_mode` (`pro`) to chat model configs so admins can turn on OpenAI's Pro reasoning mode for a model, alongside the other OpenAI request options on the model form such as `service_tier`. The field is offered for any model on an OpenAI provider; the field description says Pro is supported from the GPT-5.6 Sol generation and that requests fail when Pro is set on a model that does not support it. There is deliberately no supported-model list anywhere: a newly released model that supports Pro works with no code change, and OpenAI rejects the request when the model does not. Validation rejects only values other than `pro`, non-OpenAI providers, and configs that explicitly force plain sampling (`reasoning_model=false`) or Chat Completions (`use_responses_api=false`), including partial updates that move a configured model onto such a provider or transport. A configured mode implies the Responses API and reasoning-model treatment when `openai_config` leaves those unset (`chatprovider.effectiveOpenAIConfig`), so an alias the pinned SDK has never seen, such as `gpt-daybreak-blue-latest`, still gets `effort` and `summary` and drops `temperature`. The same effective config feeds the client options and the recorded transport, so the two cannot disagree. The pinned fantasy OpenAI provider options do not carry `reasoning.mode`, so the mode is applied as a client-scoped `openai-go` request option when the model client is built rather than per call. The SDK merges pre-serialization `WithJSONSet` overlays by top-level key, so the key is escaped (`reasoning\.mode`) to add `mode` to the existing `reasoning` object instead of replacing `effort` and `summary`. `TestResolveModelCallReasoningModeWire` pins the resulting request body for streaming and non-streaming calls and checks that the fixed computer-use model does not inherit the mode; AI Gateway forwarding of the `reasoning` object is covered in `aibridge`. Because the option is bound to the model client, every call made through a Pro model config carries it, including title generation and quick generation when those fall back to the chat's model; deployments that want cheaper auxiliary calls should point the title generation override at another model. Frontend: the field renders through the existing schema-driven provider options with no hand-written field logic. Two generic changes: `visible_for_providers` is now honored for provider fields the way it already was for general fields (render and payload), so the OpenAI-scoped select does not appear or serialize for Azure, which shares the OpenAI field group; and the add/update model save toasts now carry the server's error detail, so a rejected combination such as Pro with Use Responses API at Off tells the admin which field to change. Docs: `docs/ai-coder/agents/models.md` gains a Reasoning Mode row in the OpenAI provider-specific options table (from the documentation check comment https://github.com/coder/coder/pull/29584#issuecomment-5752457808), and its Azure note now says Azure OpenAI lacks that one option. Not changed: `coderd/x/chatd/ARCHITECTURE.md`. Its OpenAI transport selection table needs a `reasoning_mode` row (client-applied, neither transport) to match `TestProviderOptionsTransportParity`; left for the human author. <details> <summary>Delivery record</summary> - Local validation on every pushed head: targeted Go tests (chatopenai, chatprovider, chatd wire test, aibridge integration test, coderd DB tests for persistence, invalid input, and partial updates), red/green on the wire test (injection removed, and unescaped key), Vitest (`modelConfigFormLogic`, `ModelForm`), Storybook tests for `ModelFormProviderConfig`, biome, tsc, oxlint, golangci-lint on touched packages, pre-commit hook. - Codex round 1 on `e7dbaefeafc`: 3 findings (Storybook assertions, ARCHITECTURE.md TODO, `gpt-daybreak-blue-latest` alias). Disposition: assertions moved to Vitest and alias accepted in `8fccf111111`; ARCHITECTURE.md left untouched by author instruction. Threads replied to and resolved. - Codex round 2 on `8fccf111111`: 1 finding (fixture naming, FE9), renamed in `23449e92317`. Round 3 on `23449e92317`: 1 finding (fixture location, FE9), moved to `testHelpers/chatModels.ts` in `c3bd5aa370f`. Round 4 on `c3bd5aa370f`: "Didn't find any major issues" (https://github.com/coder/coder/pull/29584#issuecomment-5735119236). All threads resolved. - Remote UAT round 1 (chat https://dogfood.cdr.dev/agents/f5ed1d16-be1d-4d39-952b-126a6a829ef1) exercised `e7dbaefeafc`: endorsed PASS. Real `gpt-5.6-sol` turns showed `"mode": "pro"` / `"standard"` / no key in the Debug tab with effort and summary intact; 14 POST and 6 PATCH rejections captured; UI select visibility, persistence, reload, and clearing verified. Low, non-blocking notes: the `gpt-5.6` alias revert in the model identifier field is pre-existing; Pro is dropped silently when a model or transport change makes it unsupported; Pro applies to auxiliary calls (see above). - Remote UAT round 2 on `c3bd5aa370f` (same chat, alias and core re-verify): core PASS, alias FAIL. With `gpt-daybreak-blue-latest` the request carried `{"mode": "pro"}` without the configured effort and summary and kept sending `temperature` (provider 400 then retry on quick generation and title calls), because the SDK does not classify the alias as a reasoning model. Fixed in `d4c338de767`: a configured mode now implies a reasoning model unless `openai_config.reasoning_model` is set, and a mode on a config that forces plain sampling is rejected. Alias UI/API behavior, rejections, and known-model Pro/Default turns all passed on `c3bd5aa370f`. - Codex round 5 on `d4c338de767`: "Didn't find any major issues" (https://github.com/coder/coder/pull/29584#issuecomment-5736190356). Zero unresolved threads. CI green on `d4c338de767`. - Remote UAT round 3 on `d4c338de767` (same chat): endorsed PASS. Alias runs are single-attempt 200s with `{"effort", "summary", "mode": "pro"}` and no `temperature` (quick generation and title calls no longer retry); `reasoning_model=false` plus a mode is rejected by POST and PATCH with the stored config unchanged; the Reasoning Model override at Off hides the select and drops the mode on save; `gpt-5.6-sol` Pro turn unchanged. Remaining low notes, none introduced here: rejection detail for a non-OpenAI provider names the model rather than the provider; Pro is dropped silently when an override makes it unsupported; `PATCH model_config` replaces the whole object (pre-existing on main). - coder-frontend-review on `d4c338de767` (8 role reviewers, 3 passes): 13 failing checkpoints, chiefly a TS mirror of the Go model regex, the `json_name === "reasoning_mode"` gate duplicated in the render filter and payload builder, a defaulted `model` parameter, and comment and type nits. Fixed in `554c90d5fd9`: the pattern and provider scope are generated onto the field schema, one predicate is shared by both call sites, `buildModelConfigFromForm(provider, model, form)` requires the model, and the ModelForm test also asserts the select disappears for an unsupported model. Red/green: stripping `supported_models` or `visible_for_providers` from the generated schema fails 21 and 1 Vitest cases respectively. Declined with rationale: RO4 (move the fixture to `ModelsPage/testFixtures.ts`; FE9 in `FRONTEND_PATTERNS.md` names `testHelpers/chatModels.ts`, and Codex round 3 required it) and a DF5 nit to gate on the committed identifier and warn when a saved mode is dropped (behavior change, separate follow-up). Final pass: all checkpoints PASS or N/A. - Remote UAT round 4 on `554c90d5fd9` (same chat, focused regression after the frontend-review refactor): endorsed PASS. All six claims held (Pro round trip with effort and tier intact; unsupported identifiers hide the select and a save drops the stale mode while keeping the other options; Azure never shows or saves it; the alias shows it only with the Responses override On; Reasoning Model Off hides it and drops it; three real `gpt-5.6-sol` Pro turns were single-attempt 200s with `{"effort","summary","mode":"pro"}` and no `temperature`). Probes aimed at the refactor also passed: `gpt-5X6-sol` is rejected (dot escaping survived the JSON round trip), whitespace-padded identifiers still match, the other 11 OpenAI fields and the Anthropic section still render. Remaining low notes are carried over from round 3 plus one naming note ("Reasoning Mode" versus "Reasoning Model"). The final head `abb58df77d8` differs from `554c90d5fd9` only in `ModelForm.test.tsx`, so it ships the same production code. - Codex round 6 on `554c90d5fd9`: 1 finding (https://github.com/coder/coder/pull/29584#pullrequestreview-5260492465): the two `toBeInTheDocument` assertions added in the frontend-review round violate FE1. Confirmed against `site/AGENTS.md`; removed in `abb58df77d8` (test-only, 7 deletions; the payload assertion keeps the behavior coverage and the `ProviderConfigOpenAI` story captures the hidden state). Thread replied to and resolved. - Codex round 7 on `abb58df77d8`: "Didn't find any major issues" (https://github.com/coder/coder/pull/29584#issuecomment-5749626071). Zero unresolved threads. CI green on `abb58df77d8` (23 success, 8 skipped, `required` pass). - Design change on `e99152e5c57` (owner direction: no model gating; "none or pro" for any model; tooltip states the GPT-5.6 Sol constraint and that requests fail on unsupported models). Removed `codersdk.ChatModelReasoningModeModels`, the generated `supported_models`, `isFieldApplicableToModel`, the `gpt-daybreak-blue-latest` special case, and the `standard` enum value; `ValidateReasoningMode(provider, config)` no longer takes the model; `effectiveOpenAIConfig` makes a mode imply Responses and reasoning-model treatment. PR footprint went from +1130/-22 to +769/-18. Local validation: `go test` for chatopenai, chatprovider, chatd wire test, and the coderd API tests (persistence now covers `gpt-5.6-sol`, `gpt-4o`, `gpt-daybreak-blue-latest`, `gpt-7-nova`; invalid input now rejects `standard`), golangci-lint on touched packages, Vitest (187 tests across `modules/aiModels` and `ModelsPage`), biome, tsc, pre-commit hook. - coder-frontend-review on `e99152e5c57` (8 roles, 1 pass plus a TS and CD confirmation pass): 9 failing checkpoints (SD4, CD1, CD3, CD4, TS3, TS7 x2, RO3, RO5, TN4, DF5). Fixed in `e06bfbe4299`: the ModelForm test edits `mockGPT5` so its provider matches the selected provider state, types the update mock like the sibling story, and drops an unused route; the story spreads `mockGPT5` with a saved mode instead of a dedicated shared fixture (`MockGPT56Pro` removed, `testHelpers/chatModels.ts` back to base); a `ProviderConfigAzure` story captures the panel without `reasoning_mode`; comment nits. Left as a nit with justification: RO3 (the one-line `!hidden && isFieldVisibleForProvider` predicate now appears in both `getVisibleProviderFields` and `getVisibleGeneralFields`; hoisting a helper for two call sites is not worth it). Confirmation pass: TS all PASS; CD flagged one wording nit, fixed before commit. - CI green on `e06bfbe4299` (23 success, 8 skipped, `required` pass). - Codex round 8 on `e06bfbe4299`: 1 P2 finding (https://github.com/coder/coder/pull/29584#discussion_r4057659673): the form still offers Pro with Use Responses API or Reasoning Model at Off, a combination the server rejects, and the failure was not actionable. Disposition: the select stays visible by owner direction (no client-side gating of this field beyond the provider scope; an explicit rejection is preferred over the earlier silent drop), and `e2b43c3aee7` makes the add/update save toasts show the server detail so the admin sees which field to change. Thread replied to and resolved; zero unresolved threads. - Remote UAT round 5 on `e06bfbe4299` (same chat): endorsed PASS with two UI issues to land before release. All seven probes passed: the select offers only Default and Pro for `gpt-5.6-sol` and `gpt-4o` with the tooltip text verbatim; Pro saves on `gpt-4o` and the real turn fails visibly with the provider's "reasoning.mode is not supported with this model" after a single 400 attempt, and works again once Pro is cleared; `gpt-daybreak-blue-latest` with Pro and no overrides is a single 200 to `/v1/responses` with `{effort, summary, mode: "pro"}` and no `temperature`; the `gpt-5.6-sol` Pro turn is unchanged; POST and PATCH reject `standard`, `PRO`, empty, Responses Off, Reasoning Model Off, and Azure, openai-compat, and Anthropic providers with the stored config unchanged, while a model-only PATCH to `gpt-4o` now succeeds; the Azure form shows no Reasoning Mode; the alias with an explicit Responses override still works. Reservations: (1) medium, the UI conflict path only showed "Invalid model config." without the detail (fixed in `e2b43c3aee7`, not yet UAT-exercised); (2) low-medium, a dev-DB row still holding `standard` from round 2 renders an empty red select whose message is the whole field description plus "has an invalid value." and blocks saving unrelated fields (pre-existing generic behavior of `yupTestForField` using the description as the label; no released data can hold `standard`, so no migration); (3) low, no hint next to older identifiers (documented design); (4) low, a chat on such a stored row fails with a generic headline (pre-existing). - Final head `e2b43c3aee7` differs from `e06bfbe4299` only in the two save-toast handlers (`AddModelPage.tsx`, `UpdateModelPage.tsx`, 8 insertions). CI is green on `e2b43c3aee7` (skipped=8, success=23, `required` success). Codex has not run on `e2b43c3aee7`. - Remote UAT round 6 on `e2b43c3aee7` (same chat, https://dogfood.cdr.dev/agents/f5ed1d16-be1d-4d39-952b-126a6a829ef1, settled 2026-09-20T19:02Z): endorsed PASS on the exact final head. Build proven by `/api/v2/buildinfo` (`v2.37.2-devel+e2b43c3aee`, `external_url` at the full SHA) and the UI badge. The round 5 toast issue is resolved: Add and Update saves with Pro plus Use Responses API Off or Reasoning Model Off show "Invalid model config." with the server detail as the description, one 400 each, nothing stored. Compact regression of every round 5 probe held (dropdown and tooltip; Pro on `gpt-4o` fails visibly with the provider's `reasoning.mode is not supported with this model` and works after clearing; alias with and without the Responses override and `gpt-5.6-sol` all send `{effort, summary, mode: "pro"}` with no `temperature` in a single 200; POST and PATCH rejection matrices with stored config unchanged; Azure form without the field). Legacy `standard` row: fails closed on chat, and re-picking Pro or Default saves. Remaining notes, none blocking: the malformed validation copy for an invalid stored enum (pre-existing `yupTestForField` label choice, dev-DB rows only), Pro offered for models that cannot accept it (documented design), and a pre-existing `quickgen` status quirk on `gpt-4o` unrelated to this field. Secret scan clean. - Final head `4f3c6106dfe` adds one docs-only commit on top of `e2b43c3aee7` (`docs/ai-coder/agents/models.md`, 9 insertions, 8 deletions, no code). Remote UAT round 6 exercised `e2b43c3aee7`; the docs commit is not UAT-relevant. Validated with `markdown-table-formatter`, `markdownlint-cli2`, and the pre-commit hook (`fmt/markdown`, `lint/markdown`, `lint/emdash`, `lint/typos`). CI is green on `4f3c6106dfe` (success=24, skipped=7, `required` success) and the documentation check re-run marked its item addressed (https://github.com/coder/coder/pull/29584#issuecomment-5752457808). - Review tally for this PR: Codex 8 completed rounds; coder-frontend-review 34 role passes (24 on `d4c338de767`, 10 on `e99152e5c57`); remote UAT 5 rounds; no human review yet. This is far past the six-review guardrail, so no further Codex or agent review has been requested. Whether to spend another Codex pass on `e2b43c3aee7` is an owner decision; human review is still required before merge. </details> > Xum acted on behalf of @ibetitsmike.
25 KiB
title
| title |
|---|
| Models |
Administrators configure LLM providers from Admin settings > AI and Coder Agents models from Admin settings > AI > Models. Providers and centrally managed credentials are deployment-wide settings managed by platform teams. Each model belongs to an organization. Each organization has its own model list. Developers select from the set of models that an administrator has enabled in their organization. Refer to Organization scope for the split between deployment-wide and organization-scoped settings.
Optionally, administrators can enable AI Gateway Bring Your Own Key (BYOK) so developers can supply personal API keys for providers. See User API keys below.
Providers
Each LLM provider has a type, credentials, and an endpoint/base URL for the upstream provider or proxy.
Coder supports the following provider types:
| Provider | Description |
|---|---|
| Anthropic | Claude models via Anthropic API |
| OpenAI | GPT and o-series models via OpenAI API |
| Gemini models via Google AI API | |
| Azure OpenAI | OpenAI models hosted on Azure |
| AWS Bedrock | Models via AWS Bedrock |
| OpenAI Compatible | Any endpoint implementing the OpenAI API |
| OpenRouter | Multi-model routing via OpenRouter |
| Vercel AI Gateway | Models via Vercel AI SDK |
The OpenAI Compatible type is a catch-all for any service that exposes an OpenAI-compatible chat completions endpoint. Use it to connect to self-hosted models, internal gateways, or third-party proxies like LiteLLM.
Coder Agents route model requests through AI Gateway automatically by using the provider configuration stored in Coder's database.
Some provider types work as AI Gateway proxy targets but cannot back Coder Agents. GitHub Copilot, for example, authenticates with a per-request token that only an official Copilot client can mint, so the server-side Agents harness cannot use it. Configuring such a provider does not unlock Agents; add one of the supported provider types above instead.
Add a provider
LLM providers are managed from the deployment AI settings, not from the Agents settings page. A provider is deployment-wide, whilst the models that reference it are organization-scoped.
- Navigate to Admin settings > AI.
- Select Providers.
- Select Add provider.
- Select the provider type.
- Enter a unique lowercase provider name, the credentials, and the upstream provider or proxy endpoint/base URL.
- Select Save.
After saving a provider, add an Agents model for it from Admin settings > AI > Models. Select the organization that should own the new model before you add it. For provider-specific setup, including AWS Bedrock, refer to AI Gateway provider configuration.
Endpoint/base URL for OpenAI-compatible providers
Provider configuration stores an absolute HTTP(S) endpoint/base URL. Syntax validation confirms that the value is a URL, but it does not prove the upstream implements the APIs Coder sends.
For the default Agents path through AI Gateway, set the endpoint/base URL to
the upstream provider or proxy endpoint. Do not set it to Coder's public AI
Gateway route, such as https://<coder-host>/api/v2/ai-gateway/openai/v1.
OpenAI-shaped provider types require the upstream OpenAI-compatible prefix in
the endpoint/base URL because Coder appends request suffixes such as
/chat/completions, /responses, and /models. This applies to OpenAI,
Azure OpenAI, Google, OpenAI Compatible, OpenRouter, and
Vercel AI Gateway provider types.
Examples:
| Provider type | Example endpoint/base URL |
|---|---|
| OpenAI | https://api.openai.com/v1/ |
| Azure OpenAI | https://<resource-name>.openai.azure.com/openai/v1 |
| Google Gemini OpenAI-compatible API | https://generativelanguage.googleapis.com/v1beta/openai/ |
| OpenRouter | https://openrouter.ai/api/v1 |
| Vercel AI Gateway | https://ai-gateway.vercel.sh/v1 |
| Generic OpenAI-compatible proxy | https://provider.example.com/v1 |
Confirm the exact endpoint/base URL in your provider or proxy documentation.
Provider credentials and security
Provider API keys entered in the dashboard are stored encrypted in the Coder database. They are never exposed to workspaces, developers, or the browser after initial entry. The dashboard shows only whether a key is set, not the key itself.
Because the agent loop runs in the control plane, workspaces never need direct access to LLM providers. See Architecture for details on this security model.
Credential selection
Coder Agents use the AI providers configured by administrators. Provider API keys entered by administrators are centralized credentials for the deployment.
BYOK for Coder Agents is controlled by the global AI Gateway BYOK setting, not by per-provider key policy flags. When BYOK is enabled, users can save a personal API key for any enabled AI provider. When BYOK is disabled, saved user keys are ignored and users cannot add or update personal keys.
For each provider request, Coder selects credentials in this order:
- If BYOK is enabled and the user has saved a personal key for the selected provider, Coder uses the user's key.
- Otherwise, Coder uses centralized provider credentials when they are configured.
- If neither a usable user key nor centralized credentials are available, the provider is unavailable for that user.
Models
Each model belongs to a provider and has its own configuration for context limits, generation parameters, and provider-specific options.
Select an organization
Model settings use the stable path /ai/settings/models and the org query parameter to select an organization.
For example, /ai/settings/models?org=engineering opens the models that you can read in the engineering organization.
If the requested organization isn't accessible, Coder selects your accessible default organization or your first accessible organization. Coder shows the organization picker when you can access more than 1 organization.
Members with model read access can open the model list and model details. Coder shows model fields as read-only unless the member also has update permission. Create, update, delete, and share permissions control their corresponding actions independently.
Manage model permissions
Members with model share permission can let members and groups in the selected organization use the model.
Model access lists control who can use Coder Agents. All organization members except service accounts hold chat permissions, but a member without read access to at least one model in the organization can't use the feature. New models grant read access to the whole organization by default.
- Navigate to Admin settings > AI > Models.
- Select the organization that owns the model.
- Select the model.
- Open Model actions and select Manage permissions.
- Add or remove organization members and groups.
- Select Save permissions.
Coder applies the member and group changes when you save. Removing all entries clears the model's access list, so members without another access grant cannot use the model on their next request.
Model visibility and runtime availability
Management visibility and runtime availability are separate. A member can see a model in settings through its access list even when the model isn't available for chat.
The Agents model selector includes the model only when its exact provider configuration has usable credentials for that member. Coder evaluates providers by provider UUID, so 2 providers of the same type can have different availability. An unavailable provider can remain visible while its models are omitted from the selector.
Model APIs identify each configured model with a UUID.
The provider's model identifier, such as gpt-5.3-codex, doesn't replace this model UUID.
Migrate model API clients
Model collection APIs require an organization name or ID in the path. Update clients that use the removed default-organization routes as follows:
| Removed route | Replacement | Response change |
|---|---|---|
GET /api/experimental/chats/models |
GET /api/v2/organizations/{organization}/chats/models |
The response remains an OrganizationChatModelsResponse. |
GET /api/experimental/chats/model-configs |
GET /api/v2/organizations/{organization}/chats/models |
The response changes from a ChatModel array to an OrganizationChatModelsResponse. Read configured models from models. |
POST /api/experimental/chats/model-configs |
POST /api/v2/organizations/{organization}/chats/models |
The request and ChatModel response shapes remain the same. |
Replace {organization} with the organization name or ID that owns the models.
The collection response also includes provider descriptors and unsupported provider details.
Add a model
- Navigate to Admin settings > AI > Models.
- Select Add model and select the provider for the new model.
- Enter the Model Identifier, the exact model string your provider
expects (e.g.,
claude-opus-4-6,gpt-5.3-codex). - Set a Display Name so developers see a human-readable label in the model selector.
- Set the Context Limit, the maximum number of tokens in the model's
context window (e.g.,
200000for Claude Sonnet). - Configure any provider-specific options (see below).
- Select Save.
The models list shows all configured models grouped by provider.
Adding a model requires a model identifier, display name, and context limit. Provider-specific options appear dynamically based on the selected provider.
Set a default model
Each organization has one default model. The first model that you add to an organization becomes that organization's default model. The models list marks the current default with a Default badge. The default model is pre-selected when developers start a new chat in the organization.
To change the default model:
- Navigate to Admin settings > AI > Models.
- Select the organization that owns the model.
- Open the model, or select Add model to create a new one.
- Select Set as Coder Agents default model.
- Select Save.
Models with a missing or disabled provider
The Models list reflects whether each model can actually be used:
- When a model's connected provider has been deleted, the Provider column shows Unset.
- When a model's provider is missing or disabled, an Unavailable badge appears beside the model name. The badge's tooltip explains whether the provider was deleted or disabled. Such a model cannot serve chat requests.
- When a model is disabled, a Disabled badge appears beside the model name.
To reconnect a model to a working provider, open the model from the list, pick a new provider from the Provider dropdown, and select Save. The Save button is enabled as soon as the selected provider differs from the model's current provider, even if no other field is edited.
Model options
Every model has a set of general options and provider-specific options. The admin UI generates these fields automatically from the provider's configuration schema, so the available options always match the provider type.
General options
These options apply to all providers:
| Option | Description |
|---|---|
| Model Identifier | The API model string sent to the provider (e.g., claude-opus-4-6). |
| Display Name | The label shown to developers in the model selector. |
| Context Limit | Maximum tokens in the context window. Used to determine when context compaction triggers. |
| Compression Threshold | Percentage (0-100) of context usage at which the agent compresses older messages into a summary. |
| Max Output Tokens | Maximum tokens generated per model response. |
| Temperature | Controls randomness. Lower values produce more deterministic output. |
| Top P | Nucleus sampling threshold. |
| Top K | Limits token selection to the top K candidates. |
| Presence Penalty | Penalizes tokens that have already appeared in the conversation. |
| Frequency Penalty | Penalizes tokens proportional to how often they have appeared. |
Provider-specific options
Each provider type exposes additional options relevant to its models. These fields appear dynamically in the admin UI when you select a provider.
Anthropic
| Option | Description |
|---|---|
| Thinking Budget Tokens | Maximum tokens allocated for extended thinking. |
| Effort | Thinking effort level (low, medium, high, xhigh, max). |
| 1M Context Window | Sends the anthropic-beta: context-1m-2025-08-07 header to unlock the 1M token context window on supported Claude models. Pair it with a raised Context Limit, which still controls compaction. Long-context pricing may apply. |
OpenAI
| Option | Description |
|---|---|
| Reasoning Effort | How much effort the model spends reasoning (minimal, low, medium, high, xhigh). |
| Max Completion Tokens | Cap on completion tokens for reasoning models. |
| Parallel Tool Calls | Whether the model can call multiple tools at once. |
| Reasoning Mode | Set to pro to use OpenAI's Pro reasoning mode. Supported from the GPT-5.6 Sol generation; requests fail on models that do not support it. Pro increases model work, latency, and token usage. It requires the Responses API and a reasoning model, so it is rejected when the Use Responses API or Reasoning Model override is set to Off. |
| Option | Description |
|---|---|
| Thinking Budget | Maximum tokens for the model's internal reasoning. |
| Include Thoughts | Whether to include thinking traces in the response. |
OpenRouter
| Option | Description |
|---|---|
| Reasoning Enabled | Enable extended reasoning mode. |
| Reasoning Effort | Reasoning effort level (low, medium, high). |
Vercel AI Gateway
| Option | Description |
|---|---|
| Reasoning Enabled | Enable extended reasoning mode. |
| Reasoning Effort | Reasoning effort level. |
Note
Azure OpenAI uses the same options as OpenAI except Reasoning Mode. AWS Bedrock uses the same model configuration options as Anthropic (thinking budget, reasoning effort).
How developers select models
Developers see a model selector dropdown when starting or continuing a chat on the Agents page. The selector shows only models in the chat's organization that come from providers with valid credentials. Models are grouped by provider if multiple providers are active.
The model selector uses the following precedence to pre-select a model:
- Last used model, stored in the browser's local storage.
- Organization default, the model marked with the Default badge.
- First available model, if no default is set and no history exists.
Developers cannot add their own providers or models. If no models are configured, the chat interface displays a message directing developers to contact an administrator.
Model overrides
Beyond the chat-level model picker, Coder Agents supports two override layers. Both are stored per organization and resolve from the chat's organization:
- Admin overrides (per organization): Pin specific contexts to a particular model. Configure them in the Organization settings section of Admin settings > AI > Coder Agents. Coder shows an organization picker in that section when you can access more than 1 organization.
- Personal overrides (per user and organization, opt-in by admin): Let users override the model for their own root chats and delegated subagents. Admins enable the deployment-wide toggle in the Deployment settings section of the same page. Once the toggle is on, each user sees an Agents tab in their personal Agents > Settings. Users in more than one organization pick which organization to configure.
The Coder Agents page is visible to deployment admins and to organization members with model access. To change an organization override, you need permission to edit that organization's models. The Deployment settings section is visible only to deployment admins.
Important
When a deployment upgrades from the older deployment-wide override storage, existing admin and personal overrides are deleted rather than migrated. Admins and users must re-select their override models in settings after the upgrade.
The configurable contexts:
| Context | Layer | Applies to |
|---|---|---|
| General | Admin + user | Write-capable subagents (spawn_agent with type=general or computer_use). |
| Explore | Admin + user | Read-only subagents (spawn_agent with type=explore). |
| Title generation | Admin only | Chat titles, turn status labels, and chat summaries. |
| Compaction | Admin only | Conversation summarization near the context limit. |
| Advisor | Admin only | The advisor. Requires the chat-advisor experiment. |
| Root | User only | The user's own root chats. |
Resolution order, evaluated per chat or subagent from the chat's organization:
- Explicit
model_config_idon thespawn_agenttool call (general and explore subagents only). - Personal override (when the admin gate is on and a model is set).
- Admin override.
- The chat's selected model (or the organization default for new chats).
If a referenced model is later disabled or deleted, that layer is skipped
and resolution falls through to the next, with two exceptions: an unusable
explicit spawn_agent model_config_id fails the tool call, and an
unusable title generation override skips titles, status labels, and
summaries instead of falling back. Agents discover selectable models (and
their reasoning effort ranges) with the list_subagent_models tool, which
only returns enabled models usable with the chat owner's credentials.
Computer-use subagents always run on the administrator-configured
computer-use model and reject explicit model selection.
Note
Both override layers may change between releases. Admin overrides are available through the API at
/api/v2/organizations/{organization}/chats/model-overridesand personal overrides at/api/v2/organizations/{organization}/members/{user}/chats/model-overrides.
User API keys (BYOK)
When AI Gateway BYOK is enabled, developers can supply personal API keys for any enabled AI provider from the Agents settings page.
Managing personal API keys
- Navigate to the Agents page in the Coder dashboard.
- Open Settings and select the API Keys tab.
- Each enabled provider is listed with a status indicator:
- Key saved, your personal key is active and will be used for requests to that provider.
- Shared key, no personal key is set and Coder is using deployment-managed credentials for that provider.
- No key, no personal key or deployment-managed credential is available. Add a personal key before you use models from this provider.
- Enter your API key and select Save.
Personal API keys are encrypted at rest using the same database encryption used for deployment-managed provider secrets. The dashboard never displays a saved key, only whether one is set.
Removing a personal key
Select Remove on the provider card in the API Keys settings tab. Subsequent requests use deployment-managed credentials when they are configured for that provider. If no deployment-managed credential is available, add a new personal key before you use models from that provider.
Using an LLM proxy
Organizations that route LLM traffic through a centralized proxy, such as LiteLLM or an internal gateway, can point a provider's Endpoint or Base URL at that upstream proxy endpoint. Enter the API key your proxy expects.
Use the OpenAI Compatible provider type if your proxy serves multiple model
families through a single OpenAI-compatible endpoint. Include the proxy
provider's documented OpenAI-compatible path prefix, such as /v1, when
required.
This lets you keep existing proxy-level features like per-user budgets, rate limiting, and audit logging while using Coder Agents as the developer interface.