Hey there
Mistral is now supporting prompt caching, however, there is 0 support for this with this SDK.
Per the prompt caching docs, completion responses report cached tokens at usage.prompt_tokens_details.cached_tokens:
"usage": {
"prompt_tokens": 1013,
"total_tokens": 1043,
"completion_tokens": 30,
"prompt_tokens_details": { "cached_tokens": 1008 }
}
However, ChatCompletionResponse is typed as UsageInfo, and UsageInfo does not declare prompt_tokens_details.
Seems you rely on Speakeasy and codegen to build this SDK so it should be a quick win ;)
Hey there
Mistral is now supporting prompt caching, however, there is 0 support for this with this SDK.
Per the prompt caching docs, completion responses report cached tokens at usage.prompt_tokens_details.cached_tokens:
However, ChatCompletionResponse is typed as UsageInfo, and UsageInfo does not declare prompt_tokens_details.
Seems you rely on Speakeasy and codegen to build this SDK so it should be a quick win ;)