We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
input_cost_per_token
Tried this config, following this doc: https://docs.litellm.ai/docs/proxy/custom_pricing#cost-per-token-eg-azure
model_list: - model_name: expensive-openai-endpoint litellm_params: model: openai/fake api_key: fake-key api_base: https://exampleopenaiendpoint-production.up.railway.app/ input_cost_per_token: 5 output_cost_per_token: 5 general_settings: store_prompts_in_spend_logs: true litellm_settings: callbacks: ["prometheus"]
With this request
curl -i http://0.0.0.0:4000/chat/completions \ -H "Content-Type: application/json" \ -H "Authorization: Bearer sk-1234" \ -d '{ "model": "expensive-openai-endpoint", "messages": [ { "role": "user", "content": [ {"type": "text", "text": "hi"} ] } ] }'
I see this in response headers, without any cost
date: Thu, 23 Jan 2025 19:45:19 GMT server: uvicorn content-length: 489 content-type: application/json x-litellm-call-id: ffe79d11-ef12-4185-a51e-fc067f3ca975 x-litellm-model-id: c019fd0e2ba1a24b2231c45a6e404fffd6afbeb3b6259b4ddba3b70854fad952 x-litellm-model-api-base: https://exampleopenaiendpoint-production.up.railway.app/ x-litellm-version: 1.56.9 x-litellm-key-spend: 0.0 x-litellm-response-duration-ms: 254.09199999999998 x-litellm-overhead-duration-ms: 24.196 llm_provider-content-length: 384 llm_provider-content-type: application/json llm_provider-date: Thu, 23 Jan 2025 19:45:18 GMT llm_provider-server: railway-edge llm_provider-x-railway-request-id: ICSDtxoeShGVwcslDpjkqw_3485859946 x-litellm-model-group: expensive-openai-endpoint x-litellm-attempted-retries: 0
-
No
1.59.5
No response
The text was updated successfully, but these errors were encountered:
ishaan-jaff
No branches or pull requests
What happened?
Tried this config, following this doc: https://docs.litellm.ai/docs/proxy/custom_pricing#cost-per-token-eg-azure
With this request
I see this in response headers, without any cost
Relevant log output
Are you a ML Ops Team?
No
What LiteLLM version are you on ?
1.59.5
Twitter / LinkedIn details
No response
The text was updated successfully, but these errors were encountered: