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
Cache control injection uses wrong detection for Anthropic SDK models #14642
The applyCaching function in transform.ts uses model.providerID === "anthropic" to determine whether to use message-level cache control options. This is incorrect for non-Claude models (e.g. kimi-k2.5) that use the Anthropic SDK but have a different providerID.
This issue might be a duplicate of existing issues. Please check:
applyCaching called too freely, causes LiteLLM to fail #6473: Same root cause — applyCaching in transform.ts uses incorrect detection logic, causing cache control to be applied to models using non-Anthropic SDKs (or vice versa). That issue also proposes switching to model.api.npm-based detection as a fix.
Activity
github-actions commentedon Feb 22, 2026
This issue might be a duplicate of existing issues. Please check:
applyCachingintransform.tsuses incorrect detection logic, causing cache control to be applied to models using non-Anthropic SDKs (or vice versa). That issue also proposes switching tomodel.api.npm-based detection as a fix.@ai-sdk/anthropic.If your issue is distinct from these, please clarify how it differs so it can be tracked separately.
fix: empty tool-result content and cache control level for custom @ai…
github-actions commentedon Apr 24, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.