feat: report cache write tokens from anthropic oai adapter (#8210)

This commit is contained in:
Nate Sesti 2025-10-17 09:37:54 -07:00 • committed by GitHub
parent ae0af67e1a
commit c297e443a7
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -322,7 +322,9 @@ export class AnthropicApi implements BaseLlmApi {
prompt_tokens: usage?.input_tokens ?? 0,
prompt_tokens_details: {
cached_tokens: usage?.cache_read_input_tokens ?? 0,
},
cache_read_tokens: usage?.cache_read_input_tokens ?? 0,
cache_write_tokens: usage?.cache_creation_input_tokens ?? 0,
} as any,
},
choices: [
{