Commit Graph

18570 Commits

Author SHA1 Message Date
Ishaan Jaff 7d4a1cb4e2 refactor - use consistent file naming convention AI21/ -> ai21 (#7090)
* fix refactor - use consistent file naming convention

* ci/cd run again

* fix naming structure
2024-12-07 21:46:34 -08:00
Ishaan Jaff a6a7accce6 fix llama-3.3-70b-versatile 2024-12-07 20:19:02 -08:00
Ishaan Jaff 191a0fefbc ci/cd queue new release v1.54.0 2024-12-07 19:09:57 -08:00
Ishaan Jaff 19f1425232 litellm db fixes LiteLLM_UserTable (#7089) 2024-12-07 19:08:37 -08:00
Ishaan Jaff 09ae395f91 fix deepinfra 2024-12-07 19:07:38 -08:00
Ishaan Jaff 0697aeaa91 bump: version 1.53.9 → 1.54.0 2024-12-07 19:00:53 -08:00
ali sayyah 13213b6174 added deepinfra/Meta-Llama-3.1-405B-Instruct (#7084) 2024-12-07 18:58:28 -08:00
Ishaan Jaff aeb561213f (Feat) Add StructuredOutputs support for Fireworks.AI (#7085)
* fix model cost map fireworks ai "supports_response_schema": true,

* fix supports_response_schema

* fix map openai params fireworks ai

* test_map_response_format

* test_map_response_format
2024-12-07 18:44:41 -08:00
Ishaan Jaff c33cebbed0 (bug fix) SpendLogs update DB catch all possible DB errors for retrying (#7082)
* catch DB_CONNECTION_ERROR_TYPES

* fix DB retry mechanism for SpendLog updates

* use DB_CONNECTION_ERROR_TYPES in auth checks

* fix exp back off for writing SpendLogs

* use _raise_failed_update_spend_exception to ensure errors print as NON blocking

* test_update_spend_logs_multiple_batches_with_failure
2024-12-07 15:59:53 -08:00
Yuki Watanabe 581712d6e7 Add MLflow to the side bar (#7031)
Signed-off-by: B-Step62 <yuki.watanabe@databricks.com>
2024-12-07 14:30:32 -08:00
Ishaan Jaff d4c52e2921 (feat) Track custom_llm_provider in LiteLLMSpendLogs (#7081)
* add custom_llm_provider to SpendLogsPayload

* add custom_llm_provider to SpendLogs

* add custom llm provider to SpendLogs payload

* test_spend_logs_payload
2024-12-07 13:40:22 -08:00
Krrish Dholakia 0e39cb58d8 bump: version 1.53.8 → 1.53.9 v1.53.9 2024-12-06 23:10:41 -08:00
Krish Dholakia 19a4273fda feat(langfuse/): support langfuse prompt management (#7073)
* feat(langfuse/): support langfuse prompt management

Initial working commit for langfuse prompt management support

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

* test: update test

* fix(litellm_logging.py): suppress linting error
2024-12-06 23:10:22 -08:00
Krish Dholakia e4493248ae Litellm dev 12 06 2024 (#7067)
* fix(edit_budget_modal.tsx): call `/budget/update` endpoint instead of `/budget/new`

allows updating existing budget on ui

* fix(user_api_key_auth.py): support cost tracking for end user via jwt field

* fix(presidio.py): support pii masking on sync logging callbacks

enables masking before logging to langfuse

* feat(utils.py): support retry policy logic inside '.completion()'

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

* fix(utils.py): support retry by retry policy on async logic as well

* fix(handle_jwt.py): set leeway default leeway value

* test: fix test to handle jwt audience claim
2024-12-06 22:44:18 -08:00
Ishaan Jaff ba1e6fe7b7 bump: version 1.53.7 → 1.53.8 v1.53.8 2024-12-06 21:32:52 -08:00
Ishaan Jaff d43aa6f472 (feat) Allow enabling logging message / response for specific virtual keys (#7071)
* redact_message_input_output_from_logging

* initialize_standard_callback_dynamic_params

* allow dynamically opting out of redaction

* test_redact_msgs_from_logs_with_dynamic_params

* fix AddTeamCallback

* _get_turn_off_message_logging_from_dynamic_params

* test_global_redaction_with_dynamic_params

* test_dynamic_turn_off_message_logging

* docs Disable/Enable Message redaction

* fix doe qual check

* _get_turn_off_message_logging_from_dynamic_params
2024-12-06 21:25:36 -08:00
Ishaan Jaff 4d90e8ad62 groq add groq/llama-3.3 (#7076) 2024-12-06 21:24:11 -08:00
Ishaan Jaff 87ca62943b 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 aaa4d4178a 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 04d558e75f 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 c3d1a3f903 feat: Add gemini-exp-1206 model configuration with 2M input tokens (#7064) 2024-12-06 14:33:51 -08:00
Krish Dholakia 816f0ef8d2 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 14b7f25d7d (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 7e0680cf94 ui new build 2024-12-05 20:46:37 -08:00
Ishaan Jaff aedf81ef1c fix router test_audio_speech_router 2024-12-05 20:41:44 -08:00
Ishaan Jaff 46773c01d5 ui - use session storage (#7054) 2024-12-05 20:33:33 -08:00
Ishaan Jaff 0c40dd7199 docs show supported providers on batches api doc 2024-12-05 14:04:36 -08:00
Ishaan Jaff fb1ec4b6be (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 1eb9b4ee13 bye (#6982) 2024-12-05 13:38:10 -08:00
Krish Dholakia 5a81bcd88c 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 ee6d01cc0b ui new build v1.53.7.dev4 2024-12-05 08:02:09 -08:00
Ishaan Jaff 7ec9c362a6 fix viewing keys (#7042) 2024-12-05 08:01:09 -08:00
Krrish Dholakia 2c151413e5 bump: version 1.53.6 → 1.53.7 v1.53.7-stable v1.53.7 2024-12-05 00:08:17 -08:00
Krish Dholakia 61b35c12bb 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 12dfd14b52 bump: version 1.53.5 → 1.53.6 v1.53.6 2024-12-04 19:41:05 -08:00
Ishaan Jaff 84db69d4c4 (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 6cad9c58ac add rerank-v3.5 (#7035) 2024-12-04 19:24:30 -08:00
Ishaan Jaff 0b483078c9 (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 8c4b1de69f fix application exception during init (#7027) 2024-12-04 17:53:26 -08:00
Krrish Dholakia d37fbc2d59 docs(bedrock.md): clarify what version supports converse/invoke routes 2024-12-04 15:42:21 -08:00
Krrish Dholakia 61192d1fea docs(bedrock.md): add nova model notice 2024-12-04 15:36:48 -08:00
Ishaan Jaff 3262cd1a61 docs add FAq to life of a request 2024-12-04 09:36:55 -08:00
Krrish Dholakia ec2503b7cb 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 07dbe64389 fix(main.py): trigger new build v1.53.5 2024-12-04 09:00:30 -08:00
Steven Crake e74b35fe70 fix: migration job for existing db (#6792) 2024-12-04 08:40:09 -08:00
Krrish Dholakia cda6691a7f test: fix test 2024-12-03 23:12:05 -08:00
fengjiajie 866ec245f5 Add prompt caching flag for Azure OpenAI gpt-4o-2024-08-06 (#7020) 2024-12-03 23:09:48 -08:00
Krrish Dholakia e0e993f4a3 bump: version 1.53.4 → 1.53.5 2024-12-03 23:04:28 -08:00
Krish Dholakia 6bb934c0ac 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 d558b643be queue new release v1.53.4 2024-12-03 20:54:25 -08:00