Commit Graph
21811 Commits
Author SHA1 Message Date
Bryan LowandGitHub 416429e9f4 Add New Perplexity Models (#10652)
* add new perplexity models

* update backup json

* updated deep research

* updated backup json
v1.68.1.dev4
2025-05-08 08:56:16 -07:00
Tom MatthewsandGitHub ff279faf35 Add support for Nscale (EU-Sovereign) Provider (#10638)
* Add support for nscale provider

* Add image generation support and fix unit tests

* Add docs for nscale

* Fix unit test import issues

* Minor doc improvement

* Remove redundant null tokens from model cost map

* Address PR review comments for doc updates

* Revert changes to large text
2025-05-08 08:50:15 -07:00
Gary CaldwellandGitHub 78c264d7a5 Fix Slack alerting not working if using a DB (#10370)
* Try to add prints

* more print

* fix print

* batch debugging

* Change batch size

* Revert "Change batch size"

This reverts commit af16d8635f17e3928da9000bb9fec5b0af920816.

* Look into periodic task problems

* Fix missing periodic in slack init

* Initialize periodic flush on startup

* Log update_values

* more logging

* Fix startup

* Cleanup change

* Add a unit test for the change

* Renamed and moved to standard

* Merging in with new test

* comment change

* Extend the timeout because normal runs are over 5 min
2025-05-08 08:40:05 -07:00
Krish DholakiaandGitHub b8b78f1fde Support unified file id (managed files) for batches (#10650)
* refactor(managed_files.py): move enterprise feature into enterprise folder

prevent unexpected surprises

* refactor: safely handle enterprise hooks

* fix: fix ruff check errors

* fix(files_endpoints.py): cleanup enterprise code from OSS

* refactor: complete cleanup

* fix(managed_files.py): complete cleanup

* fix(managed_files.py): instrument to be able to update deployment values post-router selection and just before making llm call

* fix(managed_files.py): instrument to be able to update deployment values post-router selection and just before making llm call

* fix: fix linting error

* fix: fix linting error
2025-05-07 23:39:40 -07:00
Marc AbramowitzandGitHub fcaa4a9f30 Add user management functionality to Python client library & CLI (#10627)
* Add user mgmt functionality to client & CLI

* Add user mgmt client & CLI tests

* Add user mgmt client & CLI info to README.md's

* lint fixes: litellm/proxy/client/users.py

* Fix mypy errors
2025-05-07 23:26:26 -07:00
CasparandGitHub d680feb5dc Fix cache miss for gemini models with response_format (#10635)
* Fix unwanted mutation of kwargs in apply_response_schema_transformation

* add assertion the original dict is not mutated
2025-05-07 23:13:37 -07:00
xsg22andGitHub 2361bd98b0 Update crebras llama-3.1-70b model_prices_and_context_window (#10648) 2025-05-07 23:10:41 -07:00
Krish DholakiaandGitHub b178b08d63 Ollama - fix custom price cost tracking + add 'max_completion_token' support (#10636)
* fix(utils.py): check if ollama model has custom attributes

Fixes https://github.com/BerriAI/litellm/discussions/9630

* fix(ollama/completion): add 'max_completion_token' support for ollama
2025-05-07 22:53:47 -07:00
Krrish Dholakia b899e7d44c Squashed commit of the following:
commit 122f037990da9c008130cde0ec5bd54259b3d0b0
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Wed May 7 14:19:35 2025 -0700

    fix(ollama/completion): add 'max_completion_token' support for ollama

commit 314b68cfd4da36be8fbbc0c30f86da15e36438b7
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Wed May 7 13:27:56 2025 -0700

    fix(utils.py): check if ollama model has custom attributes

    Fixes https://github.com/BerriAI/litellm/discussions/9630
2025-05-07 22:53:28 -07:00
Ishaan Jaff 88f5f9b7f8 fix ai21 test 2025-05-07 21:45:57 -07:00
Ishaan Jaff 580e221000 fix ai21 test 2025-05-07 21:26:35 -07:00
Ishaan Jaff 764e9a1934 bump litellm proxy extras 2025-05-07 21:23:05 -07:00
Ishaan Jaff 24acee3596 new ui build 2025-05-07 21:10:29 -07:00
f524eb4bd5 Contributor PR - MCP Server DB Schema (#10634) (#10641)
* MCP Server DB Schema (#10634)

* feat: initial mcp db schema

* user -> team table for mcp_servers

* remove mcp_servers from team and verificationtoken tables

---------

Co-authored-by: wagnerjt <wagnerjt@github.com>

* add mcp table

* Team and Key Object Permission table for MCP Servers (#10643)

* feat: initial mcp db schema

* user -> team table for mcp_servers

* remove mcp_servers from team and verificationtoken tables

* adding ObjectPermissionTable relationship for mcpservers

* fix: object_permission_id and added relationship to User and Organization tables

---------

Co-authored-by: wagnerjt <wagnerjt@github.com>

* migration file - add_mcp_key_team_permission_mgmt

---------

Co-authored-by: Tyler Wagner <wagnerjt@users.noreply.github.com>
Co-authored-by: wagnerjt <wagnerjt@github.com>
2025-05-07 21:09:51 -07:00
Ishaan JaffandGitHub ad970ca41d [Feat] Add endpoints to manage email settings (#10646)
* add email notifs endpoints

* ui refactor email settings

* allow controlling email settings / notifs through ui

* add email settings to enterprise router

* change order of email events

* manage email settings in general_settings

* fix location of email settings types

* testing for email settings
2025-05-07 18:56:17 -07:00
Ishaan JaffandGitHub 6a3ea83b23 [Feat] Bedrock Guardrails - Add support for PII Masking with bedrock guardrails (#10642)
* allow defining mask_request_content for guardrails

* allow pii masking with bedrock

* implement bedrock pre call hook

* docs bedrock pii masking

* fix linting error

* fix code quality checks
2025-05-07 18:30:57 -07:00
tanjiroandGitHub 959ba21585 Filter on logs table (#10644)
* remove existing filter

* added team id based filtering
2025-05-07 17:51:03 -07:00
Ishaan JaffandGitHub 1dd71d5727 [Fix] SCIM - Creating SCIM tokens on Admin UI (#10628)
* fix SCIM token creation ui

* fix scim token creation

* add parseErrorMessage util

* fixes for SCIM parsing error msg
2025-05-07 10:01:26 -07:00
Ishaan JaffandGitHub 1fb28c13a1 [Feat] Add User invitation emails when inviting users to litellm (#10615)
* working email integration

* fix get_custom_loggers_for_type

* add SendKeyCreatedEmailEvent type

* bug fix, only send 1 email when creating key for user

* polish for emails for key created

* polish for key created email

* fix test_init_custom_logger_compatible_class_as_callback

* testing resend email integration

* working user invitation email

* working user invite emails

* testing for user invite emails

* testing fixes for email integration
2025-05-06 22:52:53 -07:00
Ishaan JaffandGitHub dd32860d62 [Feat] V2 Emails - Fixes for sending emails when creating keys + Resend API support (#10602)
* working email integration

* fix get_custom_loggers_for_type

* add SendKeyCreatedEmailEvent type

* bug fix, only send 1 email when creating key for user

* polish for emails for key created

* polish for key created email

* fix test_init_custom_logger_compatible_class_as_callback

* testing resend email integration

* testing fixes for email integration
2025-05-06 22:50:48 -07:00
Krrish Dholakia e34ebd6667 bump: version 1.68.1 → 1.68.2 2025-05-06 22:42:01 -07:00
AravindandGitHub 4f162b0706 Fix: Ollama integration KeyError when using JSON response format (#10611)
* fix: Ollama JSON response handling to support arbitrary JSON structures. See #10589

* fix: linting issues and tests for #10589
2025-05-06 22:22:04 -07:00
Marty SullivanandGitHub ae10f3f82c add gemini-2.5-pro-preview-05-06 model prices and context window (#10597) 2025-05-06 22:20:35 -07:00
Adam HolmbergandGitHub 33953bd6c8 make openai model O series conditional accept provider/model (#10591)
Registration and calls within the project are not consistent.
This accepts either form.

ref: #10566
2025-05-06 22:19:17 -07:00
Krish DholakiaandGitHub 500e6cddf5 Fix otel - follow genai semantic conventions + support 'instructions' param for tts (#10608)
* fix(opentelemetry.py): fix passing otel semantic conventions

Fixes SpanAttributes.LLM_PROMPTS to SpanAttributes.LLM_PROMPTS.value

* fix(opentelemetry.py): ensure spanattributes always pass the actual enum value

* fix(main.py): support passing 'instructions' param for gpt-4o-mini-tts

* test: update tests
2025-05-06 21:57:01 -07:00
c67ca115ae Return 404 when delete_verification_tokens (POST /key/delete) fails to find keys (#10604) (#10605)
* Return 404 when delete_verification_tokens fails to find keys

* Add test_delete_nonexistent_key_returns_404

Co-authored-by: Marc Abramowitz <abramowi@adobe.com>
2025-05-06 20:45:15 -07:00
3a73309006 Add bedrock llama4 pricing + handle llama4 templating on bedrock invoke route (#10582)
* build(model_prices_and_context_window.json): add bedrock llama4 models to model cost map

* fix template conversion for Llama 4 models in Bedrock (#10557)

* test: add testing to repro https://github.com/BerriAI/litellm/pull/10557

* test: add unit testing

* test(test_main.py): refactor where test is kept

---------

Co-authored-by: aswny <87371411+aswny@users.noreply.github.com>
v1.68.1-nightly
2025-05-06 16:06:24 -07:00
Ishaan Jaff ae2a9cf4de fix debug logs v1.68.1.dev2 2025-05-06 14:28:20 -07:00
Ishaan Jaff 6d27c1e611 bump to 1.68.1 v1.68.1.dev1 2025-05-05 21:30:53 -07:00
7d73ab5d88 Add litellm-proxy CLI (#10478) (#10578)
* Add `litellm-proxy` CLI (#10478)

* First cut at a Python client module for proxy

* Add UnauthorizedError + add_model method

* Add delete_model method

* Add example model_id to delete_model docstring

* Make delete_model raise NotFoundError

* Add get_model

* Add get_all_model_info

* Rename models.list_models to models.list

* Rename models.get_all_model_info to models.info

* Move ModelsManagementClient.get_all_model_group_info to ModelGroupsManagementClient.info

* Rename get_model to get

* Rename add_model to new

* Rename delete_model to delete

* In client classes, rename base_url attribute to _base_url and api_key attribute to _api_key

* Add ModelsManagementClient.updae method

* Add client.chat.completions (ChatClient)

* ruff format litellm/proxy/client

* ruff format tests/litellm/proxy/client/*.py

* Add latest changes

* Rename KeysManagementClient.create to KeysManagementClient.generate

* Add new parameters to KeysManagementClient.generate

* Add CredentialsManagementClient

* Remove api_key parameter from KeysManagementClient.generate

* Fix lint errors

* Add litellm/proxy/client/README.md

* README.md: Remove api_key param to client.keys.generate

* Fix mypy errors

* First cut at litellm-proxy cli

* Add test for `litellm-proxy models list`

* Nicer get_models_info

* get_models_info: --columns option

* Use format_timestamp in list_models

* ruff format litellm/proxy/client

* Simpler JSON printing with rich.print_json

* Move models-related commands to separate file

From `cli.py` to `groups/models.py`

* Improve directory structure

* Cleanup cli/groups/models.py - esp. usage of rich

* Refactoring

* Refactor mocking in cli/test_main.py

* Dedup models commands tests

* Update poetry.lock

* Fix mypy errors

* ruff format litellm/proxy/client/cli

* ruff format tests/litellm/proxy/client/*.py

* Fix timezone issue in test_models_list_table_format

* Add cli/README.md

* Small README.md tweaks

* README.md enhancements

* Add credentials commands

* Add chat commands

* Add http commands

* ruff format litellm/proxy/client/cli

* Fix lint errors in credentials and http commands

* json => json_lib

* test-key => sk-test-key

* Mock HTTP responses so http command tests pass

* Fix mypy error in credentials.py

* bump: version 1.67.5 → 1.67.6

* build: update litellm version

* cli/main.py: show_envvar=True

* Increase test job timeout to 8 minutes

because it looks like maybe the job is getting canceled because it takes
too long with the additional tests?

This probably could be reverted once #10484 is merged, since that speeds
up pytest runs greatly.

* Add keys functionality to library/CLI

* Add info about keys commands to litellm/proxy/client/cli/README.md

* Move Model Information section in CLI README

* Make Model Information a level 4 heading

* Move rich to extras

as suggested by @ishaan-jaff

---------

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

* pin rich=13.7.1

---------

Co-authored-by: Marc Abramowitz <abramowi@adobe.com>
Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
2025-05-05 21:29:57 -07:00
frankandGitHub 0184fddbb7 fix issue when databrick use external model, the delta could be empty content (#10540) 2025-05-05 21:18:45 -07:00
Thom LaneandGitHub 5f47df4627 Update instructor.md (#10549)
Simplified examples
2025-05-05 21:15:53 -07:00
KavinkumarandGitHub 57c5e7ea3f Update gemini-2.5-pro-exp-03-25 max_tokens to 65,535 (#10548)
Fixes:
Error generating conversation title: litellm.BadRequestError: VertexAIException BadRequestError - {
  "error": {
    "code": 400,
    "message": "Unable to submit request because it has a maxOutputTokens value of 65536 but the supported range is from 1 (inclusive) to 65536 (exclusive). Update the value and try again.",
    "status": "INVALID_ARGUMENT"
  }
}
2025-05-05 21:15:06 -07:00
Krrish Dholakia 9ae239b3e1 docs(index.md): add graphic 2025-05-05 20:49:47 -07:00
Ishaan JaffandGitHub cd48ffb6c4 [Bug fix] JSON logs - Ensure only 1 log is emitted (previously duplicate json logs were getting emitted) (#10580)
* fix logging with JSON logs

* test: test_initialize_loggers_with_handler_sets_propagate_false
2025-05-05 20:25:47 -07:00
Ishaan Jaff ddc24da2a7 Revert "fix logging with JSON logs"
This reverts commit 1109a6ea6e.
2025-05-05 18:13:39 -07:00
Ishaan Jaff 1109a6ea6e fix logging with JSON logs 2025-05-05 18:13:15 -07:00
Ishaan JaffandGitHub 489f1a6c25 [Feat] v2 Custom Logger API Endpoints (#10575)
* fixes for generic api logger

* tests for generic api logger

* test_generic_api_callback_multiple_logs

* allow health checking generic api endpoints

* docs generic api endpoint for logging

* allow setting headers for generic api  callback

* fix for test_init_custom_logger_compatible_class_as_callback

* fix linting
2025-05-05 16:57:55 -07:00
Young HanandGitHub b1e28a3bc4 [Docs] Change llama-api link for litellm (#10556)
* docs: change llama-api link for litellm

* docs: init supported models table
2025-05-05 12:37:37 -07:00
Zoltan KandGitHub 91dcc50768 Github: Increase timeout of litellm tests (#10568) 2025-05-05 12:37:04 -07:00
Krrish Dholakia 914ab00805 docs(index.md): add key highlights to docs 2025-05-03 22:04:22 -07:00
Ishaan Jaff bccab23a6a add vector stores to release note 2025-05-03 21:51:03 -07:00
Krrish Dholakia 3f09da21e3 docs(meta_llama.md): clarify meta llama works on responses api 2025-05-03 21:41:00 -07:00
Ishaan Jaff 9801a3a416 ui new build v1.68.0-nightly 2025-05-03 21:33:48 -07:00
Krish DholakiaandGitHub 522e334fbd fix(converse_transformation.py): handle meta llama tool call response (#10541)
* fix(converse_transformation.py): handle meta llama tool call response

Fixes issue where bedrock meta llama would return tool call response as content str

* test(test_converse_transformation.py): add unit testing for new function

* fix: fix linting error

* fix: fix linting error
2025-05-03 21:31:14 -07:00
Ishaan JaffandGitHub 7c4fae477a [Bug Fix] UnicodeDecodeError: 'charmap' on Windows during litellm import (#10542)
* test using litellm on windows

* fix using litellm on windows

* test using litellm on windows

* fix change on ci/cd

* fix test on ci/cd
2025-05-03 21:31:05 -07:00
Ishaan Jaff 8aa57ff0c0 add meta llma api to release notes 2025-05-03 21:00:22 -07:00
Ishaan Jaff 3f45200802 test_openai_responses_api_web_search_cost_tracking 2025-05-03 20:22:42 -07:00
Krish DholakiaandGitHub 880c2a736b fix(model_management_endpoints.py): allow team admin to update model … (#10539)
* fix(model_management_endpoints.py): allow team admin to update model via `/model/{model_id}/update` route

Fixes ui regression where team admin could not modify their own models

* fix(provider_specific_fields.tsx): style fix

* fix(table.tsx): allow expanding multiple rows

* fix(organization_endpoints.py): more robust check if user can give org model access

handle when user has models=["all-proxy-models"]

* fix(organization_endpoints.py): enable proxy admin with 'all-proxy-model' access to create new org with specific models

Fixes LIT-135

* fix: fix linting error

* fix: fix ui linting error

* fix(index.tsx): fix linting errors
2025-05-03 19:34:35 -07:00
Krrish Dholakia 42a91bae6b test: comment out new ui test - needs more investigation 2025-05-03 19:32:36 -07:00