litellm
litellm copied to clipboard
[Bug]: Custom Pricing for provider text-completion-codestral does not work
What happened?
Hi!
I cannot get cost tracking to work properly for my codestral deployment. The cost for the requests are always set to 0 - while the model has a listed price and tracks the number of tokens used properly. See attached screenshot from the usage tracking.
Here is my configuration:
- model_name: codestral-latest
litellm_params:
model: text-completion-codestral/codestral-latest
api_base: https://Codestral-2501-xxxx.swedencentral.models.ai.azure.com/v1/fim/completions
api_key: os.environ/AZURE_AI_API_KEY
model_info:
input_cost_per_token: 0.0000003 # $0.3 per 1M input tokens
output_cost_per_token: 0.0000009 # $0.9 per 1M output tokens
- model_name: codestral-2501
litellm_params:
model: text-completion-codestral/codestral-2501
api_base: https://Codestral-2501-xxxx.swedencentral.models.ai.azure.com/v1/fim/completions
api_key: os.environ/AZURE_AI_API_KEY
model_info:
input_cost_per_token: 0.0000003 # $0.3 per 1M input tokens
output_cost_per_token: 0.0000009 # $0.9 per 1M output tokens
The litellm version we use is: 1.67.0
Relevant log output
Are you a ML Ops Team?
Yes
What LiteLLM version are you on ?
1.67.0
Twitter / LinkedIn details
No response
having the exact same problem
Got the same error :( I was trying to use this config and got the same beavior
- model_name: DeepSeek-v3
litellm_params:
model: together_ai/deepseek-ai/DeepSeek-v3
api_key: "XXX"
model_info:
...
input_cost_per_token: 0.00000125
output_cost_per_token: 0.00000125
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.