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
fix/anthropic-top-level-cache-control
c9c97139 fix(ai-anthropic): forward top-level cache_control from modelOptions The text adapter filters `modelOptions` through an allowlist in `mapCommonOptionsToAnthropic`. `cache_control` was missing from it, so any value a caller passed was silently stripped and logged as a dropped key. Anthropic's Messages API accepts `cache_control` as a request-level body param — it auto-applies the marker to the last cacheable block in the request. Confirmed in the pinned SDK (@anthropic-ai/sdk@0.97.1) on `MessageCreateParamsBase` for both `messages.create` and the `beta.messages.create` surface this adapter calls. Adding the allowlist entry alone doesn't compile: `validKeys` is typed `Array<keyof AnthropicTextProviderOptions>`, and per-model option types come from `AnthropicChatModelProviderOptionsByName`, so the field has to exist in both the base type and the per-model intersections. Per-block caching via `systemPrompts[].metadata.cache_control` is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
by Sam Miles
S
Succeeded
fix/anthropic-top-level-cache-control
c9c97139 fix(ai-anthropic): forward top-level cache_control from modelOptions The text adapter filters `modelOptions` through an allowlist in `mapCommonOptionsToAnthropic`. `cache_control` was missing from it, so any value a caller passed was silently stripped and logged as a dropped key. Anthropic's Messages API accepts `cache_control` as a request-level body param — it auto-applies the marker to the last cacheable block in the request. Confirmed in the pinned SDK (@anthropic-ai/sdk@0.97.1) on `MessageCreateParamsBase` for both `messages.create` and the `beta.messages.create` surface this adapter calls. Adding the allowlist entry alone doesn't compile: `validKeys` is typed `Array<keyof AnthropicTextProviderOptions>`, and per-model option types come from `AnthropicChatModelProviderOptionsByName`, so the field has to exist in both the base type and the per-model intersections. Per-block caching via `systemPrompts[].metadata.cache_control` is unchanged. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
by Sam Miles
S
Previous
Next