Commit graph

18754 commits

Author SHA1 Message Date
Ishaan Jaff
80286b1691 groq add groq/llama-3.3 (#7076) 2024-12-06 21:24:11 -08:00
Ishaan Jaff
fc7a9830ab Provider Budget Routing - Get Budget, Spend Details (#7063)
* add async_get_ttl to dual cache

* add ProviderBudgetResponse

* add provider_budgets

* test_redis_get_ttl

* _init_or_get_provider_budget_in_cache

* test_init_or_get_provider_budget_in_cache

* use _init_provider_budget_in_cache

* test_get_current_provider_budget_reset_at

* doc Get Budget, Spend Details

* doc Provider Budget Routing
2024-12-06 21:14:12 -08:00
Ishaan Jaff
b2f41df818 litellm not honoring OPENAI_ORGANIZATION env var (#7066)
* fix setting organization using .env vars

* test_completion_bad_org

* test_completion_bad_org
2024-12-06 20:59:58 -08:00
Emerson Gomes
e1b703596f Correct Vertex Embedding Model Data/Prices (#7069)
* Correct embedding model prices
* Corrected max_tokens 
* Added text-embedding-005
2024-12-06 16:47:11 -08:00
Paul Maunders
8c3c1de681 feat: Add gemini-exp-1206 model configuration with 2M input tokens (#7064) 2024-12-06 14:33:51 -08:00
Krish Dholakia
92a7e8e3e9 LiteLLM Minor Fixes & Improvements (12/05/2024) (#7051)
* fix(cost_calculator.py): move to using `.get_model_info()` for cost per token calculations

ensures cost tracking is reliable - handles edge cases of parsing model cost map

* build(model_prices_and_context_window.json): add 'supports_response_schema' for select tgai models

Fixes https://github.com/BerriAI/litellm/pull/7037#discussion_r1872157329

* build(model_prices_and_context_window.json): remove 'pdf input' and 'vision' support from nova micro in model map

Bedrock docs indicate no support for micro - https://docs.aws.amazon.com/bedrock/latest/userguide/conversation-inference-supported-models-features.html

* fix(converse_transformation.py): support amazon nova tool use

* fix(opentelemetry): Add missing LLM request type attribute to spans (#7041)

* feat(opentelemetry): add LLM request type attribute to spans

* lint

* fix: curl usage (#7038)

curl -d, --data <data> is lowercase d
curl -D, --dump-header <filename> is uppercase D

references:
https://curl.se/docs/manpage.html#-d
https://curl.se/docs/manpage.html#-D

* fix(spend_tracking.py): handle empty 'id' in model response - when creating spend log

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

* fix(streaming_chunk_builder.py): handle initial id being empty string

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

* fix(anthropic_passthrough_logging_handler.py): add end user cost tracking for anthropic pass through endpoint

* docs(pass_through/): refactor docs location + add table on supported features for pass through endpoints

* feat(anthropic_passthrough_logging_handler.py): support end user cost tracking via anthropic sdk

* docs(anthropic_completion.md): add docs on passing end user param for cost tracking on anthropic sdk

* fix(litellm_logging.py): use standard logging payload if present in kwargs

prevent datadog logging error for pass through endpoints

* docs(bedrock.md): add rerank api usage example to docs

* bugfix/change dummy tool name format (#7053)

* fix viewing keys (#7042)

* ui new build

* build(model_prices_and_context_window.json): add bedrock region models to model cost map (#7044)

* bye (#6982)

* (fix) litellm router.aspeech  (#6962)

* doc Migrating Databases

* fix aspeech on router

* test_audio_speech_router

* test_audio_speech_router

* docs show supported providers on batches api doc

* change dummy tool name format

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: yujonglee <yujonglee.dev@gmail.com>

* fix: fix linting errors

* test: update test

* fix(litellm_logging.py): fix pass through check

* fix(test_otel_logging.py): fix test

* fix(cost_calculator.py): update handling for cost per second

* fix(cost_calculator.py): fix cost check

* test: fix test

* (fix) adding public routes when using custom header  (#7045)

* get_api_key_from_custom_header

* add test_get_api_key_from_custom_header

* fix testing use 1 file for test user api key auth

* fix test user api key auth

* test_custom_api_key_header_name

* build: update ui build

---------

Co-authored-by: Doron Kopit <83537683+doronkopit5@users.noreply.github.com>
Co-authored-by: lloydchang <lloydchang@gmail.com>
Co-authored-by: hgulersen <haymigulersen@gmail.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: yujonglee <yujonglee.dev@gmail.com>
2024-12-06 14:29:53 -08:00
Ishaan Jaff
56956fd6e7 (fix) adding public routes when using custom header (#7045)
* get_api_key_from_custom_header

* add test_get_api_key_from_custom_header

* fix testing use 1 file for test user api key auth

* fix test user api key auth

* test_custom_api_key_header_name
2024-12-06 14:17:10 -08:00
Ishaan Jaff
4a06108534 ui new build 2024-12-05 20:46:37 -08:00
Ishaan Jaff
a19532b7f3 fix router test_audio_speech_router 2024-12-05 20:41:44 -08:00
Ishaan Jaff
b3dce21baf ui - use session storage (#7054) 2024-12-05 20:33:33 -08:00
Ishaan Jaff
74a89f908b docs show supported providers on batches api doc 2024-12-05 14:04:36 -08:00
Ishaan Jaff
1d0fb4f435 (fix) litellm router.aspeech (#6962)
* doc Migrating Databases

* fix aspeech on router

* test_audio_speech_router

* test_audio_speech_router
2024-12-05 13:39:50 -08:00
yujonglee
2f3fc6d0d1 bye (#6982) 2024-12-05 13:38:10 -08:00
Krish Dholakia
483e260558 build(model_prices_and_context_window.json): add bedrock region models to model cost map (#7044) 2024-12-05 10:18:52 -08:00
Ishaan Jaff
38ae5901c4 ui new build 2024-12-05 08:02:09 -08:00
Ishaan Jaff
30cb07f68c fix viewing keys (#7042) 2024-12-05 08:01:09 -08:00
Krrish Dholakia
d99360a272 bump: version 1.53.6 → 1.53.7 2024-12-05 00:08:17 -08:00
Krish Dholakia
fad0f7cf64 LiteLLM Minor Fixes & Improvements (12/05/2024) (#7037)
* fix(together_ai/chat): only return response_format + tools for supported models

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

* feat(bedrock/rerank): initial working commit for bedrock rerank api support

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

* feat(bedrock/rerank): async bedrock rerank api support

Addresses https://github.com/BerriAI/litellm/issues/7021

* build(model_prices_and_context_window.json): add 'supports_prompt_caching' for bedrock models + cleanup cross-region from model list (duplicate information - lead to inconsistencies )

* docs(json_mode.md): clarify model support for json schema

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

* fix(_service_logger.py): handle dd callback in list

ensure failed spend tracking is logged to datadog

* feat(converse_transformation.py): translate from anthropic format to bedrock format

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

* fix: fix linting errors

* test: fix test
2024-12-05 00:02:31 -08:00
Ishaan Jaff
e88d369781 bump: version 1.53.5 → 1.53.6 2024-12-04 19:41:05 -08:00
Ishaan Jaff
0eef9df396 (feat) add Vertex Batches API support in OpenAI format (#7032)
* working request

* working transform

* working request

* transform vertex batch response

* add _async_create_batch

* move gcs functions to base

* fix _get_content_from_openai_file

* transform_openai_file_content_to_vertex_ai_file_content

* fix transform vertex gcs bucket upload to OAI files format

* working e2e test

* _get_gcs_object_name

* fix linting

* add doc string

* fix transform_gcs_bucket_response_to_openai_file_object

* use vertex for batch endpoints

* add batches support for vertex

* test_vertex_batches_endpoint

* test_vertex_batch_prediction

* fix gcs bucket base auth

* docs clean up batches

* docs Batch API

* docs vertex batches api

* test_get_gcs_logging_config_without_service_account

* undo change

* fix vertex md

* test_get_gcs_logging_config_without_service_account

* ci/cd run again
2024-12-04 19:40:28 -08:00
Ishaan Jaff
dd5ccdd889 add rerank-v3.5 (#7035) 2024-12-04 19:24:30 -08:00
Ishaan Jaff
6c72e314e4 (UI) Load time improvement - Sub 2s load time for Home Page ️ (#7014)
* ui fix LiteLLM_VerificationToken

* speed up ui load time for proxy admin

* undo type change

* fix _get_user_info_for_proxy_admin

* test_user_info_as_proxy_admin

* fix linting error

* fix merge conflicts
2024-12-04 17:55:26 -08:00
Ishaan Jaff
8d3ba007f2 fix application exception during init (#7027) 2024-12-04 17:53:26 -08:00
Krrish Dholakia
c6fd5ef22f docs(bedrock.md): clarify what version supports converse/invoke routes 2024-12-04 15:42:21 -08:00
Krrish Dholakia
95daf14437 docs(bedrock.md): add nova model notice 2024-12-04 15:36:48 -08:00
Ishaan Jaff
bf4f23589f docs add FAq to life of a request 2024-12-04 09:36:55 -08:00
Krrish Dholakia
1e132e97ff docs(azure.md): add proxy spend tracking for azure models to azure docs
Fixes https://github.com/BerriAI/litellm/issues/7004#issuecomment-2516644243
2024-12-04 09:08:56 -08:00
Krrish Dholakia
88f3d48574 fix(main.py): trigger new build 2024-12-04 09:00:30 -08:00
Steven Crake
0fda263c1a fix: migration job for existing db (#6792) 2024-12-04 08:40:09 -08:00
Krrish Dholakia
7b9bbd86c3 test: fix test 2024-12-03 23:12:05 -08:00
fengjiajie
cb99119005 Add prompt caching flag for Azure OpenAI gpt-4o-2024-08-06 (#7020) 2024-12-03 23:09:48 -08:00
Krrish Dholakia
6325291d4f bump: version 1.53.4 → 1.53.5 2024-12-03 23:04:28 -08:00
Krish Dholakia
a392bd9772 fix(key_management_endpoints.py): override metadata field value on up… (#7008)
* fix(key_management_endpoints.py): override metadata field value on update

allow user to override tags

* feat(__init__.py): expose new disable_end_user_cost_tracking_prometheus_only metric

allow disabling end user cost tracking on prometheus - fixes cardinality issue

* fix(litellm_pre_call_utils.py): add key/team level enforced params

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

* fix(key_management_endpoints.py): allow user to pass in `enforced_params` as a top level param on /key/generate and /key/update

* docs(enterprise.md): add docs on enforcing required params for llm requests

* Add support of Galadriel API (#7005)

* fix(router.py): robust retry after handling

set retry after time to 0 if >0 healthy deployments. handle base case = 1 deployment

* test(test_router.py): fix test

* feat(bedrock/): add support for 'nova' models

also adds explicit 'converse/' route for simpler routing

* fix: fix 'supports_pdf_input'

return if model supports pdf input on get_model_info

* feat(converse_transformation.py): support bedrock pdf input

* docs(document_understanding.md): add document understanding to docs

* fix(litellm_pre_call_utils.py): fix linting error

* fix(init.py): fix passing of bedrock converse models

* feat(bedrock/converse): support 'response_format={"type": "json_object"}'

* fix(converse_handler.py): fix linting error

* fix(base_llm_unit_tests.py): fix test

* fix: fix test

* test: fix test

* test: fix test

* test: remove duplicate test

---------

Co-authored-by: h4n0 <4738254+h4n0@users.noreply.github.com>
2024-12-03 23:03:50 -08:00
Ishaan Jaff
c17872988a queue new release 2024-12-03 20:54:25 -08:00
Ishaan Jaff
1863e7226d test_multilingual_requests 2024-12-03 20:52:19 -08:00
Ishaan Jaff
bbdbbf8217 ci/cd run release pipeline 2024-12-03 20:40:32 -08:00
Ishaan Jaff
c0c7db1e3a test_multilingual_requests deepseek 2024-12-03 20:40:02 -08:00
Ishaan Jaff
4b9487ebc5 bump: version 1.53.3 → 1.53.4 2024-12-03 20:33:40 -08:00
Ishaan Jaff
982a137ba0 (fix) 'utf-8' codec can't encode characters error on OpenAI (#7018)
* test_openai_multilingual

* pin httpx

* fix openai pyproject

* test_multilingual_requests

* TestOpenAIChatCompletion

* fix test anthropic completion
2024-12-03 20:33:14 -08:00
Ishaan Jaff
54407b4592 (refactor) - migrate router.deployment_callback_on_success to use StandardLoggingPayload (#7015)
* migrate deployment_callback_on_success to use SLP

* test_deployment_callback_on_success
2024-12-03 20:29:25 -08:00
Ishaan Jaff
93c419868e (fix) allow gracefully handling DB connection errors on proxy (#7017)
* fix _handle_failed_db_connection_for_get_key_object

* _handle_failed_db_connection_for_get_key_object

* test_auth_not_connected_to_db
2024-12-03 19:48:51 -08:00
Ishaan Jaff
42ef6d08c6 (UI) Sub 1s Internal User Tab load time (#7007)
* fix - use 1 DB query

* fix /user/list
2024-12-03 16:44:45 -08:00
Ishaan Jaff
aacae55940 fix - data dog (#7013) 2024-12-03 16:43:23 -08:00
Krrish Dholakia
2f19eac22e ci: fix order of question on issue template 2024-12-03 12:27:55 -08:00
Krrish Dholakia
f4247c7ede build: fix test 2024-12-03 12:25:36 -08:00
Krrish Dholakia
42c28b921a build(label-mlops.yml): fix check 2024-12-03 12:23:31 -08:00
Krrish Dholakia
1edfb4b718 build(label-mlops.yml): add tag to mlops user requests 2024-12-03 12:20:48 -08:00
Ishaan Jaff
1afcc21524 ci/cd queue release 2024-12-03 12:09:28 -08:00
Ishaan Jaff
b691225ba1 fix testing - langfuse apis are flaky, we unit test team / key based logging in test_langfuse_unit_tests.py 2024-12-03 11:24:36 -08:00
Ishaan Jaff
1a113509de fix test_completion_fine_tuned_model 2024-12-03 08:18:54 -08:00