You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit ed42141
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/reference/architecture.md
+12-8Lines changed: 12 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,14 +118,18 @@ Anthropic SSE comments and `ping` events count as upstream activity, including w
118
118
thinking during context compaction. Proxy-generated keep-alives do not reset the stall deadline;
119
119
an upstream connection that stops sending activity still times out.
120
120
121
-
For Opus 5.5 through the canonical Anthropic API, ordinary routed turns default to a
122
-
128,000-token total output allowance when the caller omits a limit. This uses the model's
123
-
[documented capacity for long coding turns](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5-5#calibrate-effort)
124
-
and preserves the requested reasoning effort. Adaptive thinking and answer text share the
125
-
allowance; effort does not enforce a separate thinking budget. Explicit limits remain
126
-
authoritative, and other models and custom Anthropic-compatible endpoints retain their defaults.
127
-
128
-
Routed context compaction for the same model and endpoint uses at most
121
+
Ordinary routed turns use known provider/model output allowances by default, including
122
+
requests with smaller caller-supplied caps. Set the global `outputTokenPolicy` to `request`
123
+
to honor explicit caps and configured fallback budgets. Output metadata is matched to the
124
+
provider destination before selecting an allowance.
125
+
126
+
Native Claude Fable 5.2 and Opus 5.5 have 128,000-token output allowances. Adaptive thinking
127
+
and answer text share the allowance, while effort controls reasoning depth. Protocols
128
+
that expose no output-budget field leave generation limits to the upstream service.
129
+
See [output token allowances](/reference/configuration/providers/#output-token-allowances)
130
+
for configuration and coverage.
131
+
132
+
Routed context compaction for Opus 5.5 through the canonical Anthropic API uses at most
129
133
`medium` reasoning effort and defaults to a 64,000-token total output limit when the caller
130
134
omits one. Adaptive thinking and summary text share that limit; effort does not reserve a
131
135
fixed number of tokens for the summary. Explicit output limits and lower reasoning efforts
Copy file name to clipboardExpand all lines: docs-site/src/content/docs/reference/configuration/providers.md
+28-2Lines changed: 28 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -14,6 +14,7 @@ authenticated.
14
14
|`disabledModels?`|`string[]`| — | Models hidden from Codex's catalog and `/v1/models`, but not blocked from direct proxy calls. A routed id is removed from listings. An account-qualified native id hides only that selector row; a bare native GPT id hides the bare row and every account-selector row for that model. The dashboard Models page exposes only routed and bare native rows; use this configuration field directly to hide one selector-qualified row. |
15
15
|`providerContextCaps?`|`Record<string, number>`|`{}`| Per-provider Codex-visible context caps. A cap only lowers a known context window. |
16
16
|`contextCapValue?`|`number`|`350000`| Value used by the dashboard context-cap controls; changing it updates every enabled `providerContextCaps` entry. |
17
+
|`outputTokenPolicy?`|`"request" \| "model-max"`|`"model-max"`| Uses the known output allowance for ordinary requests, including requests with a smaller caller-supplied cap. Select `request` to honor caller caps and configured fallback budgets. |
17
18
|`codexAccounts?`|`CodexAccount[]`|`[]`| ChatGPT/Codex pool account metadata managed by Codex Auth. Secrets live separately in `codex-accounts.json`. |
18
19
|`pausedCodexAccountIds?`|`string[]`|`[]`| Accounts excluded from Pool selection until resumed, including the main `__main__` account when paused. |
19
20
|`codexAccountNamespaces?`|`Record<string, string>`| — | Optional map from an arbitrary public model selector to a stored Codex account target. Each selector whose target is present adds separate `<selector>/<native-openai-model>` rows to the Codex picker; each row uses only that account. With any selector active, bare native rows are hidden in the picker, but their ids remain routable and listed by raw `/v1/models` unless explicitly disabled. |
@@ -38,6 +39,31 @@ configured pool ids or selector targets also cannot reuse a selector. Keep raw a
38
39
emails private; the selector is the public name. See [Routing Configuration](/reference/configuration/routing/)
39
40
for exact-selection behavior and precedence.
40
41
42
+
## Output token allowances
43
+
44
+
Ordinary requests use the known output allowance for their selected provider and model by
45
+
default. This also applies when an existing configuration omits `outputTokenPolicy`.
46
+
47
+
```json
48
+
{
49
+
"outputTokenPolicy": "request"
50
+
}
51
+
```
52
+
53
+
With the default `model-max` policy, a smaller caller-supplied output cap is raised when CodexCommander has
54
+
matching output-limit metadata for the route. For example, a 32,768-token request for native
55
+
Claude Fable 5.2 can use its 128,000-token allowance. Thinking and visible output share that
56
+
allowance.
57
+
58
+
The `request` setting shown above honors explicit caller caps. Requests that omit a cap can
59
+
use known model allowances after configured fallback budgets. Unknown capacities use the
60
+
request or adapter fallback. Adapters whose upstream protocol has no output-limit field use
61
+
the upstream's allowance.
62
+
63
+
Context compaction keeps its maintenance budgets. Provider output ceilings and context
64
+
windows still apply, and reaching a ceiling produces an incomplete response. A larger
65
+
allowance can permit longer generation and higher usage.
66
+
41
67
## Reserved OpenAI providers
42
68
43
69
`openai` and `openai-apikey` are fixed reserved ids. `openai.codexAccountMode` is `"pool"` by default
@@ -67,8 +93,8 @@ metadata, and Pro virtual ids rewrite to the base wire model with `reasoning.mod
67
93
|`modelContextWindows?`|`Record<string, number>`| Per-model context caps. These override `contextWindow` and never raise smaller live metadata. |
68
94
|`modelInputModalities?`|`Record<string, string[]>`| Per-model input hints such as `["text"]` or `["text", "image"]`. |
69
95
|`modelMaxInputTokens?`|`Record<string, number>`| Positive per-model max input limits used for catalog auto-compaction hints. |
70
-
|`defaultMaxOutputTokens?`|`number`| Provider-wide `openai-chat`fallback when the client omits `max_output_tokens`. |
|`defaultMaxOutputTokens?`|`number`| Provider-wide fallback for translated Anthropic, Chat Completions, Google, and Command Code requests when the client omits an output cap. |
97
+
|`modelMaxOutputTokens?`|`Record<string, number>`| Positive per-model fallback budgets for translated requests. Exact/pattern matches beat the provider default. The `model-max` policy uses known model allowances ahead of these budgets. |
72
98
|`chatCompletionTokenField?`|`"max_tokens" \| "max_completion_tokens"`| Chat Completions output-budget field. Defaults to `max_tokens`; canonical Kimi Coding Plan presets use `max_completion_tokens`. |
73
99
|`headers?`|`Record<string, string>`| Extra upstream headers. Authorization, cookies, API-key headers, embedded newlines, and invalid names are rejected. |
74
100
|`openRouterRouting?`|`OpenRouterProviderRouting`| Default OpenRouter `order`, `only`, and `allowFallbacks` preferences; valid only for canonical OpenRouter with `openai-chat`. |
0 commit comments