Skip to content

Commit c297e44

Browse files
authored
feat: report cache write tokens from anthropic oai adapter (#8210)
1 parent ae0af67 commit c297e44

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

packages/openai-adapters/src/apis/Anthropic.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,9 @@ export class AnthropicApi implements BaseLlmApi {
322322
prompt_tokens: usage?.input_tokens ?? 0,
323323
prompt_tokens_details: {
324324
cached_tokens: usage?.cache_read_input_tokens ?? 0,
325-
},
325+
cache_read_tokens: usage?.cache_read_input_tokens ?? 0,
326+
cache_write_tokens: usage?.cache_creation_input_tokens ?? 0,
327+
} as any,
326328
},
327329
choices: [
328330
{

0 commit comments

Comments
 (0)