Closed oulianov closed 5 months ago
fix pushed! thanks @oulianov @areibman
Thank you for updating LiteLLM file, however this fix won't work until you strip the model name
@oulianov @areibman curious, what's missing in litellm.token_counter
and litellm. cost_per_token
to be helpful here?
https://docs.litellm.ai/docs/completion/token_usage#3-token_counter
@oulianov @areibman curious, what's missing in
litellm.token_counter
andlitellm. cost_per_token
to be helpful here?https://docs.litellm.ai/docs/completion/token_usage#3-token_counter
Wish I'd known about this before! Few things I ran into that might be worth updating (if it's a priority for you):
I'm more concerned about long term maintainability of this pricing file. Obviously, pricing will keep changing. Providers will keep appearing. Rules will keep changing. There may be the need to price token cost in novel, advanced way (eg: using underlying GPU infracost ; automatically scrapping the price for websites) Having a dedicated repo and community caring about only this topic is a good thing imho 👍
Referring to the OpenAI pricing, there is an error in the LiteLLM prices file for finetuned models of gpt3.5
The counting function would also fail with finetuned models.