We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 00b527c commit cdd9aacCopy full SHA for cdd9aac
src/providers/bedrock/chatComplete.ts
@@ -696,6 +696,10 @@ export const BedrockChatCompleteStreamChunkTransform: (
696
cacheWriteInputTokens,
697
completion_tokens: parsedChunk.usage.outputTokens,
698
total_tokens: parsedChunk.usage.totalTokens,
699
+ prompt_tokens_details: {
700
+ cached_tokens: cacheReadInputTokens,
701
+ },
702
+ // we only want to be sending this for anthropic models and this is not openai compliant
703
...((cacheReadInputTokens > 0 || cacheWriteInputTokens > 0) && {
704
cache_read_input_tokens: parsedChunk.usage.cacheReadInputTokens,
705
cache_creation_input_tokens:
0 commit comments