taTanStack
GitHubaiWorkspace
GitHub
  • CI Pipeline Executions
    • Current executionSucceededfix/anthropic-top-level-cache-control
    • Configuration
    • Self-Healing CI
    • Project Graph
    • Resource Usage
    • Analysis
    • Conformance
  • Runs
    • Current runSucceeded
    • Tasks
    • Resource Usage
Insights
  • Compare tasks
  • Analytics
    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>
    nx run-many --targets=build --exclude=examples/**,testing/**
Succeeded
Linux
4 CPU cores
read access token used
c9c971391062
96%

Cache hits

51 of 53 tasks used cache.

Get faster results

Learn how to enable distribution.

Atomizer enabled

53 groups of tasks optimized.

© 2026 - Nx Cloud

Terms of ServicePrivacy PolicyChangelogStatusDocsContact Nx CloudPricingCompany@NxDevTools