Krish Dholakia
8eb7cb5300
LiteLLM Minor fixes + improvements (08/03/2024) ( #5488 )
...
* fix(internal_user_endpoints.py): set budget_reset_at for /user/update
* fix(vertex_and_google_ai_studio_gemini.py): handle accumulated json
Fixes https://github.com/BerriAI/litellm/issues/5479
* fix(vertex_ai_and_gemini.py): fix assistant message function call when content is not None
Fixes https://github.com/BerriAI/litellm/issues/5490
* fix(proxy_server.py): generic state uuid for okta sso
* fix(lago.py): improve debug logs
Debugging for https://github.com/BerriAI/litellm/issues/5477
* docs(bedrock.md): add bedrock cross-region inferencing to docs
* fix(azure.py): return azure response headers on aembedding call
* feat(azure.py): return azure response headers for `/audio/transcription`
* fix(types/utils.py): standardize deepseek / anthropic prompt caching usage information
Closes https://github.com/BerriAI/litellm/issues/5285
* docs(usage.md): add docs on litellm usage object
* test(test_completion.py): mark flaky test
2024-09-03 21:21:34 -07:00
Krish Dholakia
5f993f46a0
anthropic prompt caching cost tracking ( #5453 )
...
* fix(utils.py): support 'drop_params' for embedding requests
Fixes https://github.com/BerriAI/litellm/issues/5444
* feat(anthropic/cost_calculation.py): Support calculating cost for prompt caching on anthropic
* feat(types/utils.py): allows us to migrate to openai's equivalent, once that comes out
* fix: fix linting errors
* test: mark flaky test
2024-08-31 14:09:35 -07:00
Krrish Dholakia
cf1a1605a6
feat(cost_calculator.py): only override base model if custom pricing is set
2024-08-19 16:05:49 -07:00
Krrish Dholakia
b3dd0bb738
bump: version 1.43.16 → 1.43.17
2024-08-16 21:34:35 -07:00
Krrish Dholakia
ef51f8600d
feat(litellm_logging.py): support logging model price information to s3 logs
2024-08-16 16:21:34 -07:00
Krrish Dholakia
40b86e7d07
fix(cost_calculator.py): handle openai usage pydantic object
...
Fixes https://github.com/BerriAI/litellm/issues/5165
2024-08-12 15:45:21 -07:00
Krrish Dholakia
c1513bfe42
fix(types/utils.py): support passing prompt cache usage stats in usage object
...
Passes deepseek prompt caching values through to end user
2024-08-02 09:30:50 -07:00
Krrish Dholakia
0bcfdafc58
fix(utils.py): fix model registeration to model cost map
...
Fixes https://github.com/BerriAI/litellm/issues/4972
2024-07-30 18:15:00 -07:00
Krrish Dholakia
a6b053f535
feat(databricks.py): support vertex mistral cost tracking
2024-07-27 20:22:35 -07:00
Krrish Dholakia
d3ff21181c
fix(litellm_cost_calc/google.py): support meta llama vertex ai cost tracking
2024-07-25 22:12:07 -07:00
Krrish Dholakia
271407400a
fix(utils.py): support raw response headers for streaming requests
2024-07-23 11:58:58 -07:00
Krrish Dholakia
d55b516f3c
feat(utils.py): support passing openai response headers to client, if enabled
...
Allows openai/openai-compatible provider response headers to be sent to client, if 'return_response_headers' is enabled
2024-07-23 11:30:52 -07:00
Ishaan Jaff
27e958ceb4
ci/cd run again
2024-07-19 20:08:50 -07:00
Ishaan Jaff
28b800886d
fix test_vertex_ai_medlm_completion_cost
2024-07-19 19:58:44 -07:00
skucherlapati
d1cad22c20
add medlm models to cost map
2024-07-17 21:17:58 -07:00
Ishaan Jaff
d48223b3e0
fix medllm test
2024-07-17 20:19:37 -07:00
skucherlapati
07b4a1f469
fix failing tests on PR-4760
2024-07-17 19:32:17 -07:00
skucherlapati
aebc47cfe9
add medlm cost calc
2024-07-17 14:54:54 -07:00
Krrish Dholakia
4687b12732
fix(litellm_logging.py): log response_cost=0 for failed calls
...
Fixes https://github.com/BerriAI/litellm/issues/4604
2024-07-15 19:25:56 -07:00
Krrish Dholakia
219dbf4f36
build(model_prices_and_context_window.json): add azure ai jamba instruct pricing + token details
...
Adds jamba instruct, mistral, llama3 pricing + token info for azure_ai
2024-07-13 16:34:31 -07:00
Krrish Dholakia
3f965df68b
fix(llm_cost_calc/google.py): fix google embedding cost calculation
...
Fixes https://github.com/BerriAI/litellm/issues/4630
2024-07-11 11:55:48 -07:00
Krrish Dholakia
6220b70261
fix(cost_calculator.py): support openai+azure tts calls
2024-07-05 20:58:08 -07:00
Krish Dholakia
fa1cb7d903
Merge branch 'main' into litellm_response_cost_headers
2024-06-27 21:33:09 -07:00
Krrish Dholakia
e81fa6ecad
fix(cost_calculator.py): infer provider name if not given
...
Fixes https://github.com/BerriAI/litellm/issues/4452
2024-06-27 18:41:04 -07:00
Krrish Dholakia
be5d918211
fix(utils.py): return 'response_cost' in completion call
...
Closes https://github.com/BerriAI/litellm/issues/4335
2024-06-26 17:55:57 -07:00
spdustin@gmail.com
16c5ebfe25
fix: use per-token costs for claude via vertex_ai
2024-06-21 11:21:36 -05:00
Krrish Dholakia
edfe550165
feat(llm_cost_calc/google.py): do character based cost calculation for vertex ai
...
Calculate cost for vertex ai responses using characters in query/response
Closes https://github.com/BerriAI/litellm/issues/4165
2024-06-19 17:18:42 -07:00
Krrish Dholakia
4fd054f188
feat(cost_calculator.py): add cost calculating for dynamic context window (vertex ai / google ai studio)
2024-06-17 12:38:10 -07:00
Krrish Dholakia
966f9ebc6a
test(test_completion_cost.py): fix import
2024-06-15 12:08:49 -07:00
Krrish Dholakia
2af3c43360
build(model_prices_and_context_window.json): update together ai model pricing - account for new categories
2024-06-08 19:56:35 -07:00
Krrish Dholakia
0a886eed6a
fix(cost_calculator.py): fixes tgai unmapped model pricing
...
Fixes error where tgai helper function returned None. Enforces stronger type hints, refactors code, adds more unit testing.
2024-06-08 19:43:57 -07:00
Krrish Dholakia
85cfbf0f86
test(test_completion_cost.py): cleanup test
2024-06-04 16:57:25 -07:00
Krrish Dholakia
7432c6a4d9
fix(utils.py): fix cost calculation for openai-compatible streaming object
2024-06-04 10:36:25 -07:00
Krrish Dholakia
782b44818c
fix(utils.py): allow passing in custom pricing to completion_cost as params
2024-05-16 16:24:44 -07:00
Krrish Dholakia
8d94665842
fix(utils.py): fix custom pricing when litellm model != response obj model name
2024-05-13 15:25:35 -07:00
Ishaan Jaff
6732facba7
test bedrock pricing
2024-05-08 15:26:53 -07:00
Krrish Dholakia
945bc96389
fix(utils.py): replicate now also has token based pricing for some models
2024-04-29 08:06:15 -07:00
Krrish Dholakia
ae9eff5fc4
fix(azure.py): support cost tracking for azure/dall-e-3
2024-03-12 10:55:54 -07:00
Krrish Dholakia
b2ce963498
feat: add cost tracking + caching for transcription calls
2024-03-09 15:43:38 -08:00
Krrish Dholakia
dad65ca602
fix(bedrock.py): support anthropic messages api on bedrock (claude-3)
2024-03-04 17:15:47 -08:00
ishaan-jaff
37a15328f7
(ci/cd) aws disabled our test account :(
2024-02-28 17:26:23 -08:00
Krrish Dholakia
129e84f0c5
test: removing aws tests - account suspended - pending their approval
2024-02-28 13:46:20 -08:00
Krrish Dholakia
9d0755088c
test(test_completion_cost.py): fix test
2024-02-03 22:00:49 -08:00
Krrish Dholakia
c16dee39d7
fix(utils.py): support max token adjustment for sagemaker
2024-01-31 19:09:54 -08:00
Krrish Dholakia
e1beaf0945
feat(utils.py): support region based pricing for bedrock + use bedrock's token counts if given
2024-01-26 14:53:58 -08:00
Krrish Dholakia
4a34084ee6
fix(utils.py): completion_cost support for image gen models
2024-01-25 18:08:18 -08:00
ishaan-jaff
b2be530a13
(test) azure completion_cost
2024-01-05 13:53:08 +05:30
ishaan-jaff
9e48e8c9a5
(test) azure/embedding + completion_cost
2024-01-05 13:19:17 +05:30
ishaan-jaff
43f240ff42
allow users to pass custom timing for replicate
2023-09-06 18:32:40 -07:00
ishaan-jaff
6995232782
bump v
2023-09-06 18:14:58 -07:00