Commit Graph

3864 Commits

Author SHA1 Message Date
Krrish Dholakia 68fe7d245d docs(index.md): update doc 2025-07-11 08:08:47 -07:00
Krish Dholakia 569ddde9fe [Enterprise] Support tag based mode for guardrails (#12508)
* feat(custom_guardrail.py): allow admin to run guardrails on specific modes based on request tags

Enables pre-call checks for openwebui but logging for claude code guardrails

* refactor(custom_guardrail.py): move tag based mode to enterprise

* test(test_custom_guardrail.py): update test

* feat(quick_start.md): add doc on tag-based guardrail mode

* docs(quick_start.md): cleanup doc

* docs: cleanup

* docs(openweb_ui.md): add tutorial to doc

* fix(custom_guardrail.py): ensure user is premium user

* test: update test
2025-07-10 22:27:30 -07:00
minghao bee63a1ae7 Added dashscope (alibaba's cloud - qwen) as a provider (#12361)
* Added dashscope as a provider

* Fix some leftover references on nebius

* Porting the dashscope api endpoit international version

* explicit tool_choice = True in config
2025-07-10 18:09:26 -07:00
Rayshard Thompson 8aa616698e Fix typo and import required types (#12487) 2025-07-10 18:03:42 -07:00
Ishaan Jaff b0003bd03c Feat(bedrock): support api key authentication for AWS Bedrock API (#12426) (#12495)
* add support of bearer token for bedrock integration

* fix linting issue

* fix type checking issue

* reoder arguments to address type checking issue

* switch to use get_secret_str to fetch env variable

Co-authored-by: 0x-fang <fanggong@amazon.com>
2025-07-10 15:12:17 -07:00
Ishaan Jaff 610d56ae5d docs stable release 2025-07-10 14:53:29 -07:00
Krish Dholakia 07e8609edb Resolve model group alias on Auth + /v1/messages Fallback support (#12440)
* fix(auth_checks.py): resolve a model group alias when key has access to underlying model

Fixes LIT-293

* feat(anthropic/): add mock_response to anthropic /v1/messages

makes it easy to test fallback logic

* fix(router.py): support fallbacks on /v1/messages

adds working fallbacks on generic api route

* refactor(router.py): point _ageneric_api_call_with_fallbacks to updated function

* test: add unit test for new helper on router

* fix(router.py): use correct metadata variable name

* fix(router.py): use correct metadata field

* docs(config_settings.md): document new param
2025-07-09 22:27:55 -07:00
Krish Dholakia 635367b020 Litellm dev 07 09 2025 p1 (#12462)
* fix(db_spend_update_writer.py): fix db query

* fix(litellm_pre_call_utils.py): support passing anthropic-beta headers when 'forward_client_headers_to_llm_api' is True

allows user to pass along extra headers to vertex ai anthropic models

* docs(config_settings.md): update docs
2025-07-09 21:46:15 -07:00
Ishaan Jaff 35bfa7c9ee [MCP Gateway] - Allow using custom post call MCP hook for cost tracking (#12469)
* add async_post_mcp_tool_call_hook to custom logger

* instrument call_mcp_tool

* add async_post_mcp_tool_call_hook

* fixes for MCP tests

* test fix MCP tests

* allow adding custom cost for MCP response

* fix LiteLLM_MCPTextContent

* add MCPPostCallResponseObject

* fix _handle_local_mcp_tool

* async_post_mcp_tool_call_hook

* fix typing loc

* fix call_mcp_tool

* fix server.py

* fix MCPPostCallResponseObject

* async_post_mcp_tool_call_hook

* docs mcp cost hook

* fix import path
2025-07-09 18:41:08 -07:00
Ishaan Jaff 17ea770ab5 [Feat] SSO - Allow users to run a custom sso login handler (#12465)
* fix return_ui_sso_redirect_response_after_sign_in

* add CustomSSOLoginHandler

* add handle_custom_ui_sso_sign_in

* fix handle_custom_ui_sso_sign_in

* fixes for /sso/key/generate

* add test_handle_custom_ui_sso_sign_in_success

* fixed for loading config

* add example custom handler

* test_custom_ui_sso_sign_in_handler_config_loading

* docs - custom sso

* move to enterprise folder

* EnterpriseCustomSSOHandler

* handle_custom_ui_sso_sign_in

* docs custom sso

* docs sso

* docs custom sso

* get_redirect_response_from_openid

* fix mock tests
2025-07-09 16:36:30 -07:00
Ishaan Jaff afd382d09f [Feat] MCP Gateway - Allow customizing what client side header to use (#12460)
* add _get_mcp_auth_header_from_headers

* test_process_mcp_request_with_custom_auth_header

* Using a different Authentication Header

* fix customize MCP Auth header name
2025-07-09 12:30:20 -07:00
Ishaan Jaff ce2934349f [Feat] Add XInference Image Generation API Provider (#12439)
* add XInferenceImageGenerationConfig

* add get_xinference_image_generation_config

* test_xinference_image_generation

* docs Image Generation xinference

* docs inference

* docs xinference

* fix xinference img gen
2025-07-08 21:17:38 -07:00
Dmitriy Alergant f7d5958dca Update guardrails_ai.md (#12356)
Fix the header to highlight the website guardrailsai.com which is the real name/website of this provider.

Guardrails.ai leads to some different website, which is confusing.
2025-07-08 16:23:42 -07:00
Krrish Dholakia 9fa9d547c0 docs(index.md): document known issues 2025-07-08 10:39:51 -07:00
Ishaan Jaff 08f3b06d82 [Feat] Bump langfuse python SDK version and LANGFUSE_TRACING_ENVIRONMENT (#12376)
* bump langfuse to 2.59.7

* _set_langfuse_specific_attributes

* fix files

* test_set_langfuse_environment_attribute
2025-07-07 15:53:43 -07:00
Krrish Dholakia 88a7b40f86 docs(index.md): update note with all guardrails now on UI 2025-07-06 21:55:06 -07:00
Krrish Dholakia d50a28d424 docs(index.md): add to release note 2025-07-06 21:54:02 -07:00
Krrish Dholakia 4d718f97ef docs(azure_content_guardrails.md): add doc on azure content guardrails 2025-07-06 21:42:58 -07:00
Krrish Dholakia 55ecb543f2 docs(azure_content_guardrails.md): add azure content guardrails doc 2025-07-06 21:39:03 -07:00
Ishaan Jaff 10c704ccb9 docs release notes 2025-07-05 21:24:09 -07:00
Krish Dholakia dbe37b542d Litellm dev 07 05 2025 p4 (#12350)
* fix(key_management_endpoints.py): add new `/key/service_account/generate` endpoint

enables controlling team member permissions for creating service account keys

* refactor(ui/): use new /key/service-account/generate endpoint when creating keys on UI

enables team member permissions for service accounts

* fix(permission_definitions.tsx): add permission for creating service accounts on UI

* fix(key_management_endpoints.py): ignore user id for service account keys

* fix(key_management_endpoints.py): improve docstring

* docs(service_accounts.md): update docs
2025-07-05 19:38:42 -07:00
Krish Dholakia bda9eecd45 Litellm dev 07 05 2025 p3 (#12349)
* refactor(aim.py): refactor to support adding aim guardrails on UI

* fix(base.py): add ui_friendly_name to config model

* feat(ui/): support loading new guardrails from backend api call

removes need to onboard each guardrail to ui

* fix: don't show optional params if not set and don't show ui_friendly_name (internal param0

* fix(ui/add_guardrail_form.tsx): ensure dynamic provider value is used

* fix(ui/): just one-time update the provider map dictionary

* fix(ui/): show masked api base / api key on guardrail update

* refactor(aporia_ai/): refactor to show on UI

* feat(aporia_ai/): add aporia ai guardrail to UI

* refactor(guardrails_ai/): refactor to add via UI

* refactor(lasso.py): refactor to enable adding lasso guardrails via UI

* feat(pangea.py): add pangea guardrail on UI

* feat(panw): add panw prisma airs through UI

* test: update tests

* fix: fix ruff linting error

* test: update tests

* fix: add missing docs

* fix: fix guardrail init

* fix: suppress linting errors

* fix(proxy_server.py): fix linting error
2025-07-05 18:44:00 -07:00
Ishaan Jaff 54eb00ddfb docs team / Key Based Logging on UI 2025-07-05 18:26:51 -07:00
Ishaan Jaff eabe0c5e7f docs - team based logging 2025-07-05 17:55:18 -07:00
Ishaan Jaff 2fc6896b0a docs refactor 2025-07-05 16:40:37 -07:00
Ishaan Jaff 8637142fd5 new img 2025-07-05 16:27:46 -07:00
Ishaan Jaff 303c4bd628 docs - 1.74.0.rc (#12347)
* doc updates

* doc fixes

* doc fixes

* docs fix

* doc fix

* doc clean up

* doc fixes

* cleanup
2025-07-05 13:17:51 -07:00
Ishaan Jaff 912e5084e5 docs fix 2025-07-05 11:25:31 -07:00
Ishaan Jaff a3c88c5207 docs add rerank 2025-07-05 11:19:24 -07:00
Ishaan Jaff 6ce8f5692e [Docs] vertex deepseek (#12345)
* docs vertex

* Vertex AI - Anthropic (Claude)
2025-07-05 11:14:41 -07:00
Ishaan Jaff 9991a813e2 doc fix 2025-07-05 10:54:00 -07:00
Ishaan Jaff 92a3f263d4 doc update 2025-07-05 10:53:22 -07:00
Ishaan Jaff 0e62803c0e v1.74.0.rc docs (#12344)
* cleanup

* fixes

* doc fix

* doc fix

* fixes release note

* docs

* docs

* v1.74.0
2025-07-05 10:44:38 -07:00
Ishaan Jaff eafad0ecc5 fix docker run cmd 2025-07-05 10:17:03 -07:00
Ishaan Jaff 738db9336e [Feat] JWT - Sync user roles and team memberships when JWT Auth is used (#11994)
* add JWTLiteLLMRoleMap

* test_sync_user_role_and_teams

* add sync_user_role_and_teams

* test_sync_user_role_and_teams

* fix types

* Sync User Roles and Teams with IDP

* Add test for JWT role mapping to LiteLLM roles
2025-07-05 08:58:34 -07:00
Ishaan Jaff 98db2d9fb9 add aiml 2025-07-05 07:56:51 -07:00
Jugal D. Bhatt 529f67f544 Add mcp server segregation comma separated support (#12326)
* add mcp comma separated support

* dont support legacy json array

* lint
2025-07-05 00:08:43 -07:00
Jugal D. Bhatt b2464a2b33 ssl_cert_error (#12327) 2025-07-04 13:21:29 -07:00
Ishaan Jaff 9da97eb939 add new env vars to docs 2025-07-04 13:13:34 -07:00
Ishaan Jaff c3e673b627 [Feat] Add github co-pilot as a new LLM API provider (#12325)
* Litellm dev 03 05 2025 contributor prs (#9079)

* feat: add support for copilot provider

* test: add tests for github copilot

* chore: clean up github copilot authenticator

* test: add test for github copilot authenticator

* test: add test for github copilot for sonnet 3.7 thought model

* Fix #7629 - Add tzdata package to Dockerfile (#8915)

* Add tzdata package to Dockerfile

* Move tzdata to python requirement.txt

* feat: add support for copilot provider (#8577)

* feat: add support for copilot provider

* test: add tests for github copilot

* chore: clean up github copilot authenticator

* test: add test for github copilot authenticator

* test: add test for github copilot for sonnet 3.7 thought model

---------

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

* feat: add model information for copilot models

* fix: fix linting errors

* test: remove integration test for github_copilot + fix misisng mock

* fix: use print to make sure the logger message shown

* test: remove debug print

* fix lint (#11112)

* Add init files to make test directories Python packages and update import paths in test_token_counter.py (#11119)

* Update litellm/model_prices_and_context_window_backup.json

Co-authored-by: மனோஜ்குமார் பழனிச்சாமி <smartmanoj42857@gmail.com>

---------

Co-authored-by: Son H. Nguyen <nhs.000.dev@gmail.com>
Co-authored-by: subnet.dev <50828879+subnet-dev@users.noreply.github.com>
Co-authored-by: Son H. Nguyen <33925625+nhs000@users.noreply.github.com>
Co-authored-by: மனோஜ்குமார் பழனிச்சாமி <smartmanoj42857@gmail.com>
Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>

* refactor github copilot

* test_github_copilot_transformation.py

* test_github_copilot_authenticator.py

* add GitHub Copilot

* fix order

* doc fix

---------

Co-authored-by: Krish Dholakia <krrishdholakia@gmail.com>
Co-authored-by: Son H. Nguyen <nhs.000.dev@gmail.com>
Co-authored-by: subnet.dev <50828879+subnet-dev@users.noreply.github.com>
Co-authored-by: Son H. Nguyen <33925625+nhs000@users.noreply.github.com>
Co-authored-by: மனோஜ்குமார் பழனிச்சாமி <smartmanoj42857@gmail.com>
2025-07-04 13:12:16 -07:00
Joost van Doorn 453591ed7c Fix: Fix custom ca bundle support in aiohttp transport (#12281)
* Unify usage of get_ssl_configuration

* Fix doc
2025-07-04 12:48:20 -07:00
Jugal D. Bhatt 62946e58d2 Segregate MCP tools on connections using headers (#12296)
* Add get tools segregation

* add ui changes (#12302)

* resolve comments

* add mapped tests

* remove advanced settings (#12323)
2025-07-04 11:45:51 -07:00
Krrish Dholakia 11947c1e04 docs(opentelemetry_integration.md): add otel debug flag to docs
help people debug their traces easily
2025-07-04 10:10:40 -07:00
Krish Dholakia a03390ccc7 Litellm dev 07 03 2025 p2 (#12301)
* fix(langfuse_prompt_management.py): add langfuse prompt version param support

Adds prompt versioning support

* test(test_langfuse_prompt_management.py): add unit test

* fix: fix linting errors

* fix: add prompt_version instrumentation

* fix(langfuse_otel.py): correctly read env var

* docs(langfuse_integration.md): clarify v3 recommendation is to use langfuse_otel

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

* docs(langfuse_otel_integration.md): cleanup docs

* test: fix test

* test: update tests

* fix: fix linting error
2025-07-03 22:40:21 -07:00
Krrish Dholakia bc6b60e5ab docs(index.md): cleanup release 2025-07-03 22:35:37 -07:00
Krrish Dholakia 38dcb85e9a docs(index.md): cleanup doc 2025-07-03 22:35:07 -07:00
Krrish Dholakia 35ecfb7737 docs(index.md): cleanup 2025-07-03 17:35:49 -07:00
Yuichiro Utsumi 164455ad2f docs: fix config file description in k8s deployment (#12230)
Signed-off-by: Yuichiro Utsumi <utsumi.yuichiro@fujitsu.com>
2025-07-02 16:33:28 -07:00
Krrish Dholakia 26f6dbdd3d docs(bedrock_agents.md): show example of passing provider specific params to bedrock agents
Closes https://github.com/BerriAI/litellm/issues/12232#issuecomment-3029092079
2025-07-02 14:23:07 -07:00
Krish Dholakia df49b24bc0 Azure - responses api bridge - respect responses/ + Gemini - generate content bridge - handle kwargs + litellm params containing stream (#12224)
* fix(main.py): handle router custom azure model name for responses api bridge

* fix(responses/handler): ensure azure model name is stripped before sending to provider

Fixes model name error

* fix(google_genai/main.py): handle stream=true being set in kwargs

* docs: cleanup icons from sidebar

* fix(test-litellm.yml): add google-genai to test litellmyml

* fix(main.py): strip 'responses/' from bridge

* fix(main.py): fix linting errors

* fix(types/openai.py): allow item to be none

handle azure streaming response

* fix(base.py): allow extra fields + handle azure item = none value in response output item added event

* fix(main.py): correctly handle removing responses/

* test(test_main.py): add unit tests
2025-07-02 13:53:52 -07:00