Commit Graph

19315 Commits

Author SHA1 Message Date
Krish Dholakia df93debbc7 Internal User Endpoint - vulnerability fix + response type fix (#8228)
* fix(key_management_endpoints.py): fix vulnerability where a user could update another user's keys

Resolves https://github.com/BerriAI/litellm/issues/8031

* test(key_management_endpoints.py): return consistent 403 forbidden error when modifying key that doesn't belong to user

* fix(internal_user_endpoints.py): return model max budget in internal user create response

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

* test: fix test

* test: update test to handle gemini token counter change

* fix(factory.py): fix bedrock http:// handling

* docs: fix typo in lm_studio.md (#8222)

* test: fix testing

* test: fix test

---------

Co-authored-by: foreign-sub <51928805+foreign-sub@users.noreply.github.com>
2025-02-04 06:41:14 -08:00
Krrish Dholakia f6bd48a1c5 bump: version 1.60.2 → 1.60.3 2025-02-03 22:56:42 -08:00
Krish Dholakia c17342ac5b fix(openai/): allows 'reasoning_effort' param to be passed correctly (#8227)
* fix(openai/): allows 'reasoning_effort' param to be passed correctly

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

* test: update test to handle gemini token counter change

* fix(factory.py): fix bedrock http:// handling

* test: fix test

* test: update testing for new openai sdk
v1.60.2
2025-02-03 22:39:10 -08:00
Ishaan Jaff 302cc4f583 bump: version 1.60.1 → 1.60.2 2025-02-03 22:11:50 -08:00
Ishaan Jaff 915cc064c5 fix test test_is_assemblyai_route 2025-02-03 21:58:32 -08:00
Ishaan Jaff 8fd60a420d (Feat) - New pass through add assembly ai passthrough endpoints (#8220)
* add assembly ai pass through request

* fix assembly pass through

* fix test_assemblyai_basic_transcribe

* fix assemblyai auth check

* test_assemblyai_transcribe_with_non_admin_key

* working assembly ai test

* working assembly ai proxy route

* use helper func to pass through logging

* clean up logging assembly ai

* test: update test to handle gemini token counter change

* fix(factory.py): fix bedrock http:// handling

* add unit testing for assembly pt handler

* docs assembly ai pass through endpoint

* fix proxy_pass_through_endpoint_tests

* fix standard_passthrough_logging_object

* fix ASSEMBLYAI_API_KEY

* test test_assemblyai_proxy_route_basic_post

* test_assemblyai_proxy_route_get_transcript

* fix is is_assemblyai_route

* test_is_assemblyai_route

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
2025-02-03 21:54:32 -08:00
foreign-sub aa6a18ecc2 docs: fix typo in lm_studio.md (#8222) 2025-02-03 18:37:31 -08:00
Krrish Dholakia 5b08289d88 fix(factory.py): fix bedrock http:// handling 2025-02-03 18:15:14 -08:00
Krrish Dholakia 7ddb034b31 test: update test to handle gemini token counter change 2025-02-03 18:12:53 -08:00
Krish Dholakia c8494abdea test(base_llm_unit_tests.py): add test to ensure drop params is respe… (#8224)
* test(base_llm_unit_tests.py): add test to ensure drop params is respected

* fix(types/prometheus.py): use typing_extensions for python3.8 compatibility

* build: add cherry picked commits
2025-02-03 16:04:44 -08:00
Zhaohan Dong d60d3ee970 Add xAI and fix some old model config (#8218)
Signed-off-by: Zhaohan Dong <65422392+zhaohan-dong@users.noreply.github.com>
2025-02-03 15:29:19 -08:00
Ishaan Jaff ec614be6c4 ui new build v1.60.0.dev4 2025-02-03 08:23:44 -08:00
Ishaan Jaff b3154be6f5 (UI Fixes for add new model flow) (#8216)
* ui fix add model flow

* fix provider info + add flow

* cleanup add model setup

* use 1 file for ProviderSpecificFields

* use 1 file for ProviderSpecificFields

* use antd select for model / providers

* fix selectedProviderEnum

* fix upload vertex models
2025-02-03 08:21:00 -08:00
மனோஜ்குமார் பழனிச்சாமி 6f11137d6f Fix max output tokens (#8207) 2025-02-03 07:27:37 -08:00
Krish Dholakia e7b81f84de build: ui updates (#8206) 2025-02-03 07:26:58 -08:00
fzowl d1d9c1e95a docs: Updating the available VoyageAI models in the docs (#8215)
* Refresh VoyageAI models and prices and context

* Refresh VoyageAI models and prices and context

* Refresh VoyageAI models and prices and context

* Updating the available VoyageAI models in the docs
2025-02-03 07:26:33 -08:00
Юрій a37bfdb191 Added deprecation date for gemini-1.5 models (#8210) 2025-02-03 07:26:14 -08:00
Krish Dholakia 97b8de17ab LiteLLM Minor Fixes & Improvements (01/16/2025) - p2 (#7828)
* fix(vertex_ai/gemini/transformation.py): handle 'http://' image urls

* test: add base test for `http:` url's

* fix(factory.py/get_image_details): follow redirects

allows http calls to work

* fix(codestral/): fix stream chunk parsing on last chunk of stream

* Azure ad token provider (#6917)

* Update azure.py

Added optional parameter azure ad token provider

* Added parameter to main.py

* Found token provider arg location

* Fixed embeddings

* Fixed ad token provider

---------

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

* fix: fix linting errors

* fix(main.py): leave out o1 route for azure ad token provider, for now

get v0 out for sync azure gpt route to begin with

* test: skip http:// test for fireworks ai

model does not support it

* refactor: cleanup dead code

* fix: revert http:// url passthrough for gemini

google ai studio raises errors

* test: fix test

---------

Co-authored-by: bahtman <anton@baht.dk>
2025-02-02 23:17:50 -08:00
Krrish Dholakia 10d3da7660 build: bump version 2025-02-02 23:05:22 -08:00
Krish Dholakia 6834c5ecaf Easier user onboarding via SSO (#8187)
* fix(ui_sso.py): use common `get_user_object` logic across jwt + ui sso auth

Allows finding users by their email, and attaching the sso user id to the user if found

* Improve Team Management flow on UI  (#8204)

* build(teams.tsx): refactor teams page to make it easier to add members to a team

make a row in table clickable -> allows user to add users to team they intended

* build(teams.tsx): make it clear user should click on team id to view team details

simplifies team management by putting team details on separate page

* build(team_info.tsx): separately show user id and user email

make it easy for user to understand the information they're seeing

* build(team_info.tsx): add back in 'add member' button

* build(team_info.tsx): working team member update on team_info.tsx

* build(team_info.tsx): enable team member delete on ui

allow user to delete accidental adds

* build(internal_user_endpoints.py): expose new endpoint for ui to allow filtering on user table

allows proxy admin to quickly find user they're looking for

* feat(team_endpoints.py): expose new team filter endpoint for ui

allows proxy admin to easily find team they're looking for

* feat(user_search_modal.tsx): allow admin to filter on users when adding new user to teams

* test: mark flaky test

* test: mark flaky test

* fix(exception_mapping_utils.py): fix anthropic text route error

* fix(ui_sso.py): handle situation when user not in db
2025-02-02 23:02:33 -08:00
Krish Dholakia 1105e35538 Complete o3 model support (#8183)
* fix(o_series_transformation.py): add 'reasoning_effort' as o series model param

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

* fix(main.py): ensure `reasoning_effort` is a mapped openai param

* refactor(azure/): rename o1_[x] files to o_series_[x]

* refactor(base_llm_unit_tests.py): refactor testing for o series reasoning effort

* test(test_azure_o_series.py): have azure o series tests correctly inherit from base o series model tests

* feat(base_utils.py): support translating 'developer' role to 'system' role for non-openai providers

Makes it easy to switch from openai to anthropic

* fix: fix linting errors

* fix(base_llm_unit_tests.py): fix test

* fix(main.py): add missing param
2025-02-02 22:36:37 -08:00
Krish Dholakia e4566d7b1c fix(main.py): fix passing openrouter specific params (#8184)
* fix(main.py): fix passing openrouter specific params

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

* test(test_get_model_info.py): add check for region name w/ cris model

Resolves https://github.com/BerriAI/litellm/issues/8115
2025-02-02 22:23:14 -08:00
Wanis Elabbar 3b9ba0251d Azure AI Foundry - Deepseek R1 (#8188)
Fixed Deepseek R1 on Azure AI Foundry
2025-02-02 21:54:53 -08:00
Ishaan Jaff 8ba60bf13c (UI + SpendLogs) - Store SpendLogs in UTC Timezone, Fix filtering logs by start/end time (#8190)
* fix request_id field

* spend logs store time in UTC

* fix ui_view_spend_logs

* UI make time filter queries in UTC

* fix time filters

* fix TimeCellProps

* ui use UTC for filtering time
v1.60.0.dev2
2025-02-01 17:26:18 -08:00
Ishaan Jaff c0f3100934 [Bug Fix] - /vertex_ai/ was not detected as llm_api_route on pass through but vertex-ai was (#8186)
* fix mapped_pass_through_routes

* fix route checks

* update test_is_llm_api_route
2025-02-01 17:26:08 -08:00
Ishaan Jaff 4e9c2d5b21 docs update log stream event 2025-02-01 16:33:28 -08:00
Ishaan Jaff a713d7dfeb ui new build 2025-02-01 11:41:30 -08:00
Tomas Klohna 08e40352e9 Add azure/deepseek-r1 to model_prices_and_content_window.json (#8177) 2025-02-01 11:28:21 -08:00
Krish Dholakia 9e65f867ab test: add more unit testing for team member endpoints (#8170)
* test: add more unit testing for team member add

* fix(team_endpoints.py): add validation check to prevent same user from being added to team again

prevents duplicates

* fix(team_endpoints.py): raise error if `/team/member_delete` called on member that's not in team

prevent being able to call delete on same member multiple times

* test: update initial tests

* test: fix test

* test: update test to handle no member duplication
2025-02-01 11:23:00 -08:00
Krish Dholakia 23f458d2da Improved O3 + Azure O3 support (#8181)
* fix: support azure o3 model family for fake streaming workaround (#8162)

* fix: support azure o3 model family for fake streaming workaround

* refactor: rename helper to is_o_series_model for clarity

* update function calling parameters for o3 models (#8178)

* refactor(o1_transformation.py): refactor o1 config to be o series config, expand o series model check to o3

ensures max_tokens is correctly translated for o3

* feat(openai/): refactor o1 files to be 'o_series' files

expands naming to cover o3

* fix(azure/chat/o1_handler.py): azure openai is an instance of openai - was causing resets

* test(test_azure_o_series.py): assert stream faked for azure o3 mini

Resolves https://github.com/BerriAI/litellm/pull/8162

* fix(o1_transformation.py): fix o1 transformation logic to handle explicit o1_series routing

* docs(azure.md): update doc with `o_series/` model name

---------

Co-authored-by: byrongrogan <47910641+byrongrogan@users.noreply.github.com>
Co-authored-by: Low Jian Sheng <15527690+lowjiansheng@users.noreply.github.com>
2025-02-01 09:52:28 -08:00
Krish Dholakia 91ed05df29 Litellm dev contributor prs 01 31 2025 (#8168)
* Add O3-Mini for Azure and Remove Vision Support (#8161)

* Azure Released O3-mini at the same time as OAI, so i've added support here. Confirmed to work with Sweden Central.

* [FIX] replace cgi for python 3.13 with email.Message as suggested in PEP 594 (#8160)

* Update model_prices_and_context_window.json (#8120)

codestral2501 pricing on vertex_ai

* Fix/db view names (#8119)

* Fix to case sensitive DB Views name

* Fix to case sensitive DB View names

* Added quotes to check query as well

* Added quotes to create view query

* test: handle server error  for flaky test

vertex ai has unstable endpoints

---------

Co-authored-by: Wanis Elabbar <70503629+elabbarw@users.noreply.github.com>
Co-authored-by: Honghua Dong <dhh1995@163.com>
Co-authored-by: superpoussin22 <vincent.nadal@orange.fr>
Co-authored-by: Miguel Armenta <37154380+ma-armenta@users.noreply.github.com>
2025-02-01 09:05:20 -08:00
Krrish Dholakia d0c5639912 build: bump root schema.prisma 2025-01-31 23:04:51 -08:00
Krish Dholakia 8d0db8b379 build(schema.prisma): add new sso_user_id to LiteLLM_UserTable (#8167)
* build(schema.prisma): add new `sso_user_id` to LiteLLM_UserTable

easier way to store sso id for existing user

Allows existing user added to team, to login via SSO

* test(test_auth_checks.py): add unit testing for fuzzy user object get

* fix(handle_jwt.py): fix merge conflicts
2025-01-31 23:04:05 -08:00
Krish Dholakia 2147cad307 Litellm dev 01 31 2025 p2 (#8164)
* docs(token_auth.md): clarify title

* refactor(handle_jwt.py): add jwt auth manager + refactor to handle groups

allows user to call model if user belongs to group with model access

* refactor(handle_jwt.py): refactor to first check if service call then check user call

* feat(handle_jwt.py): new `enforce_team_access` param

only allows user to call model if a team they belong to has model access

allows controlling user model access by team

* fix(handle_jwt.py): fix error string, remove unecessary param

* docs(token_auth.md): add controlling model access for jwt tokens via teams to docs

* test: fix tests post refactor

* fix: fix linting errors

* fix: fix linting error

* test: fix import error
2025-01-31 22:52:35 -08:00
Ishaan Jaff 795a71ce1e fix linting error v1.60.0 2025-01-31 21:27:56 -08:00
Ishaan Jaff 1d9ccb7fbe doc fix 2025-01-31 21:19:39 -08:00
Юрій b8445436cd Adjust model pricing metadata (#8147)
* added cache_read_input_token_cost

* added input price for audio whisper

* fixed prices for google gemini-1.0-pro-vision

---------

Co-authored-by: yurii.izo <yurii.izo@justanswer.com>
2025-01-31 21:12:05 -08:00
Ishaan Jaff ab939d881f bump: version 1.59.12 → 1.60.0 2025-01-31 21:07:42 -08:00
Ishaan Jaff a74ecf5dbc new release 2025-01-31 21:07:42 -08:00
Yigit Konur ed53b82e5d Adding Azure OpenAI o3-mini costs & specs (#8166) 2025-01-31 21:05:18 -08:00
Ishaan Jaff 9ff27809b2 (Feat) add bedrock/deepseek custom import models (#8132)
* add support for using llama spec with bedrock

* fix get_bedrock_invoke_provider

* add support for using bedrock provider in mappings

* working request

* test_bedrock_custom_deepseek

* test_bedrock_custom_deepseek

* fix _get_model_id_for_llama_like_model

* test_bedrock_custom_deepseek

* doc DeepSeek-R1-Distill-Llama-70B

* test_bedrock_custom_deepseek
2025-01-31 18:40:44 -08:00
Ishaan Jaff 29a8a613a7 (UI) Allow adding custom pricing when adding new model (#8165)
* ui custom pricing

* fix validateJSON

* ui allow entering custom pricing

* ui fix add model form

* working edit model modal

* working edit custom pricing

* ui add custom pricing on ui
2025-01-31 17:54:29 -08:00
Ishaan Jaff 2cf0daa31c (Fixes) OpenAI Streaming Token Counting + Fixes usage track when litellm.turn_off_message_logging=True (#8156)
* working streaming usage tracking

* fix test_async_chat_openai_stream_options

* fix await asyncio.sleep(1)

* test_async_chat_azure

* fix s3 logging

* fix get_stream_options

* fix get_stream_options

* fix streaming handler

* test_stream_token_counting_with_redaction

* fix codeql concern
2025-01-31 15:06:37 -08:00
Krish Dholakia 9f0f2b3f01 build: fix model cost map (#8153) 2025-01-31 13:30:06 -08:00
Ventz Petkov 9678bc3140 FEATURE: OpenAI o3-mini (#8151)
Co-authored-by: Ventz Petkov <ventz.petkov@cerbo.io>
2025-01-31 13:08:02 -08:00
Krrish Dholakia 4b6fc4bba3 docs: fix dead links 2025-01-31 10:09:49 -08:00
Krish Dholakia a699000a4b New stable release - release notes (#8148)
* docs(v1.59.8-stable): add release note

* docs(index.md): cleanup new stable release, release notes
2025-01-31 10:02:59 -08:00
Krrish Dholakia b8b927f23b bump: version 1.59.11 → 1.59.12 2025-01-30 23:07:33 -08:00
Krish Dholakia de261e2120 Doc updates + management endpoint fixes (#8138)
* Litellm dev 01 29 2025 p4 (#8107)

* fix(key_management_endpoints.py): always get db team

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

* test(test_key_management.py): add unit test enforcing check_db_only is always true on key generate checks

* test: fix test

* test: skip gemini thinking

* Litellm dev 01 29 2025 p3 (#8106)

* fix(__init__.py): reduces size of __init__.py and reduces scope for errors by using correct param

* refactor(__init__.py): refactor init by cleaning up redundant params

* refactor(__init__.py): move more constants into constants.py

cleanup root

* refactor(__init__.py): more cleanup

* feat(__init__.py): expose new 'disable_hf_tokenizer_download' param

enables hf model usage in offline env

* docs(config_settings.md): document new disable_hf_tokenizer_download param

* fix: fix linting error

* fix: fix unsafe comparison

* test: fix test

* docs(public_teams.md): add doc showing how to expose public teams for users to join

* docs: add beta disclaimer on public teams

* test: update tests
2025-01-30 22:56:41 -08:00
Krish Dholakia 69a6da4727 Litellm dev 01 30 2025 p2 (#8134)
* feat(lowest_tpm_rpm_v2.py): fix redis cache check to use >= instead of >

makes it consistent

* test(test_custom_guardrails.py): add more unit testing on default on guardrails

ensure it runs if user sent guardrail list is empty

* docs(quick_start.md): clarify default on guardrails run even if user guardrails list contains other guardrails

* refactor(litellm_logging.py): refactor no-log to helper util

allows for more consistent behavior

* feat(litellm_logging.py): add event hook to verbose logs

* fix(litellm_logging.py): add unit testing to ensure `litellm.disable_no_log_param` is respected

* docs(logging.md): document how to disable 'no-log' param

* test: fix test to handle feb

* test: cleanup old bedrock model

* fix: fix router check
2025-01-30 22:18:53 -08:00