Commit graph

346 commits

Author SHA1 Message Date
Krish Dholakia
d46660ea0f
LiteLLM Minor Fixes & Improvements (09/18/2024) (#5772)
* fix(proxy_server.py): fix azure key vault logic to not require client id/secret

* feat(cost_calculator.py): support fireworks ai cost tracking

* build(docker-compose.yml): add lines for mounting config.yaml to docker compose

Closes https://github.com/BerriAI/litellm/issues/5739

* fix(input.md): update docs to clarify litellm supports content as a list of dictionaries

Fixes https://github.com/BerriAI/litellm/issues/5755

* fix(input.md): update input.md to include all message values

* fix(image_handling.py): follow image url redirects

Fixes https://github.com/BerriAI/litellm/issues/5763

* fix(router.py): Fix model key/base leak in error message

Fixes https://github.com/BerriAI/litellm/issues/5762

* fix(http_handler.py): fix linting error

* fix(azure.py): fix logging to show azure_ad_token being used

Fixes https://github.com/BerriAI/litellm/issues/5767

* fix(_redis.py): add redis sentinel support

Closes https://github.com/BerriAI/litellm/issues/4381

* feat(_redis.py): add redis sentinel support

Closes https://github.com/BerriAI/litellm/issues/4381

* test(test_completion_cost.py): fix test

* Databricks Integration: Integrate Databricks SDK as optional mechanism for fetching API base and token, if unspecified (#5746)

* LiteLLM Minor Fixes & Improvements (09/16/2024)  (#5723)

* coverage (#5713)

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* Move (#5714)

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* fix(litellm_logging.py): fix logging client re-init (#5710)

Fixes https://github.com/BerriAI/litellm/issues/5695

* fix(presidio.py): Fix logging_hook response and add support for additional presidio variables in guardrails config

Fixes https://github.com/BerriAI/litellm/issues/5682

* feat(o1_handler.py): fake streaming for openai o1 models

Fixes https://github.com/BerriAI/litellm/issues/5694

* docs: deprecated traceloop integration in favor of native otel (#5249)

* fix: fix linting errors

* fix: fix linting errors

* fix(main.py): fix o1 import

---------

Signed-off-by: dbczumar <corey.zumar@databricks.com>
Co-authored-by: Corey Zumar <39497902+dbczumar@users.noreply.github.com>
Co-authored-by: Nir Gazit <nirga@users.noreply.github.com>

* feat(spend_management_endpoints.py): expose `/global/spend/refresh` endpoint for updating material view (#5730)

* feat(spend_management_endpoints.py): expose `/global/spend/refresh` endpoint for updating material view

Supports having `MonthlyGlobalSpend` view be a material view, and exposes an endpoint to refresh it

* fix(custom_logger.py): reset calltype

* fix: fix linting errors

* fix: fix linting error

* fix

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* fix: fix import

* Fix

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* fix

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* DB test

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* Coverage

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* progress

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* fix

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* fix

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* fix

Signed-off-by: dbczumar <corey.zumar@databricks.com>

* fix test name

Signed-off-by: dbczumar <corey.zumar@databricks.com>

---------

Signed-off-by: dbczumar <corey.zumar@databricks.com>
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: Nir Gazit <nirga@users.noreply.github.com>

* test: fix test

* test(test_databricks.py): fix test

* fix(databricks/chat.py): handle custom endpoint (e.g. sagemaker)

* Apply code scanning fix for clear-text logging of sensitive information

Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>

* fix(__init__.py): fix known fireworks ai models

---------

Signed-off-by: dbczumar <corey.zumar@databricks.com>
Co-authored-by: Corey Zumar <39497902+dbczumar@users.noreply.github.com>
Co-authored-by: Nir Gazit <nirga@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <62310815+github-advanced-security[bot]@users.noreply.github.com>
2024-09-19 13:25:29 -07:00
Ishaan Jaff
49b2766723
add gemma2 9b it (#5788) 2024-09-19 13:03:33 -07:00
Krrish Dholakia
5fb270a559 build(model_prices_and_context_window.json): bump claude-3-5-sonnet max tokens 2024-09-15 13:57:41 -07:00
F1bos
b64b7a94ae
(models): Enable JSON Schema Support for Gemini 1.5 Flash Models (#5708)
* Fixed gemini-1.5-flash pricing

* (models): Added missing gemini experimental models + fixed pricing for gemini-1.5-pro-exp-0827

* Added gemini/gemini-1.5-flash-001 model

* Updated supports_response_schema to true for gemini flash 1.5 models
2024-09-15 13:52:00 -07:00
Ahmet
415a3ede9e
Update model_prices_and_context_window.json (#5700)
added audio_speech mode on the sample_spec for clarity.
2024-09-14 11:22:08 -07:00
F1bos
db3af20d84
(models): Added missing gemini experimental models + fixed pricing for gemini-1.5-pro-exp-0827 (#5693)
* Fixed gemini-1.5-flash pricing

* (models): Added missing gemini experimental models + fixed pricing for gemini-1.5-pro-exp-0827
2024-09-14 08:41:48 -07:00
David Manouchehri
795047c37f
Add o1 models on OpenRouter. (#5676) 2024-09-12 22:16:10 -07:00
David Manouchehri
5c1a70be21
Fix token and remove dups. (#5662) 2024-09-12 13:33:35 -07:00
David Manouchehri
b4f97763f0
(models): Add o1 pricing. (#5661) 2024-09-12 11:47:04 -07:00
lowjiansheng
3afe70c1f2 gpt o1 and o1 mini 2024-09-13 02:27:57 +08:00
Krish Dholakia
0295a22561
LiteLLM Minor Fixes and Improvements (09/10/2024) (#5618)
* fix(cost_calculator.py): move to debug for noisy warning message on cost calculation error

Fixes https://github.com/BerriAI/litellm/issues/5610

* fix(databricks/cost_calculator.py): Handles model name issues for databricks models

* fix(main.py): fix stream chunk builder for multiple tool calls

Fixes https://github.com/BerriAI/litellm/issues/5591

* fix: correctly set user_alias when passed in

Fixes https://github.com/BerriAI/litellm/issues/5612

* fix(types/utils.py): allow passing role for message object

https://github.com/BerriAI/litellm/issues/5621

* fix(litellm_logging.py): Fix langfuse logging across multiple projects

Fixes issue where langfuse logger was re-using the old logging object

* feat(proxy/_types.py): support adding key-based tags for tag-based routing

Enable tag based routing at key-level

* fix(proxy/_types.py): fix inheritance

* test(test_key_generate_prisma.py): fix test

* test: fix test

* fix(litellm_logging.py): return used callback object
2024-09-11 11:30:29 -07:00
Christopher Chou
a451cfc2d6
Add gemini 1.5 flash exp 0827 (#5636) 2024-09-11 11:30:13 -07:00
Ishaan Jaff
899eaa9566
Merge pull request #5571 from jalammar/cohere-updated-models
Add Cohere refresh models and update pricing
2024-09-10 17:22:51 -07:00
Jay Alammar
795b29dfc4 Updating Cohere models, prices, and documentation 2024-09-10 13:47:05 -04:00
Krish Dholakia
2d2282101b
LiteLLM Minor Fixes and Improvements (09/09/2024) (#5602)
* fix(main.py): pass default azure api version as alternative in completion call

Fixes api error caused due to api version

Closes https://github.com/BerriAI/litellm/issues/5584

* Fixed gemini-1.5-flash pricing (#5590)

* add /key/list endpoint

* bump: version 1.44.21 → 1.44.22

* docs architecture

* Fixed gemini-1.5-flash pricing

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>

* fix(bedrock/chat.py): fix converse api stop sequence param mapping

Fixes https://github.com/BerriAI/litellm/issues/5592

* fix(databricks/cost_calculator.py): handle databricks model name changes

Fixes https://github.com/BerriAI/litellm/issues/5597

* fix(azure.py): support azure api version 2024-08-01-preview

Closes https://github.com/BerriAI/litellm/issues/5377

* fix(proxy/_types.py): allow dev keys to call cohere /rerank endpoint

Fixes issue where only admin could call rerank endpoint

* fix(azure.py): check if model is gpt-4o

* fix(proxy/_types.py): support /v1/rerank on non-admin routes as well

* fix(cost_calculator.py): fix split on `/` logic in cost calculator

---------

Co-authored-by: F1bos <44951186+F1bos@users.noreply.github.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2024-09-09 21:56:12 -07:00
Krish Dholakia
72e961af3c
LiteLLM Minor Fixes and Improvements (08/06/2024) (#5567)
* fix(utils.py): return citations for perplexity streaming

Fixes https://github.com/BerriAI/litellm/issues/5535

* fix(anthropic/chat.py): support fallbacks for anthropic streaming (#5542)

* fix(anthropic/chat.py): support fallbacks for anthropic streaming

Fixes https://github.com/BerriAI/litellm/issues/5512

* fix(anthropic/chat.py): use module level http client if none given (prevents early client closure)

* fix: fix linting errors

* fix(http_handler.py): fix raise_for_status error handling

* test: retry flaky test

* fix otel type

* fix(bedrock/embed): fix error raising

* test(test_openai_batches_and_files.py): skip azure batches test (for now) quota exceeded

* fix(test_router.py): skip azure batch route test (for now) - hit batch quota limits

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>

* All `model_group_alias` should show up in `/models`, `/model/info` , `/model_group/info` (#5539)

* fix(router.py): support returning model_alias model names in `/v1/models`

* fix(proxy_server.py): support returning model alias'es on `/model/info`

* feat(router.py): support returning model group alias for `/model_group/info`

* fix(proxy_server.py): fix linting errors

* fix(proxy_server.py): fix linting errors

* build(model_prices_and_context_window.json): add amazon titan text premier pricing information

Closes https://github.com/BerriAI/litellm/issues/5560

* feat(litellm_logging.py): log standard logging response object for pass through endpoints. Allows bedrock /invoke agent calls to be correctly logged to langfuse + s3

* fix(success_handler.py): fix linting error

* fix(success_handler.py): fix linting errors

* fix(team_endpoints.py): Allows admin to update team member budgets

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2024-09-06 17:16:24 -07:00
Jay Alammar
21c6b2993e Clean formatting 2024-09-06 17:54:23 -04:00
Jay Alammar
6d9f6a1b76 Update pricing and add cohere refresh models 2024-09-06 17:35:59 -04:00
Krish Dholakia
f584021f7c
LiteLLM Minor Fixes and Improvements (#5537)
* fix(vertex_ai): Fixes issue where multimodal message without text was failing vertex calls

Fixes https://github.com/BerriAI/litellm/issues/5515

* fix(azure.py): move to using httphandler for oidc token calls

Fixes issue where ssl certificates weren't being picked up as expected

Closes https://github.com/BerriAI/litellm/issues/5522

* feat: Allows admin to set a default_max_internal_user_budget in config, and allow setting more specific values as env vars

* fix(proxy_server.py): fix read for max_internal_user_budget

* build(model_prices_and_context_window.json): add regional gpt-4o-2024-08-06 pricing

Closes https://github.com/BerriAI/litellm/issues/5540

* test: skip re-test
2024-09-05 18:03:34 -07:00
David Manouchehri
0268877f28
Add azure/gpt-4o-2024-08-06 pricing. (#5510) 2024-09-04 09:40:18 -07:00
Krrish Dholakia
2797b30a50 build(model_prices_and_context_window.json): fix token information 2024-09-02 13:14:11 -07:00
Kyrylo Yefimenko
1a0d8e7260
Add pricing for ft:gpt-3.5-turbo-* (#5471) 2024-09-02 13:12:57 -07:00
Ishaan Jaff
4bd85b9d83 add cerebras cost tracking 2024-08-31 16:29:26 -07:00
Krish Dholakia
47ef1f9191 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:50:12 -07:00
Ishaan Jaff
fcdfaac84b
Merge pull request #5419 from Manouchehri/gemini-1.5-pro-exp-0827-pricing
(models): Add gemini-1.5-pro-exp-0827 pricing.
2024-08-30 10:50:10 -07:00
Kyrylo Yefimenko
a100b01b90 Add pricing for Openai ft:gpt-4o 2024-08-30 08:16:24 +01:00
Ishaan Jaff
26c03c9c8b add pricing for vertex ai 21 2024-08-29 19:03:38 -07:00
David Manouchehri
19db80ffeb
(bedrock): Add new cross-region inference support for Bedrock. 2024-08-29 17:49:16 +00:00
Krish Dholakia
a857f4a8ee
Merge branch 'main' into litellm_main_staging 2024-08-28 18:05:27 -07:00
David Manouchehri
824a8b557b
(models): Add gemini-1.5-pro-exp-0827 pricing. 2024-08-28 22:04:34 +00:00
Krrish Dholakia
17646b50ec build(model_prices_and_context_window.json): bedrock/llama3 models - region-based pricing 2024-08-28 13:07:56 -07:00
Krrish Dholakia
023d0f7664 build(model_prices_and_context_window.json): fix bedrock/llama3-1 pricing 2024-08-28 12:54:24 -07:00
Karl Leswing
ec57490585 Also have pricing details 2024-08-28 14:43:35 -04:00
Karl Leswing
b5ce54c202 Support for gemini experimental models 2024-08-28 14:33:18 -04:00
Krrish Dholakia
76c38c6d4b build(model_prices_and_context_window.json): add bedrock mistral small 2024-08-28 10:12:16 -07:00
Ishaan Jaff
3dee98dc47 add jamba-1.5 2024-08-27 14:20:06 -07:00
Ishaan Jaff
e9808346a7 add jamba-1.5-mini models 2024-08-27 14:02:02 -07:00
John HU
9a18106745
Add pricing for imagen-3 and imagen-3-fast 2024-08-26 14:41:47 -07:00
Krish Dholakia
b2e182a42c
Merge pull request #5314 from thiswillbeyourgithub/fix_missing_openrouter_claude_sonnet_beta
fix/docs: was missing a beta model from openrouter of claude sonnet
2024-08-21 08:31:21 -07:00
Paul Gauthier
2432cbc912 openrouter/anthropic/claude-3.5-sonnet: supports_assistant_prefill:true 2024-08-21 05:55:10 -07:00
thiswillbeyourgithub
00f7238c64 fix: was missing openrouter beta model from claude sonnet 2024-08-21 14:45:09 +02:00
Krish Dholakia
5731287f1b
Merge pull request #5221 from kiriloman/adjust-pricing-file
[PRICING] Use specific llama2 and llama3 model names in Ollama
2024-08-17 14:03:20 -07:00
Kyrylo Yefimenko
e3cd8e169b Use sepecific llama2 and llama3 model names in Ollama 2024-08-15 12:27:51 +01:00
Krrish Dholakia
1faa931f26 build(model_prices_and_context_window.json): add 'supports_assistant_prefill' to all vertex ai anthropic models 2024-08-14 14:08:12 -07:00
Krish Dholakia
4c6b14c301
Merge pull request #5203 from paul-gauthier/main
vertex_ai/claude-3-5-sonnet@20240620 support prefill
2024-08-14 14:06:20 -07:00
Aaron Bach
9d42dfb417 Update prices/context windows for Perplexity Llama 3.1 models 2024-08-14 13:20:22 -06:00
Paul Gauthier
6a32b05bb1 vertex_ai/claude-3-5-sonnet@20240620 support prefill 2024-08-14 10:14:19 -07:00
David Manouchehri
9617e578f3
(models): Add chatgpt-4o-latest. 2024-08-14 03:03:22 +00:00
Krrish Dholakia
19bb95f781 build(model_prices_and_context_window.json): add 'supports_assistant_prefill' to model info map
Closes https://github.com/BerriAI/litellm/issues/4881
2024-08-10 14:15:12 -07:00
Ishaan Jaff
c8997e3986 add cohere embed-multilingual-v2.0 2024-08-09 11:30:07 -07:00