ta
TanStack
GitHub
ai
Workspace
GitHub
CI Pipeline Executions
Filtered
Runs
Demo
Insights
Compare tasks
Analytics
Sign in
Toggle sidebar
Overview
⌘K
ai
Loading workspace stats
Loading workspace insights...
Statistics interval
7 days
30 days
Latest CI Pipeline Executions
Status
Fix filter
Filter
Fuzzy
Filter range
Sort by
Sort by
Start time
Sort ascending
Sort descending
Succeeded
849-ai-anthropic-max_tokens-defaults-to-1024-silently-truncating-responses-when-caller-doesnt-set-it
f54cf0bd fix(anthropic): align #849 max_tokens map and tests with synced model metadata Main's OpenRouter metadata sync (e14586b3e) retired claude-3.x / claude-4 / -fast model ids and added Fable 5 / Sonnet 5, so after rebasing: - ANTHROPIC_MODEL_MAX_OUTPUT_TOKENS again mirrors ANTHROPIC_MODELS exactly (removed retired entries, added claude-fable-5 / claude-sonnet-5). - Tests use current ids (claude-opus-4-8, claude-opus-4-1, claude-sonnet-4-5, claude-opus-4-5 for the 32K ceiling case). - The 'ceiling below the non-streaming limit' test relied on claude-3-haiku's 4K ceiling; no current model sits under 21K, so it now asserts every model in the lineup clamps on the non-streaming path instead. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
by Tom Beckenham
T
Succeeded
849-ai-anthropic-max_tokens-defaults-to-1024-silently-truncating-responses-when-caller-doesnt-set-it
f54cf0bd Merge 8c074d36d1e048b4ebe74daf187c34d006816102 into 5deda27085c8785894a28feb5bb3655dbd8f7e0a
by Tom Beckenham
T
Succeeded
849-ai-anthropic-max_tokens-defaults-to-1024-silently-truncating-responses-when-caller-doesnt-set-it
991d96c0 fix(anthropic): clamp non-streaming structured-output max_tokens default (#849) The #849 default of the model's full output ceiling broke the non-streaming `structuredOutput()` path: the Anthropic SDK refuses a non-streaming request whose `max_tokens` could exceed its 10-minute timeout (~21,333 tokens), so `chat({ outputSchema })` on any fallback-path model threw "Streaming is required for operations that may take longer than 10 minutes". `getAnthropicDefaultMaxTokens(model, { stream })` now clamps the default to `ANTHROPIC_MAX_NONSTREAMING_TOKENS` when `stream: false`; the streaming chat path keeps the model's full ceiling. An explicit oversized `max_tokens` still surfaces the SDK's "use streaming" error. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
by Tom Beckenham
T
Succeeded
849-ai-anthropic-max_tokens-defaults-to-1024-silently-truncating-responses-when-caller-doesnt-set-it
991d96c0 Merge 92f5b767abd3f841527fbc44a0f602b3f3c60801 into e14586b3e2bc32f7640b79df51c7ca9ac6f87295
by Tom Beckenham
T
Succeeded
849-ai-anthropic-max_tokens-defaults-to-1024-silently-truncating-responses-when-caller-doesnt-set-it
a58464a1 fix(anthropic): clamp non-streaming structured-output max_tokens default (#849) The #849 default of the model's full output ceiling broke the non-streaming `structuredOutput()` path: the Anthropic SDK refuses a non-streaming request whose `max_tokens` could exceed its 10-minute timeout (~21,333 tokens), so `chat({ outputSchema })` on any fallback-path model threw "Streaming is required for operations that may take longer than 10 minutes". `getAnthropicDefaultMaxTokens(model, { stream })` now clamps the default to `ANTHROPIC_MAX_NONSTREAMING_TOKENS` when `stream: false`; the streaming chat path keeps the model's full ceiling. An explicit oversized `max_tokens` still surfaces the SDK's "use streaming" error. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
by Tom Beckenham
T
Succeeded
849-ai-anthropic-max_tokens-defaults-to-1024-silently-truncating-responses-when-caller-doesnt-set-it
a58464a1 Merge aee6dd1c9af5a7d1c5b3581964f56ba49f378fb9 into 301adc3529992e7ebf0a04283f1359595f899f4f
by Tom Beckenham
T
Succeeded
849-ai-anthropic-max_tokens-defaults-to-1024-silently-truncating-responses-when-caller-doesnt-set-it
1f65f9b0 fix(anthropic): default max_tokens to the model's output ceiling (#849) Anthropic's Messages API requires `max_tokens`, so the text adapter must always send a value. It previously hard-coded `?? 1024` when the caller didn't pass one, silently truncating any non-trivial generation mid-stream with `stop_reason: "max_tokens"`. Now default to the resolved model's real `max_output_tokens` from model-meta (e.g. 64K Sonnet, 128K Opus), falling back to 64K for unrecognized ids. `max_tokens` is a ceiling, not a reservation, so this costs nothing extra. Also log a warning when a response is truncated while using the defaulted cap, so it isn't silently read as the model "doing nothing"; callers that set `max_tokens` explicitly are unaffected. The new id -> max_output_tokens map is kept in lockstep with ANTHROPIC_MODELS by `scripts/sync-provider-models.ts`, so a freshly-synced model resolves to its real ceiling rather than the fallback. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
by Tom Beckenham
T
Succeeded
849-ai-anthropic-max_tokens-defaults-to-1024-silently-truncating-responses-when-caller-doesnt-set-it
1f65f9b0 Merge f4689283bd3b32984e031f5961101e61b7d0a71b into 33acdd4df4aef13d594700d9b52087252091bd40
by Tom Beckenham
T
Previous
Next