When using VLLM as a provider, token cost calculator does not handle information about the cached tokens.
usage:{
total_tokens:150687,
prompt_tokens:150383,
completion_tokens:304,
prompt_tokens_details:{
text_tokens:null,
audio_tokens:null,
image_tokens:null,
cached_tokens:149936
},
completion_tokens_details:{
text_tokens:null,
audio_tokens:null,
image_tokens:null,
reasoning_tokens:15,
accepted_prediction_tokens:null,
rejected_prediction_tokens:null
}
},
Check for existing issues
What happened?
When using VLLM as a provider, token cost calculator does not handle information about the cached tokens.
I've looked through the implementation and based on my understanding, this logic is missing in: https://github.com/BerriAI/litellm/blob/main/litellm/types/utils.py#L1538 , am I correct?
Steps to Reproduce
What part of LiteLLM is this about?
Proxy
What LiteLLM version are you on ?
v1.18.3
Twitter / LinkedIn details
No response