Commit Graph

170 Commits

Author SHA1 Message Date
Ishaan Jaff ff7dd1756a [Security Bug Fix] Ensure only LLM API route fails get logged on Langfuse (and other loggers) (#12308)
* _is_proxy_only_llm_api_error

* test_proxy_only_error_true_for_llm_route

* add not on change

* Update tests/test_litellm/proxy/test_proxy_utils.py

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* add test_post_call_failure_hook_auth_error_key_info_route

* test fix _is_proxy_only_llm_api_error

* test_chat_completion_request_with_redaction

* test_post_call_failure_hook_auth_error_llm_api_route

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-07-04 14:42:42 -07:00
Ishaan Jaff 0c19414b36 [️ Python SDK import] - reduce python sdk import time by .3s (#12140)
* use 1 file for KeyManagementSystem

* move key management settings

* fix import locs

* test_proxy_types_not_imported

* test the import loc

* fix import item

* fix imports

* fix import loc

* fix imports
2025-06-28 14:57:10 -07:00
Youfu Zhang 1c68c24358 introduce new environment variable NO_REDOC to opt-out Redoc (#12092)
Signed-off-by: Youfu Zhang <zhangyoufu@gmail.com>
2025-06-27 21:26:37 -07:00
Krrish Dholakia 1e6d43e761 Squashed commit of the following:
commit 440bc027251d8180174d762d83d271d0f7b68cc5
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 23:04:11 2025 -0700

    fix: fix check

commit 89a7451cb9ee26ff9f642335714dcc6f449d1fc2
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 22:42:30 2025 -0700

    fix: fix test

commit 1322e3b3497e5d334fdcaa18f0cf7a98ea758df4
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 20:52:40 2025 -0700

    style: add more tooltips

commit 172738b98b7864aabcacf3334a394098b300283f
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 20:51:09 2025 -0700

    feat(team_member_view.tsx): add a tooltip

commit 895eb28deb9127985e30b5e859e5bca8530951c9
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 18:46:49 2025 -0700

    fix(teams.tsx): support setting team member budget on create

commit 003cc54a6dd0f65030c4f39a8487adc771b62e11
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 18:40:49 2025 -0700

    fix(team_member_view.tsx): style improvements

commit a627a044f21df788f80d92a4081212072be91632
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 18:40:01 2025 -0700

    fix(team_member_view.tsx): handle scientific notation in string

commit c5a3b7bd8419f6394e1b490849555d02d473baed
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 18:34:25 2025 -0700

    feat(team_membership_view.tsx): show team member spend + max budget on UI

commit e986d12ad5b07c676f4cac5e16745939d7473dee
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 18:28:06 2025 -0700

    feat(team_member_view.tsx): show team member spend + budget on team info

commit 8e398607b25f8a8f0bab41964810b5dd27c5e3f2
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 18:18:16 2025 -0700

    feat(team_info.tsx): show team member budget on team info

commit 1f56886b5913dafefc0c00fbe741c0c9c01144a6
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 18:15:30 2025 -0700

    feat(team_endpoints.py): get team budget table on team info

    allows user to see max budget set for team members

commit 0a4320bbfa406c24ad32a420f82152da7bdd7323
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 18:10:06 2025 -0700

    feat(team_endpoints.py): return team member budget on team info

    allows ui to display this to admin / team member

commit 6a4e29f87b333ae9977e8f878960e63becd89150
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 17:57:20 2025 -0700

    fix(team_endpoints.py): support updating team budget on UI

commit 53f0fff34032977433dfe6935ce0a684a4141fd8
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 17:38:17 2025 -0700

    feat(proxy/_types.py): return team member spend

    update pydantic object to include spend

    Allows showing spend of team member within team on UI

commit ef2a1a43ecf7fecfb904042cbf47b3d56246edcb
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 16:31:42 2025 -0700

    feat(team_endpoints.py): support 'team_member_budget' param on `/team/update`

    enables budget working across all team members

commit 512999f1249b00a02a30f049a0cfa36e829ff989
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 16:20:04 2025 -0700

    test: add unit tests for default team member budget

commit 90fa3f61a2d63e12b9f3e1da9775f5c8b7294b5f
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 15:37:51 2025 -0700

    feat(team_endpoints.py): support using default team member budget id, if set

    allows all team members to use the same budget id

commit acef5324b1a0935a482c71060f610c3d8823e8c3
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 15:22:30 2025 -0700

    feat(team_endpoints.py): support `team_member_budget` param on `/team/new`

    Allow creating 1 budget for all users within team (makes it easier to increase/reduce budget if needed for all team members)

commit 2e867ac70fbd8768e7c27cf3b078e6dc10e566b9
Author: Krrish Dholakia <krrishdholakia@gmail.com>
Date:   Fri Jun 20 13:45:06 2025 -0700

    fix(ui_sso.py): ensure user is added to team, if set via default internal settings

    allows users signed up via SSO to be added to default team
2025-06-20 23:11:53 -07:00
Krish Dholakia cb90f8e613 Allow /models to return correct models for custom wildcard prefixes (#11784)
* fix(model_checks.py): cleanup logic

support wildcard models with non-provider prefix's for model discovery

Closes https://github.com/BerriAI/litellm/pull/10358

* feat(model_checks.py): delegate wildcard prefix appending to the get_known_models_from_wildcard function

remove from the 'get_provider_models' function

* fix(model_checks.py): don't double add the wildcard prefix

* test: update tests
2025-06-16 22:11:36 -07:00
Ishaan Jaff e3094c2249 set flaky tests as flaky 2025-06-14 13:51:52 -07:00
Krish Dholakia 39de3610be fix(internal_user_endpoints.py): support user with + in email on us… (#11601)
* fix(internal_user_endpoints.py): support user with `+` in email on user info

ensures user is correctly parsed from input

* fix(factory.py): support vertex function call args as None

handles empty string in args for vertex gemini calls

* docs(langfuse_integration.md): pin langfuse sdk version on docs

* fix(vertex_ai/): return empty dict, instead of none when empty string given

* refactor: reduce function size

* fix: fix linting errors

* fix: revert check

* fix(internal_user_endpoints.py): fix check

* test: update tests

* test: update tests
2025-06-10 22:13:10 -07:00
Laurien 0c50f8bcc9 Update enduser spend and budget reset date based on budget duration (#8460) 2025-06-08 08:39:14 -07:00
Ishaan Jaff ea841eeb9b [Feat] UI - show vector store permissions for Key, Team, Org (#11277)
* fix LiteLLM_ObjectPermissionTable

* fix include object_permission for list key

* fix key list to inclue obj permissions

* fix object permissions for vector stores on key info

* add key edit view with vector stores

* allow editing vector stores permissions

* fixes obj permissions

* feat: add obj permission on UI

* fix: add object_permission:true

* ui show org vector stores on org info

* fix: show object permissions on /org/info

* feat: allow updating obj permissions for keys

* fixes: key object permissions

* fixes: team object permissions

* fixes: org object permissions

* fix vector store selector for Orgs
2025-05-30 17:23:50 -07:00
Krrish Dholakia 40a4e97d8e test: update test 2025-05-27 21:15:22 -07:00
Krrish Dholakia 1cd97e41e9 test: update tests 2025-05-24 12:26:31 -07:00
Ishaan Jaff 702b5fec22 [Feat] Add /image/edits on LiteLLM (#11123)
* feat: add image edits on litellm router

* feat: add image edits endpoint

* fix: use pure async for image edits

* fix: base_process_llm_request

* fix: get_image_content_type

* feat: add image edits endpoint

* add image edits on UI

* test: image edits support

* fix: linting errors

* fix: linting errors

* test fix img gen
2025-05-24 10:18:01 -07:00
Krish Dholakia 1caefb0ce0 fix(ui_sso.py): maintain backwards compatibility for older user id va… (#11106)
* fix(ui_sso.py): maintain backwards compatibility for older user id variations

Fixes issue in later SSO checks which only checked id from result

* fix(internal_user_endpoints.py): handle trailing whitespace in new user email

* fix(internal_user_endpoints.py): apply default_internal_user_settings on all new user calls (even when role not set)

allows role undefined users to be assigned the correct role on sign up

* feat(proxy_server.py): load default user settings from db - update litellm correctly

updates the litellm module with default internal user settings

ensures updated settings actually apply

* test: add unit test

* fix(internal_user_endpoints.py): fix internal user default param role

* fix(ui_sso.py): fix linting error
2025-05-23 23:46:29 -07:00
Krish Dholakia ba2d4d080f feat(handle_jwt.py): map user to team when added via jwt auth (#11108)
* feat(handle_jwt.py): map user to team when added via jwt auth

makes it easy to ensure user belongs to team

* test: test_openai_image_edit_litellm_sdk

* use n 4 for mapped tests (#11109)

* Fix/background health check (#10887)

* fix: improve health check logic by deep copying model list on each iteration

* test: add async test for background health check reflecting model list changes

* fix: validate health check interval before executing background health check

* fix: specify type for health check results dictionary

* fix(user_api_key_auth.py): handle user custom auth set with no custom settings

* bump: version 0.1.21 → 0.2.0

* ci(config.yml): run enterprise and litellm tests separately

* fix: fix linting error

* docs: add missing docs

* [Feat] Add content policy violation error mapping for image editd (#11113)

* feat: add image edit mapping for content policy violations

* test fix

* Expose `/list` and `/info` endpoints for Audit Log events (#11102)

* feat(audit_logging_endpoints.py): expose list endpoint to show all audit logs

make it easier for user to retrieve individual endpoints

* feat(enterprise/): add audit logging endpoint

* feat(audit_logging_endpoints.py): expose new GET `/audit/{id}` endpoint

make it easier to retrieve view individual audit logs

* feat(key_management_event_hooks.py): correctly show the key of the user who initiated the change

* fix(key_management_event_hooks.py): add key rotations as an audit log event

'

* test(test_audit_logging_endpoints.py): add simple unit testing for audit log endpoint

* fix: testing fixes

* fix: fix ruff check

* [Feat] Use aiohttp transport by default - 97% lower median latency  (#11097)

* fix: add flag for disabling use_aiohttp_transport

* feat: add _create_async_transport

* feat: fixes for transport

* add httpx-aiohttp

* feat: fixes for transport

* refactor: fixes for transport

* build: fix deps

* fixes: test fixes

* fix: ensure aiohttp does not auto set content type

* test: test fixes

* feat: add LiteLLMAiohttpTransport

* fix: fixes for responses API handling

* test: fixes for responses API handling

* test: fixes for responses API handling

* feat: fixes for transport

* fix: base embedding handler

* test: test_async_http_handler_force_ipv4

* test: fix failing deepeval test

* fix: add YARL for bedrock urls

* fix: issues with transport

* fix: comment out linting issues

* test fix

* test: XAI is unstable

* test: fixes for using respx

* test: XAI fixes

* test: XAI fixes

* test: infinity testing fixes

* docs(config_settings.md): document param

* test: test_openai_image_edit_litellm_sdk

* test: remove deprecated test

* bump respx==0.22.0

* test: test_xai_message_name_filtering

* test: fix anthropic test after bumping httpx

* use n 4 for mapped tests (#11109)

* fix: use 1 session per event loop

* test: test_client_session_helper

* fix: linting error

* fix: resolving GET requests on httpx 0.28.1

* test fixes proxy unit tests

* fix: add ssl verify settings

* fix: proxy unit tests

* fix: refactor

* tests: basic unit tests for aiohttp transports

* tests: fixes xai

---------

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

* test: cleanup redundant test

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
Co-authored-by: JuHyun Bae <jhyun0408@nate.com>
2025-05-23 23:23:46 -07:00
Ishaan Jaff 86cdb8382b [Feat] Use aiohttp transport by default - 97% lower median latency (#11097)
* fix: add flag for disabling use_aiohttp_transport

* feat: add _create_async_transport

* feat: fixes for transport

* add httpx-aiohttp

* feat: fixes for transport

* refactor: fixes for transport

* build: fix deps

* fixes: test fixes

* fix: ensure aiohttp does not auto set content type

* test: test fixes

* feat: add LiteLLMAiohttpTransport

* fix: fixes for responses API handling

* test: fixes for responses API handling

* test: fixes for responses API handling

* feat: fixes for transport

* fix: base embedding handler

* test: test_async_http_handler_force_ipv4

* test: fix failing deepeval test

* fix: add YARL for bedrock urls

* fix: issues with transport

* fix: comment out linting issues

* test fix

* test: XAI is unstable

* test: fixes for using respx

* test: XAI fixes

* test: XAI fixes

* test: infinity testing fixes

* docs(config_settings.md): document param

* test: test_openai_image_edit_litellm_sdk

* test: remove deprecated test

* bump respx==0.22.0

* test: test_xai_message_name_filtering

* test: fix anthropic test after bumping httpx

* use n 4 for mapped tests (#11109)

* fix: use 1 session per event loop

* test: test_client_session_helper

* fix: linting error

* fix: resolving GET requests on httpx 0.28.1

* test fixes proxy unit tests

* fix: add ssl verify settings

* fix: proxy unit tests

* fix: refactor

* tests: basic unit tests for aiohttp transports

* tests: fixes xai

---------

Co-authored-by: Krrish Dholakia <krrishdholakia@gmail.com>
2025-05-23 22:55:35 -07:00
JuHyun Bae 4d2048e208 Fix/background health check (#10887)
* fix: improve health check logic by deep copying model list on each iteration

* test: add async test for background health check reflecting model list changes

* fix: validate health check interval before executing background health check

* fix: specify type for health check results dictionary
2025-05-23 20:52:35 -07:00
Krrish Dholakia 1857f5d264 test: update test 2025-05-19 21:21:44 -07:00
Krish Dholakia d282babd3e Validate migrating keys to teams + Fix mistral image url on async translation (#10966)
* feat(key_management_endpoints.py): add validation checks for migrating key to team

Ensures requests with migrated key can actually succeed

Prevent migrated keys from failing in prod due to team missing required permissions

* fix(mistral/): fix image url handling for mistral on async call

* fix(key_management_endpoints.py): improve check for running team validation on key update
2025-05-19 21:01:53 -07:00
Jugal D. Bhatt d8525ecbfa Remove extra test file (#10889) 2025-05-16 18:34:22 -07:00
Krrish Dholakia b54e2ae98b test: update unit test 2025-05-15 22:18:15 -07:00
Damian Gleumes 384a7ba94d [Feat]: Configure LiteLLM to Parse User Headers from Open Web UI (#9802)
* add user_header_name

* docs: add per-user tracking to Open WebUI with LiteLLM doc

* docs: standardize "OpenWeb UI" spelling across openweb_ui.md

* docs: improve wording for openweb_ui guide

* fix end_user_id not being set

- move user header parsing to add_litellm_data_to_request
- also set  user_api_key_dict.end_user_id from user header
2025-05-15 22:01:12 -07:00
Jugal D. Bhatt ca4390a166 fix failing test typo (#10843) 2025-05-14 20:46:52 -07:00
Jugal D. Bhatt a754a25828 Feat add retention config (#10815)
* add function to check config flag

* added unit tests

* convert to seconds support

* added in settings.md

* Updated config_settings.md

* remove extra point

* change config var

* resolve conflict
2025-05-14 18:16:25 -07:00
Ishaan Jaff 3130c4f8f9 [Refactor] Move LLM Guard, Secret Detection to Enterprise Pip packagea (#10782)
* refactor: move guardrails to pip

* refactor: move guardrails to pip

* testing fix: move guardrails to pip

* git commit setup_litellm_enterprise_pip
2025-05-13 09:42:22 -07:00
Krish Dholakia a1964eab18 Realtime API - Set 'headers' in scope for websocket auth requests + reliability fix infinite loop when model_name not found for realtime models (#10679)
* fix(user_api_key_auth.py): add 'headers' to constructed request for websocket

Fix issue on some datastructure versions which require a headers field in scope

* test(test_user_api_key_auth.py): add unit testing for headers in scope change

* fix(router.py): migrate `_arealtime` to generic router endpoint

Fix infinite loop on model name missing for realtime api calls

* test(test_router_helper_utils.py): cleanup test post refactor
2025-05-08 22:50:09 -07:00
Ishaan Jaff 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
Ishaan Jaff 299f8f18a0 text fix redis cache 2025-05-03 16:28:43 -07:00
Prathamesh Saraf ac7b1efe5c Refactor budget assertions in tests to improve clarity and accuracy. Updated remaining hours check to ensure positive values and adjusted budget reset time validation for better range checks. (#10500) 2025-05-02 09:02:02 -07:00
Krish Dholakia 711601e22a Add key-level multi-instance tpm/rpm/max parallel request limiting (#10458)
* fix: initial commit of v2 parallel request limiter hook

enables multi-instance rate limiting to work

* fix: subsequent commit with additional refactors

* fix(parallel_request_limiter_v2.py): cleanup initial call hook

simplify it

* fix(parallel_request_limiter_v2.py): working v2 parallel request limiter

* fix: more updates - still not passing testing

* fix(test_parallel_request_limiter_v2.py): update test + add conftest

* fix: fix ruff checks

* fix(parallel_request_limiter_v2.py): use pull via pattern method to load in keys instance wouldn't have seen yet

Fixes issue where redis syncing was not pulling key until instance had seen it

* test: update testing to cover tpm and rpm

* fix(parallel_request_limiter_v2.py): fix ruff errors

* fix(proxy/hooks/__init__.py): feature flag export

* fix(proxy/hooks/__init_.py): fix linting error

* ci(config.yml): add tests/enterprise to ci/cd

* fix: fix ruff check

* test: update testing
2025-04-30 21:32:31 -07:00
Krish Dholakia 290e2528cd Schedule budget resets at expectable times (#10331) (#10333)
* Schedule budget resets at expectable times (#10331)

* Enhance budget reset functionality with timezone support and standardized reset times

- Added `get_next_standardized_reset_time` function to calculate budget reset times based on specified durations and timezones.
- Introduced `timezone_utils.py` to manage timezone retrieval and budget reset time calculations.
- Updated budget reset logic in `reset_budget_job.py`, `internal_user_endpoints.py`, `key_management_endpoints.py`, and `team_endpoints.py` to utilize the new timezone-aware reset time calculations.
- Added unit tests for the new reset time functionality in `test_duration_parser.py`.
- Updated `.gitignore` to include `test.py` and made minor formatting adjustments in `docker-compose.yml` for consistency.

* Fixed linting

* Fix for mypy

* Fixed testcase for reset

* fix(duration_parser.py): move off zoneinfo - doesn't work with python 3.8

* test: update test

* refactor: improve budget reset time calculation and update related tests for accuracy

* clean up imports in team_endpoints.py

* test: update budget remaining hours assertions to reflect new reset time logic

* build(model_prices_and_context_window.json): update model

---------

Co-authored-by: Prathamesh Saraf <pratamesh1867@gmail.com>
2025-04-29 20:59:44 -07:00
Krish Dholakia 839878f4f5 Support x-litellm-api-key header param + allow key at max budget to call non-llm api endpoints (#10392)
* fix(user_api_key_auth.py): fix passing `x-litellm-api-key` to user api key auth

Support using this when given, or bearer token when given

 Fixes issue with auth on vertex passthrough

* test(test_user_api_key_auth.py): use new fastapi.security check

* fix(user_api_key_auth.py): allow key at budget, to still call non-llm api endpoints

Fixes issue where key at budget, couldn't call `/key/info`
2025-04-29 18:57:57 -07:00
Ishaan Jaff f984089b01 [Reliability fix] Redis transaction buffer - ensure all redis queues are periodically flushed (#10393)
* test_e2e_size_of_redis_buffer

* fix store_in_memory_spend_updates_in_redis

* _commit_spend_updates_to_db_with_redis

* daily_tag_spend_update_transactions

* pip install fakeredis==2.28.1
2025-04-28 21:36:54 -07:00
Ishaan Jaff 8ae2653280 fix calculated cache key for tests 2025-04-19 09:25:11 -07:00
Krish Dholakia 1ea046cc61 test: update tests to new deployment model (#10142)
* test: update tests to new deployment model

* test: update model name

* test: skip cohere rbac issue test

* test: update test - replace gpt-4o model
2025-04-18 14:22:12 -07:00
Ishaan Jaff 94a553dbb2 [Feat] Emit Key, Team Budget metrics on a cron job schedule (#9528)
* _initialize_remaining_budget_metrics

* initialize_budget_metrics_cron_job

* initialize_budget_metrics_cron_job

* initialize_budget_metrics_cron_job

* test_initialize_budget_metrics_cron_job

* LITELLM_PROXY_ADMIN_NAME

* fix code qa checks

* test_initialize_budget_metrics_cron_job

* test_initialize_budget_metrics_cron_job

* pod lock manager allow dynamic cron job ID

* fix pod lock manager

* require cronjobid for PodLockManager

* fix DB_SPEND_UPDATE_JOB_NAME acquire / release lock

* add comment on prometheus logger

* add debug statements for emitting key, team budget metrics

* test_pod_lock_manager.py

* test_initialize_budget_metrics_cron_job

* initialize_budget_metrics_cron_job

* initialize_remaining_budget_metrics

* remove outdated test
2025-04-10 16:59:14 -07:00
Krish Dholakia 0d503ad8ad Move daily user transaction logging outside of 'disable_spend_logs' flag - different tables (#9772)
* refactor(db_spend_update_writer.py): aggregate table is entirely different

* test(test_db_spend_update_writer.py): add unit test to ensure if disable_spend_logs is true daily user transactions is still logged

* test: fix test
2025-04-05 09:58:16 -07:00
Ishaan Jaff a64631edfb test pod lock manager 2025-04-02 14:39:40 -07:00
Ishaan Jaff 8dc792139e refactor file structure 2025-04-01 18:30:48 -07:00
Ishaan Jaff 290e837515 test_update_logs_with_spend_logs_url 2025-04-01 18:15:01 -07:00
Ishaan Jaff 4ddca7a79c Merge branch 'main' into litellm_fix_service_account_behavior 2025-04-01 12:04:28 -07:00
Ishaan Jaff c2c5dbf24f test_get_enforced_params 2025-04-01 08:41:53 -07:00
Ishaan Jaff 13aa7f75f6 test_enforced_params_check 2025-04-01 07:40:31 -07:00
Ishaan Jaff 55763ae276 test_end_user_transactions_reset 2025-04-01 07:13:25 -07:00
Ishaan Jaff 923ac2303b test_end_user_transactions_reset 2025-03-31 20:55:13 -07:00
Ishaan Jaff aa8261af89 test fixes 2025-03-31 19:33:10 -07:00
Ishaan Jaff a753fc9d9f test_long_term_spend_accuracy_with_bursts 2025-03-31 19:17:13 -07:00
Ishaan Jaff ce5f55d04e test fix update spend 2025-03-31 14:20:47 -07:00
Krish Dholakia 5c107c64dd Add gemini audio input support + handle special tokens in sagemaker response (#9640)
* fix(internal_user_endpoints.py): cleanup unused variables on beta endpoint

no team/org split on daily user endpoint

* build(model_prices_and_context_window.json): gemini-2.0-flash supports audio input

* feat(gemini/transformation.py): support passing audio input to gemini

* test: fix test

* fix(gemini/transformation.py): support audio input as a url

enables passing google cloud bucket urls

* fix(gemini/transformation.py): support explicitly passing format of file

* fix(gemini/transformation.py): expand support for inferred file types from url

* fix(sagemaker/completion/transformation.py): fix special token error when counting sagemaker tokens

* test: fix import
2025-03-29 19:23:09 -07:00
Krish Dholakia 1604f87663 install prisma migration files - connects litellm proxy to litellm's prisma migration files (#9637)
* build(README.md): initial commit adding a separate folder for additional proxy files. Meant to reduce size of core package

* build(litellm-proxy-extras/): new pip package for storing migration files

allows litellm proxy to use migration files, without adding them to core repo

* build(litellm-proxy-extras/): cleanup pyproject.toml

* build: move prisma migration files inside new proxy extras package

* build(run_migration.py): update script to write to correct folder

* build(proxy_cli.py): load in migration files from litellm-proxy-extras

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

* build: add MIT license to litellm-proxy-extras

* test: update test

* fix: fix schema

* bump: version 0.1.0 → 0.1.1

* build(publish-proxy-extras.sh): add script for publishing new proxy-extras version

* build(liccheck.ini): add litellm-proxy-extras to authorized packages

* fix(litellm-proxy-extras/utils.py): move prisma migrate logic inside extra proxy pkg

easier since migrations folder already there

* build(pre-commit-config.yaml): add litellm_proxy_extras to ci tests

* docs(config_settings.md): document new env var

* build(pyproject.toml): bump relevant files when litellm-proxy-extras version changed

* build(pre-commit-config.yaml): run poetry check on litellm-proxy-extras as well
2025-03-29 15:27:09 -07:00
Krrish Dholakia 217e8d7d44 test: make script to run clearer 2025-03-29 08:23:18 -07:00