TanStackOSS
    ai
    refactor(openrouter): use SDK ChatContentCacheControl type and drop metadata cast Apply two cleanups to the tool-definition cacheControl forwarding: - Use the SDK's `ChatContentCacheControl` type instead of a hand-rolled `CacheControl` interface, matching how `OpenRouterSystemPromptMetadata` already imports it. Keeps the package's cache-control surface in one place and picks up the SDK's TTL enum. - Drop the `tool.metadata as {...}` cast — `Tool.metadata` is `Record<string, any>`, so the field is already assignable via a plain annotation. Also adds a wire-format test asserting the cache TTL survives serialization. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
    nx run-many --targets=build --exclude=examples/**,testing/**
Succeeded
CI Pipeline Execution

nx run-many --targets=build --exclude=examples/**,testing/**

Click to copy
Linux
4 CPU cores
read access token used
ff1fa640823
97%

Cache hits

32 of 33 tasks used cache.

Get faster results

Learn how to enable distribution.

Atomizer enabled

33 groups of tasks optimized.

© 2026 - Nx Cloud

Terms of ServicePrivacy PolicyChangelogStatusDocsContact Nx CloudPricingCompany@NxDevTools