Commit graph

161 commits

Author SHA1 Message Date
Krrish Dholakia
ea96eebe85 refactor: move all testing to top-level of repo
Closes https://github.com/BerriAI/litellm/issues/486
2024-09-28 21:08:14 -07:00
Ishaan Jaff
d33a33d283 [Feat-Proxy] add service accounts backend (#5852)
* service_account_settings on config

* add service account checks

* call service_account_checks

* add testing for service accounts
2024-09-23 16:37:02 -07:00
Ishaan Jaff
c226c55d8b fix re-add virtual key auth checks on vertex ai pass thru endpoints (#5827) 2024-09-21 17:34:10 -07:00
Krish Dholakia
d6ca7fed18 LiteLLM Minor Fixes & Improvements (09/20/2024) (#5807)
* fix(vertex_llm_base.py): Handle api_base = ""

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

* fix(o1_transformation.py): handle stream_options not being supported

https://github.com/BerriAI/litellm/issues/5803

* docs(routing.md): fix docs

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

* perf(internal_user_endpoints.py): reduce db calls for getting team_alias for a key

Use the list gotten earlier in `/user/info` endpoint

 Reduces ui keys tab load time to 800ms (prev. 28s+)

* feat(proxy_server.py): support CONFIG_FILE_PATH as env var

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

* feat(get_llm_provider_logic.py): add `litellm_proxy/` as a known openai-compatible route

simplifies calling litellm proxy

Reduces confusion when calling models on litellm proxy from litellm sdk

* docs(litellm_proxy.md): cleanup docs

* fix(internal_user_endpoints.py): fix pydantic obj

* test(test_key_generate_prisma.py): fix test
2024-09-20 20:21:32 -07:00
Ishaan Jaff
9aa027a509 [Feat] Add Error Handling for /key/list endpoint (#5787)
* raise error from unsupported param

* add testing for key list endpoint

* add testing for key list error handling

* fix key list test
2024-09-19 17:14:12 -07:00
Ishaan Jaff
a252c95c7f [Feat-Proxy] Add upperbound key duration param (#5727)
* add upperbound key duration param

* use upper bound values when None set

* docs upperbound params
2024-09-16 16:28:36 -07:00
Krish Dholakia
713d762411 LiteLLM Minor Fixes and Improvements (09/13/2024) (#5689)
* refactor: cleanup unused variables + fix pyright errors

* feat(health_check.py): Closes https://github.com/BerriAI/litellm/issues/5686

* fix(o1_reasoning.py): add stricter check for o-1 reasoning model

* refactor(mistral/): make it easier to see mistral transformation logic

* fix(openai.py): fix openai o-1 model param mapping

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

* feat(main.py): infer finetuned gemini model from base model

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

* docs(vertex.md): update docs to call finetuned gemini models

* feat(proxy_server.py): allow admin to hide proxy model aliases

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

* docs(load_balancing.md): add docs on hiding alias models from proxy config

* fix(base.py): don't raise notimplemented error

* fix(user_api_key_auth.py): fix model max budget check

* fix(router.py): fix elif

* fix(user_api_key_auth.py): don't set team_id to empty str

* fix(team_endpoints.py): fix response type

* test(test_completion.py): handle predibase error

* test(test_proxy_server.py): fix test

* fix(o1_transformation.py): fix max_completion_token mapping

* test(test_image_generation.py): mark flaky test
2024-09-14 10:02:55 -07:00
Krish Dholakia
7f47c48b35 LiteLLM Minor Fixes and Improvements (09/10/2024) (#5618)
* fix(cost_calculator.py): move to debug for noisy warning message on cost calculation error

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

* fix(databricks/cost_calculator.py): Handles model name issues for databricks models

* fix(main.py): fix stream chunk builder for multiple tool calls

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

* fix: correctly set user_alias when passed in

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

* fix(types/utils.py): allow passing role for message object

https://github.com/BerriAI/litellm/issues/5621

* fix(litellm_logging.py): Fix langfuse logging across multiple projects

Fixes issue where langfuse logger was re-using the old logging object

* feat(proxy/_types.py): support adding key-based tags for tag-based routing

Enable tag based routing at key-level

* fix(proxy/_types.py): fix inheritance

* test(test_key_generate_prisma.py): fix test

* test: fix test

* fix(litellm_logging.py): return used callback object
2024-09-11 11:30:29 -07:00
Ishaan Jaff
b3629ebdc5 allow passing expiry time to /key/regenerate 2024-09-06 08:36:34 -07:00
Ishaan Jaff
db9507367f move prisma test to correct location 2024-09-05 15:50:39 -07:00
Ishaan Jaff
dee88751ed move folder key gen prisma is in 2024-09-05 15:24:00 -07:00
Ishaan Jaff
04d9398c64 fix tests on viewing spend logs 2024-09-05 13:17:03 -07:00
Ishaan Jaff
0d153a23b0 fix test_call_with_key_over_budget 2024-09-05 13:08:13 -07:00
Ishaan Jaff
7a367bddc4 reset general settings post test 2024-09-03 15:33:22 -07:00
Ishaan Jaff
daaca2760e add test for admin only routes 2024-09-03 15:26:42 -07:00
Ishaan Jaff
bdffca4f12 add test_team_tags to set / update tags 2024-08-29 13:02:57 -07:00
Ishaan Jaff
d25c8ce31a def test_get_bearer_token():
fix
2024-08-27 22:03:54 -07:00
Ishaan Jaff
dd0d8658e1 update key name when regenerating a key 2024-08-26 18:40:51 -07:00
Ishaan Jaff
d14b1433ee test test_regenerate_api_key 2024-08-26 18:00:51 -07:00
Ishaan Jaff
5ffee5875c fix test_master_key_hashing 2024-08-21 17:56:09 -07:00
Ishaan Jaff
50e9d05921 feat control guardrails per API Key 2024-08-20 08:16:28 -07:00
Ishaan Jaff
888afa2d08 Merge pull request #5263 from BerriAI/litellm_support_access_groups
[Feat-Proxy] Use model access groups for teams
2024-08-17 17:11:11 -07:00
Ishaan Jaff
b718bf9b0a feat add model access groups for teams 2024-08-17 17:10:10 -07:00
Ishaan Jaff
77177ff469 fix test update tpm / rpm limits for a key 2024-08-17 16:57:23 -07:00
Ishaan Jaff
2c5f5996f3 add tpm limits per api key per model 2024-08-17 13:20:55 -07:00
Ishaan Jaff
2b79e44fc5 fix internal user tests to pass 2024-08-12 12:11:23 -07:00
Krrish Dholakia
83180c50f7 fix(utils.py): only return non-null default values 2024-08-09 16:34:59 -07:00
Krrish Dholakia
86a3dba1bf refactor(user_api_key_auth.py): refactor to replace user_id_information list with pydantic user_obj
Allows using the 'get_user_object' function in user_api_key_auth, keeping it consistent across jwt-auth and key-auth
2024-08-07 15:33:55 -07:00
Krrish Dholakia
228da08b81 fix: fix tests 2024-08-07 15:02:04 -07:00
Ishaan Jaff
936fa63468 fix test cache_key 2024-08-05 21:09:36 -07:00
Ishaan Jaff
cff124433c fix cache_key check 2024-08-05 21:04:25 -07:00
Krrish Dholakia
77dbc1e723 test(test_key_generate_prisma.py): cleanup test 2024-08-05 20:29:53 -07:00
Krrish Dholakia
4ba576724c test: improve debugging for test 2024-08-05 19:41:08 -07:00
Krrish Dholakia
030092e555 test: fix testing 2024-07-31 11:50:03 -07:00
Krrish Dholakia
04a646c321 fix(test_key_generate_prisma.py): pass user_api_key_dict to test call 2024-07-17 08:29:21 -07:00
Ishaan Jaff
cfcfd6da9c test_custom_api_key_header_name 2024-07-16 16:37:43 -07:00
Ishaan Jaff
411ebf8f85 test updating user role 2024-07-13 13:13:40 -07:00
Ishaan Jaff
59bf9275b2 test expired key raises correct exception 2024-07-12 18:45:01 -07:00
Ishaan Jaff
a7a6567da4 test /threads endpoint 2024-07-09 12:17:42 -07:00
Ishaan Jaff
6327ce339a test type of budget errors 2024-07-08 12:52:40 -07:00
Ishaan Jaff
6d16a1e20a fix testing spend_tracking 2024-06-21 16:52:42 -07:00
Ishaan Jaff
bd9b9ad9d5 test_call_with_end_user_over_budget 2024-06-20 21:08:06 -07:00
Ishaan Jaff
74bfac739d fix test_call_with_end_user_over_budget 2024-06-20 19:54:34 -07:00
Ishaan Jaff
9b913c7aae test - key test_call_with_key_over_budget_no_cache 2024-06-20 17:30:03 -07:00
Ishaan Jaff
b7c5700b54 fix- refactor proxy place internal user endpoints in sep file 2024-06-15 16:39:06 -07:00
Ishaan Jaff
abb544190a fix - refactor key endpoints 2024-06-15 14:13:32 -07:00
Ishaan Jaff
9b655c9ef7 use directories for importing new endpoints 2024-06-15 13:35:21 -07:00
Ishaan Jaff
b1599c3f40 refactor spend endpoints 2024-06-15 12:17:33 -07:00
Ishaan Jaff
897f6bc7ea feat - refactor team endpoints 2024-06-15 11:40:36 -07:00
Ishaan Jaff
b0b9bb9906 test fix _get_bearer_token 2024-06-15 10:51:44 -07:00