Skip to content

Commit 31cf0b6

Browse files
bhuvansinglaclaude
andcommitted
fix(anthropic): pass through top-level cache_control for automatic caching
Anthropic supports automatic prompt caching via a top-level cache_control field on the request body. This was not being forwarded to the provider. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 351692f commit 31cf0b6

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/providers/anthropic/chatComplete.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -469,6 +469,10 @@ export const AnthropicChatCompleteConfig: ProviderConfig = {
469469
param: 'thinking',
470470
required: false,
471471
},
472+
cache_control: {
473+
param: 'cache_control',
474+
required: false,
475+
},
472476
};
473477

474478
interface AnthorpicTextContentItem {

0 commit comments

Comments
 (0)