Commit Graph
19715 Commits
Author SHA1 Message Date
Sunny WanandGitHub ce55a2d06e Merge branch 'BerriAI:main' into main 2025-03-04 18:00:58 -05:00
Sunny Wan 02dd126be9 added documentation for snowflake 2025-03-04 17:13:00 -05:00
Ishaan Jaff 4c8b4fefc9 Revert "(UI) - Improvements to session handling logic (#8970)"
This reverts commit c015fb34f1.
2025-03-04 13:29:08 -08:00
Ishaan Jaff 772c2b1fff Revert "ui new build"
This reverts commit 94563ab1e7.
2025-03-04 13:28:54 -08:00
Krrish Dholakia e40218513b docs(data_security.md): cleanup docs 2025-03-04 06:15:15 -08:00
Krrish Dholakia 5f1cac8930 docs(data_security.md): update docs 2025-03-04 06:14:54 -08:00
Krrish Dholakia 9baf4f7e56 fix: fix linting errors 2025-03-04 06:13:53 -08:00
Krish DholakiaandGitHub b5beed5812 Litellm dev 03 01 2025 p2 (#8944)
* test(test_router_tag_routing.py): add unit test for tag-based routing on embeddings

* fix(router.py): pass request kwargs on async embeddings to async_get_available_deployment function

* fix(router.py): require request kwargs to always be passed in

ensures tag-based routing always works, across endpoints

* feat(langfuse_prompt_management.py): support using prompt management per langfuse project with key/team based logging

* fix: fix linting error

* fix: fix test

* fix: fix test

* fix: fix test

* fix: fix linting error
2025-03-03 23:06:11 -08:00
Krrish Dholakia 8ea3d4c046 build: merge litellm_dev_03_01_2025_p2 2025-03-03 23:05:41 -08:00
Krrish Dholakia 87dd195b51 bump: version 1.62.2 → 1.62.3 2025-03-03 23:00:24 -08:00
Krish DholakiaandGitHub 2fc6262675 fix(route_llm_request.py): move to using common router, even for clie… (#8966)
* fix(route_llm_request.py): move to using common router, even for client-side credentials

ensures fallbacks / cooldown logic still works

* test(test_route_llm_request.py): add unit test for route request

* feat(router.py): generate unique model id when clientside credential passed in

Prevents cooldowns for api key 1 from impacting api key 2

* test(test_router.py): update testing to ensure original litellm params not mutated

* fix(router.py): upsert clientside call into llm router model list

enables cooldown logic to work accurately

* fix: fix linting error

* test(test_router_utils.py): add direct test for new util on router
2025-03-03 22:57:08 -08:00
Ishaan Jaff 94563ab1e7 ui new build 2025-03-03 22:21:31 -08:00
Ishaan JaffandGitHub c015fb34f1 (UI) - Improvements to session handling logic (#8970)
* add cookieUtils

* use utils for clearing cookies

* on logout use clearTokenCookies

* ui use correct clearTokenCookies

* navbar show userEmail on UserID page

* add timestamp on token cookie

* update generate_authenticated_redirect_response

* use common getAuthToken

* fix clearTokenCookies

* fixes for get auth token

* fix invitation link sign in logic

* Revert "fix invitation link sign in logic"

This reverts commit 30e5308cb3223981c715e723cdd3a6d2ee3aaa4b.

* fix getAuthToken

* update setAuthToken

* fix ui session handling

* fix ui session handler
2025-03-03 22:17:21 -08:00
Ishaan JaffandGitHub 79ed4b626e (UI) Fix session handling with cookies (#8969)
* add cookieUtils

* use utils for clearing cookies

* on logout use clearTokenCookies

* ui use correct clearTokenCookies

* navbar show userEmail on UserID page
2025-03-03 21:20:59 -08:00
Sunny WanandGitHub f2c2266fd7 Merge branch 'BerriAI:main' into main 2025-03-03 21:37:43 -05:00
Sunny Wan bdd03405fe Removed unnecessary comments 2025-03-03 18:18:24 -05:00
Sunny Wan 4d61ac5f13 Added models to model_prices_and_context 2025-03-03 18:11:33 -05:00
Sunny Wan c413686ead wrote tests for snowflake 2025-03-03 17:49:11 -05:00
Krrish Dholakia 19411fbcc7 bump: version 1.62.1 → 1.62.2 2025-03-03 14:34:48 -08:00
Krish DholakiaandGitHub 94d28d59e4 Fix deepseek 'reasoning_content' error (#8963)
* fix(streaming_handler.py): fix deepseek reasoning content streaming

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

* test(test_streaming_handler.py): add unit test to streaming handle 'is_chunk_non_empty' function

ensures 'reasoning_content' is handled correctly
2025-03-03 14:34:10 -08:00
Krrish Dholakia b9bddac776 test: fix test v1.62.1-nightly 2025-03-03 13:33:39 -08:00
Sunny Wan 162ea295e9 [CHORE] Removed old code 2025-03-03 01:45:13 -05:00
Sunny Wan 61ee71745a [CHORE] Added proper typing 2025-03-03 01:42:48 -05:00
Sunny WanandGitHub 4f63e9a182 Merge branch 'BerriAI:main' into main 2025-03-03 01:35:04 -05:00
Sunny Wan b87704cc34 [CHORE] Fixed some style issues and leaks 2025-03-03 01:34:44 -05:00
Krrish Dholakia db83cbe5c0 build(model_prices_and_context_window.json): add new tracking for anthropic via invoke - clarify it does not support pdf input unlike converse 2025-03-02 22:31:31 -08:00
Sunny Wan fd090c8043 [FEAT] Added snowflake completion provider 2025-03-03 01:20:00 -05:00
Michael SchmidandGitHub 842d8dec09 quote DailyTagSpend in order to look for the right View (#8947)
PostgreSQL treats unquoted identifiers as lowercase by default. In our query, we're using "DailyTagSpend" (with capital letters), but PostgreSQL will be looking for "dailytagspend" (all lowercase).
2025-03-02 21:36:55 -08:00
54b7f17ca6 fix(proxy_server.py): fix setting router redis cache, if cache enable… (#8859)
* fix(proxy_server.py): fix setting router redis cache, if cache enabled on litellm_settings

enables configurations like namespace to just work

* fix(redis_cache.py): fix key for async increment, to use the set namespace

prevents collisions if redis instance shared across environments

* fix load tests on litellm release notes

* fix caching on main branch (#8858)

* fix(streaming_handler.py): fix is delta empty check to handle empty str

* fix(streaming_handler.py): fix delta chunk on final response

* [Bug]: Deepseek error on proxy after upgrading to 1.61.13-stable (#8860)

* fix deepseek error

* test_deepseek_provider_async_completion

* fix get_complete_url

* bump: version 1.61.17 → 1.61.18

* bump: version 1.61.18 → 1.61.19

* vertex ai anthropic thinking param support (#8853)

* fix(vertex_llm_base.py): handle credentials passed in as dictionary

* fix(router.py): support vertex credentials as json dict

* test(test_vertex.py): allows easier testing

mock anthropic thinking response for vertex ai

* test(vertex_ai_partner_models/): don't remove "@" from model

breaks anthropic cost calculation

* test: move testing

* fix: fix linting error

* fix: fix linting error

* fix(vertex_ai_partner_models/main.py): split @ for codestral model

* test: fix test

* fix: fix stripping "@" on mistral models

* fix: fix test

* test: fix test

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-03-02 08:39:06 -08:00
Krrish Dholakia a63eb58f1b fix(anthropic/chat/transformation.py): fix headers to be a set
avoid duplicates
2025-03-02 08:36:43 -08:00
bea30f550f Fix prometheus metrics w/ custom metrics + Handle sending image_url as str to openai (#8935)
* fix(prometheus.py): fix prometheus team metric to handle custom metrics

* fix(prometheus.py): fix prometheus metrics to handle custom metadata + team id

* fix(gpt_transformation.py): handle image url being sent as str to openai

* fix: fix unit testing

* fix(o_series_transformation.py): support passing image url as string for o models as well

* (UI) Error Logs improvements - Store Raw proxy server request for success and failure (#8917)

* ui render error logs

* add proxy_server_request to spend logs metadata

* _add_proxy_server_request_to_metadata

* proxy track cost callback fixes

* _add_proxy_server_request_to_metadata

* test spend logs

* test_async_post_call_failure_hook

* (UI) - Allow Internal Users to View their own logs (#8933)

* ui fix leftnav, allow internal users to view their own logs

* pass user_id in uiSpendLogs call

* ui filter logs for internal user

* fix internal users page

* ui show correct message when store prompts is disabled

* fix internal user logs

* test_ui_view_spend_logs_with_user_id

* test spend management endpoint

* ui new build

* Add `supports_pdf_input: true` for specific Bedrock Claude models (#8655)

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: Takashi Iwamoto <takashi.iwamoto@enechange.co.jp>
2025-03-02 08:32:21 -08:00
Krrish Dholakia 4418e6dd14 build: merge branch 2025-03-02 08:31:57 -08:00
Takashi IwamotoandGitHub f63cf00306 Add supports_pdf_input: true for specific Bedrock Claude models (#8655) 2025-03-02 08:14:05 -08:00
Ishaan Jaff 88b1e315c8 ui new build 2025-03-01 17:52:14 -08:00
Ishaan JaffandGitHub df095b6022 (UI) - Allow Internal Users to View their own logs (#8933)
* ui fix leftnav, allow internal users to view their own logs

* pass user_id in uiSpendLogs call

* ui filter logs for internal user

* fix internal users page

* ui show correct message when store prompts is disabled

* fix internal user logs

* test_ui_view_spend_logs_with_user_id

* test spend management endpoint
2025-03-01 17:26:02 -08:00
Ishaan JaffandGitHub 1008da7c41 (UI) Error Logs improvements - Store Raw proxy server request for success and failure (#8917)
* ui render error logs

* add proxy_server_request to spend logs metadata

* _add_proxy_server_request_to_metadata

* proxy track cost callback fixes

* _add_proxy_server_request_to_metadata

* test spend logs

* test_async_post_call_failure_hook
2025-03-01 16:26:47 -08:00
Ishaan JaffandGitHub bc9b3e4847 (Bug fix) - don't log messages in model_parameters in StandardLoggingPayload (#8932)
* define model param helper

* use ModelParamHelper

* get_standard_logging_model_parameters

* fix code quality

* get_standard_logging_model_parameters

* StandardLoggingPayload

* test_get_kwargs_for_cache_key

* test_langsmith_key_based_logging

* fix code qa

* fix linting
2025-03-01 13:39:45 -08:00
Ishaan Jaff ee7cd60fdb Revert "(bug fix) - don't log messages, prompt, input in model_parameters in StandardLoggingPayload (#8923)"
This reverts commit a119cb420b.
2025-03-01 11:05:33 -08:00
Krrish Dholakia 6af37d66b5 docs: fix dates 2025-03-01 11:00:46 -08:00
Krish DholakiaandGitHub 69593cd7db docs(index.md): add demo instance to docs for easy testing (#8931) 2025-03-01 10:59:50 -08:00
Ishaan JaffandGitHub 6fc9aa1612 (bug fix) - dd tracer, only send traces when user opts into sending dd-trace (#8928)
* fix dd tracing null tracer bug

* fix dd tracing

* fix base aws llm

* test_should_use_dd_tracer
2025-03-01 10:53:36 -08:00
Krish DholakiaandGitHub ecb97ff65e Litellm stable release notes v1 61 20 (#8929)
* docs(index.md): add initial release notes

* docs(infinity.md): update docs with supported cohere rerank params

* style: cleanup

* docs(vllm.md): add doc on sending video to vllm

* docs(index.md): add vllm video logic to release notes

* docs(reasoning_content.md): cleanup docs
2025-03-01 10:45:40 -08:00
Ishaan JaffandGitHub a119cb420b (bug fix) - don't log messages, prompt, input in model_parameters in StandardLoggingPayload (#8923)
* fix _get_model_parameters

* test litellm logging

* test litellm logging
2025-03-01 10:27:24 -08:00
Ishaan JaffandGitHub b72c48cefa ui remove search button on internal users tab that does not (#8926) 2025-03-01 10:25:16 -08:00
Ishaan JaffandGitHub 5508239375 patch - auth checks for model access (#8924) 2025-03-01 10:11:44 -08:00
Ishaan Jaff 428ed1360c fix overly verbose non blocking error on dd get_request_response_payload 2025-03-01 10:09:18 -08:00
Ishaan JaffandGitHub ba5bdce50a Update README.md 2025-03-01 07:40:55 -08:00
c1527ebf52 UI - Allow admin to control default model access for internal users (#8912)
* fix(create_user_button.tsx): allow admin to set models user has access to, on invite

Enables controlling model access on invite

* feat(auth_checks.py): enforce 'no-model-access' special model name on backend

prevent user from calling models if default key has no model access

* fix(chat_ui.tsx): allow user to input custom model

* fix(chat_ui.tsx): pull available models based on models key has access to

* style(create_user_button.tsx): move default model inside 'personal key creation' accordion

* fix(chat_ui.tsx): fix linting error

* test(test_auth_checks.py): add unit-test for special model name

* docs(internal_user_endpoints.py): update docstring

* fix test_moderations_bad_model

* Litellm dev 02 27 2025 p6 (#8891)

* fix(http_parsing_utils.py): orjson can throw errors on some emoji's in text, default to json.loads

* fix(sagemaker/handler.py): support passing model id on async streaming

* fix(litellm_pre_call_utils.py): Fixes https://github.com/BerriAI/litellm/issues/7237

* Fix calling claude via invoke route + response_format support for claude on invoke route (#8908)

* fix(anthropic_claude3_transformation.py): fix amazon anthropic claude 3 tool calling transformation on invoke route

move to using anthropic config as base

* fix(utils.py): expose anthropic config via providerconfigmanager

* fix(llm_http_handler.py): support json mode on async completion calls

* fix(invoke_handler/make_call): support json mode for anthropic called via bedrock invoke

* fix(anthropic/): handle 'response_format: {"type": "text"}` + migrate amazon claude 3 invoke config to inherit from anthropic config

Prevents error when passing in 'response_format: {"type": "text"}

* test: fix test

* fix(utils.py): fix base invoke provider check

* fix(anthropic_claude3_transformation.py): don't pass 'stream' param

* fix: fix linting errors

* fix(converse_transformation.py): handle response_format type=text for converse

* converse_transformation: pass 'description' if set in response_format (#8907)

* test(test_bedrock_completion.py): e2e test ensuring tool description is passed in

* fix(converse_transformation.py): pass description, if set

* fix(transformation.py): Fixes https://github.com/BerriAI/litellm/issues/8767#issuecomment-2689887663

* Fix bedrock passing `response_format: {"type": "text"}` (#8900)

* fix(converse_transformation.py): ignore type: text, value in response_format

no-op for bedrock

* fix(converse_transformation.py): handle adding response format value to tools

* fix(base_invoke_transformation.py): fix 'get_bedrock_invoke_provider' to handle cross-region-inferencing models

* test(test_bedrock_completion.py): add unit testing for bedrock invoke provider logic

* test: update test

* fix(exception_mapping_utils.py): add context window exceeded error handling for databricks provider route

* fix(fireworks_ai/): support passing tools + response_format together

* fix: cleanup

* fix(base_invoke_transformation.py): fix imports

* (Feat) - Show Error Logs on LiteLLM UI  (#8904)

* fix test_moderations_bad_model

* use async_post_call_failure_hook

* basic logging errors in DB

* show status on ui

* show status on ui

* ui show request / response side by side

* stash fixes

* working, track raw request

* track error info in metadata

* fix showing error / request / response logs

* show traceback on error viewer

* ui with traceback of error

* fix async_post_call_failure_hook

* fix(http_parsing_utils.py): orjson can throw errors on some emoji's in text, default to json.loads

* test_get_error_information

* fix code quality

* rename proxy track cost callback test

* _should_store_errors_in_spend_logs

* feature flag error logs

* Revert "_should_store_errors_in_spend_logs"

This reverts commit 7f345df47762ff3be04e6fde2f13e70019ede4ee.

* Revert "feature flag error logs"

This reverts commit 0e90c022bbea3550f169118d81e60d711a4024fe.

* test_spend_logs_payload

* fix OTEL log_db_metrics

* fix import json

* fix ui linting error

* test_async_post_call_failure_hook

* test_chat_completion_bad_model_with_spend_logs

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>

* ui new build

* test_chat_completion_bad_model_with_spend_logs

* docs(release_cycle.md): document release cycle

* bump: version 1.62.0 → 1.62.1

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-02-28 23:23:03 -08:00
Krrish Dholakia fecc02dd45 bump: version 1.62.0 → 1.62.1 2025-02-28 23:12:07 -08:00
Krrish Dholakia e6711235a2 docs(release_cycle.md): document release cycle 2025-02-28 23:05:29 -08:00