Commit graph

4651 commits

Author SHA1 Message Date
Ishaan Jaff
758182fc7f fix typo on codebase 2025-03-27 22:36:00 -07:00
Ishaan Jaff
fc46f6b861 fix db spend update buffer 2025-03-27 22:34:15 -07:00
Ishaan Jaff
1bfffadd05 fix typo 2025-03-27 22:31:38 -07:00
Ishaan Jaff
9139230531 update the correct set of txs 2025-03-27 21:54:12 -07:00
Ishaan Jaff
aa6c34cb97 use lock manager for update spend job 2025-03-27 21:43:02 -07:00
Ishaan Jaff
dd00429ade update schema 2025-03-27 21:36:22 -07:00
Ishaan Jaff
ea93a09b7a add model CronJob 2025-03-27 21:10:26 -07:00
Ishaan Jaff
e65b708fa2 get_all_update_transactions_from_redis 2025-03-27 19:15:30 -07:00
Ishaan Jaff
963791bbb5 use redis update buffer class 2025-03-27 19:12:51 -07:00
Ishaan Jaff
ad72078167 basic structure for commit update txs to redis 2025-03-27 18:21:33 -07:00
Ishaan Jaff
894306141e refactor, use commit_update_transactions_to_db 2025-03-27 18:07:23 -07:00
Krish Dholakia
fb83567a03
Litellm new UI build (#9601)
* build: new ui build

* build: new ui build

* fix(proxy_server.py): only show user models their key can access on `/models`

* fix(model_management_endpoints.py): ensure team admin can add models

* test: update unit testing to reflect changes

* fix(model_dashboard.tsx): fix sizing on models page

* build: fix ui
2025-03-27 17:15:25 -07:00
Ishaan Jaff
b721b2b4ac use DBSpendUpdateWriter common function for 2025-03-27 17:04:50 -07:00
Ishaan Jaff
403f2ef68d use simple static methods for updating spend 2025-03-27 16:57:12 -07:00
Ishaan Jaff
7995fd7c98 fix DBSpendUpdateWriter 2025-03-27 16:44:46 -07:00
Ishaan Jaff
a0fd508de4 DBSpendUpdateWriter 2025-03-27 16:43:18 -07:00
Ishaan Jaff
072be44a54 fix get_credentials job 2025-03-27 16:34:06 -07:00
Ishaan Jaff
21e3b764f5 use DBSpendUpdateWriter class for managing DB spend updates 2025-03-27 16:31:23 -07:00
Krish Dholakia
63c9f59373
Allow team admins to add/update/delete models on UI + show api base and model id on request logs (#9572)
* feat(view_logs.tsx): show model id + api base in request logs

easier debugging

* fix(index.tsx): fix length of api base

easier viewing

* refactor(leftnav.tsx): show models tab to team admin

* feat(model_dashboard.tsx): add explainer for what the 'models' page is for team admin

helps them understand how they can use it

* feat(model_management_endpoints.py): restrict model add by team to just team admin

allow team admin to add models via non-team keys (e.g. ui token)

* test(test_add_update_models.py): update unit testing for new behaviour

* fix(model_dashboard.tsx): show user the models

* feat(proxy_server.py): add new query param 'user_models_only' to `/v2/model/info`

Allows user to retrieve just the models they've added

Used in UI to show internal users just the models they've added

* feat(model_dashboard.tsx): allow team admins to view their own models

* fix: allow ui user to fetch model cost map

* feat(add_model_tab.tsx): require team admins to specify team when onboarding models

* fix(_types.py): add `/v1/model/info` to info route

`/model/info` was already there

* fix(model_info_view.tsx): allow user to edit a model they created

* fix(model_management_endpoints.py): allow team admin to update team model

* feat(model_managament_endpoints.py): allow team admin to delete team models

* fix(model_management_endpoints.py): don't require team id to be set when adding a model

* fix(proxy_server.py): fix linting error

* fix: fix ui linting error

* fix(model_management_endpoints.py): ensure consistent auth checks on all model calls

* test: remove old test - function no longer exists in same form

* test: add updated mock testing
2025-03-27 12:06:31 -07:00
Krish Dholakia
c0845fec1f
Add OpenAI gpt-4o-transcribe support (#9517)
* refactor: introduce new transformation config for gpt-4o-transcribe models

* refactor: expose new transformation configs for audio transcription

* ci: fix config yml

* feat(openai/transcriptions): support provider config transformation on openai audio transcriptions

allows gpt-4o and whisper audio transformation to work as expected

* refactor: migrate fireworks ai + deepgram to new transform request pattern

* feat(openai/): working support for gpt-4o-audio-transcribe

* build(model_prices_and_context_window.json): add gpt-4o-transcribe to model cost map

* build(model_prices_and_context_window.json): specify what endpoints are supported for `/audio/transcriptions`

* fix(get_supported_openai_params.py): fix return

* refactor(deepgram/): migrate unit test to deepgram handler

* refactor: cleanup unused imports

* fix(get_supported_openai_params.py): fix linting error

* test: update test
2025-03-26 23:10:25 -07:00
Ishaan Jaff
34e58be36d fix order of _setup_prisma_client 2025-03-26 20:42:01 -07:00
Ishaan Jaff
427580eff5 fix _setup_prisma_client 2025-03-26 20:35:27 -07:00
Ishaan Jaff
15c04da735 refactor tests 2025-03-26 20:00:10 -07:00
Ishaan Jaff
88ef97b9d1 allow proxy to startup on DB unavailable 2025-03-26 19:50:57 -07:00
Ishaan Jaff
497570b2a6 bug fix - allow pods to startup when DB is unavailable 2025-03-26 19:49:51 -07:00
Ishaan Jaff
7142b0b610 refactor PrismaDBExceptionHandler 2025-03-26 19:22:24 -07:00
Ishaan Jaff
0155b0eba2
Merge pull request #9533 from BerriAI/litellm_stability_fixes
[Reliability Fixes] - Gracefully handle exceptions when DB is having an outage
2025-03-26 18:57:38 -07:00
Krish Dholakia
37265c8b1c
Add Daily User Spend Aggregate view - allows UI Usage tab to work > 1m rows (#9538)
* ci: update github action

* build(schema.prisma): enable daily user spend table

allows storing aggregate view of user's daily spend

* build(schema.prisma): add new daily user spend table

* feat: working daily user spend tracking

maintains an aggregate view for easier querying in high traffic

* setup_google_dns

* ci: update ci yaml

---------

Co-authored-by: Ishaan Jaff <ishaanjaffer0324@gmail.com>
2025-03-26 16:36:36 -07:00
Ishaan Jaff
23aa7f81b5 fix ProxyException 2025-03-26 15:53:33 -07:00
Ishaan Jaff
ff33ed020c fix auth checks 2025-03-26 15:45:58 -07:00
Ishaan Jaff
8bd2081dec fix get_key_object 2025-03-26 15:41:40 -07:00
Ishaan Jaff
f8caebc54b is_database_connection_error 2025-03-26 14:55:40 -07:00
Ishaan Jaff
044c56c439 Merge branch 'main' into litellm_stability_fixes 2025-03-26 14:41:43 -07:00
Ishaan Jaff
22dfc4dea9 fix user_api_key_auth example config 2025-03-26 08:36:11 -07:00
Krish Dholakia
6fd18651d1
Support litellm.api_base for vertex_ai + gemini/ across completion, embedding, image_generation (#9516)
All checks were successful
Read Version from pyproject.toml / read-version (push) Successful in 19s
Helm unit test / unit-test (push) Successful in 20s
* test(tests): add unit testing for litellm_proxy integration

* fix(cost_calculator.py): fix tracking cost in sdk when calling proxy

* fix(main.py): respect litellm.api_base on `vertex_ai/` and `gemini/` routes

* fix(main.py): consistently support custom api base across gemini + vertexai on embedding + completion

* feat(vertex_ai/): test

* fix: fix linting error

* test: set api base as None before starting loadtest
2025-03-25 23:46:20 -07:00
Ishaan Jaff
b4e745323a add test config 2025-03-25 19:21:51 -07:00
Ishaan Jaff
ce49e27217 fixes for auth checks 2025-03-25 15:44:13 -07:00
Ishaan Jaff
59040167ac fix ProxyErrorTypes 2025-03-25 14:40:11 -07:00
Ishaan Jaff
4c87084ff7 UserAPIKeyAuthExceptionHandler 2025-03-25 14:07:14 -07:00
Krish Dholakia
bd309a28c5
Merge pull request #9512 from BerriAI/litellm_dev_03_24_2025_p3
fix(invoke_handler.py): remove hard coded chunk on streaming usage
2025-03-24 21:21:36 -07:00
Ishaan Jaff
863fe3a4d2 fix import mcp router 2025-03-24 21:08:24 -07:00
Ishaan Jaff
fb3a67ba8d fix code quality 2025-03-24 21:06:17 -07:00
Ishaan Jaff
dcc2edbd4d fix mcp import 2025-03-24 21:02:54 -07:00
Ishaan Jaff
08a4ba1b7e Merge branch 'main' into litellm_exp_mcp_server 2025-03-24 19:03:56 -07:00
Ishaan Jaff
002837f962 fix linting errors 2025-03-24 18:48:43 -07:00
Krrish Dholakia
5089dbfcfb fix(invoke_handler.py): remove hard code 2025-03-24 17:58:26 -07:00
Krrish Dholakia
6a0cf3db50 fix(litellm_logging.py): always log the api base
Fixes issue where api base missing from spend logs due to refactor
2025-03-24 13:45:39 -07:00
Ishaan Jaff
8b8fca1e20 fix mcp type imports 2025-03-24 11:01:29 -07:00
Ishaan Jaff
5017332690 fix pydantic import error 2025-03-24 07:11:48 -07:00
Tyler Hutcherson
7864cd1f76 update redisvl dependency 2025-03-24 08:42:11 -04:00