Commit graph

106 commits

Author SHA1 Message Date
Krish Dholakia
55a20c7cce
Merge pull request #4084 from BerriAI/litellm_batch_add_team_members
fix(proxy_server.py): allow passing in a list of team members
2024-06-10 20:26:35 -07:00
Ishaan Jaff
a27f7e2817 feat - log exceptions to OTEL 2024-06-10 12:34:18 -07:00
Krrish Dholakia
d066e0e152 fix(proxy/_types.py): fix validation check 2024-06-08 22:56:56 -07:00
Ishaan Jaff
73d66e94c5 test - enforce params 2024-06-06 09:22:12 -07:00
Ishaan Jaff
83aa9151af fix test 2024-05-31 12:49:38 -07:00
Ishaan Jaff
21831905ba fix test_generate_and_call_with_valid_key 2024-05-30 15:10:16 -07:00
Ishaan Jaff
a4b6a959d8 fix literal usage 2024-05-30 14:28:53 -07:00
Ishaan Jaff
6166381579 fix migrate to LitellmUserRoles 2024-05-30 13:57:50 -07:00
Ishaan Jaff
6f063156be fix test_call_with_end_user_over_budget 2024-05-29 20:48:29 -07:00
Ishaan Jaff
3e9410ffd6 fix - test budget exceeded prisma 2024-05-29 20:31:55 -07:00
Ishaan Jaff
59cb306d47 fix - __team_info 2024-05-25 15:36:20 -07:00
Ishaan Jaff
e2d3c0c846 fix - updating team 2024-05-25 15:31:25 -07:00
Ishaan Jaff
22d8eaab93 test - new_team 2024-05-25 15:20:49 -07:00
Krrish Dholakia
84f3690453 test(test_key_generate_prisma.py): fix tests with unique team id 2024-05-23 08:46:44 -07:00
Marc Abramowitz
4194bafae0 Add nicer test ids when using pytest -v
Replace:

```
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route0] PASSED
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route10] PASSED
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route11] PASSED
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route12] PASSED
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route13] PASSED
test_key_generate_prisma.py::test_generate_and_call_with_valid_key[api_route14] PASSED
````

with:

```
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'audio_transcriptions', 'path': '/audio/transcriptions'}] PASSED
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'audio_transcriptions', 'path': '/v1/audio/transcriptions'}] PASSED
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'chat_completion', 'path': '/chat/completions'}] PASSED
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'chat_completion', 'path': '/engines/{model}/chat/completions'}] PASSED
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'chat_completion', 'path': '/openai/deployments/{model}/chat/completions'}] PASSED
litellm/tests/test_key_generate_prisma.py::test_generate_and_call_with_valid_key[{'route': 'chat_completion', 'path': '/v1/chat/completions'}] PASSED
```
2024-05-16 11:34:22 -07:00
Marc Abramowitz
cf71857354 Add more routes to test_generate_and_call_with_valid_key 2024-05-16 10:44:36 -07:00
Marc Abramowitz
dc52c83b88 Add more routes to test_generate_and_call_with_valid_key 2024-05-16 10:05:35 -07:00
Marc Abramowitz
d5b2e8e7e8 Make test_generate_and_call_with_valid_key parametrized
This allows us to test the same code with different routes.
For example, it lets us test the `/engines/{model}/chat/completions`
route, which https://github.com/BerriAI/litellm/pull/3663 fixes.
2024-05-16 09:54:10 -07:00
Ishaan Jaff
ca41e6590e test - auth on /reset/spend 2024-05-14 11:28:35 -07:00
Krrish Dholakia
e3f25a4a1f fix(auth_checks.py): fix 'get_end_user_object'
await cache get
2024-05-09 13:05:56 -07:00
Ishaan Jaff
a909af3fc0 (ci/cd) fix test_master_key_hashing 2024-04-20 14:50:34 -07:00
Ishaan Jaff
7ebf2ca4d9 (ci/cd) testing with team_id and /user/new 2024-04-20 11:09:34 -07:00
Ishaan Jaff
5b55900d8e fix - view spend per user 2024-04-18 20:23:04 -07:00
Krrish Dholakia
bafb008b44 fix(_types.py): hash api key, if given
fixes https://github.com/BerriAI/litellm/issues/2114
2024-04-17 16:43:35 -07:00
Ishaan Jaff
860d97c342 fix test_key_name_null 2024-04-16 21:37:31 -07:00
Ishaan Jaff
2ad2d6cf9f return correct response from user/new 2024-04-16 08:17:45 -07:00
Krrish Dholakia
8857c9b978 test(test_key_generate_prisma.py): add better unit testing for spend logs on proxy server 2024-04-09 17:58:18 -07:00
Krrish Dholakia
4495f6c058 test(test_key_generate_prisma.py): fix check for raising error if key generate max budget > key upperbound 2024-04-09 13:07:57 -07:00
Ishaan Jaff
afd81f1609 test new team request 2024-04-02 20:52:16 -07:00
Krrish Dholakia
d7601a4844 perf(proxy_server.py): batch write spend logs
reduces prisma client errors, by batch writing spend logs - max 1k logs at a time
2024-04-02 18:46:55 -07:00
Ishaan Jaff
3245d8cdce support all-proxy-models for teams 2024-04-02 16:04:09 -07:00
Ishaan Jaff
b83c452ddd support all-models-on-proxy 2024-04-02 15:52:54 -07:00
Ishaan Jaff
73ef4780f7 (fix) support all-models alias on backend 2024-04-02 15:12:37 -07:00
Krrish Dholakia
cbf35087c7 test(test_key_generate_prisma.py): fix test 2024-03-29 20:30:43 -07:00
Krrish Dholakia
3810b050c1 fix(proxy_server.py): increment cached global proxy spend object 2024-03-29 20:02:31 -07:00
Krrish Dholakia
5280fc809f fix(proxy_server.py): enforce end user budgets with 'litellm.max_end_user_budget' param 2024-03-29 17:14:40 -07:00
ishaan-jaff
fd93a68b0d (fix) fix error message raised on passing invalid tokens 2024-03-15 14:50:34 -07:00
Krrish Dholakia
1b807fa3f5 fix(proxy_server.py): fix key caching logic 2024-03-13 19:10:24 -07:00
Krrish Dholakia
917f92800d test(test_key_generate_prisma.py): fix tests 2024-03-11 15:24:42 -07:00
Krrish Dholakia
64aeb088d9 test(test_key_generate_prisma.py): fix test 2024-03-11 14:59:11 -07:00
Krrish Dholakia
d1644db8ce test(test_key_generate_prisma.py): fix test to only let admin delete a key 2024-03-11 14:18:01 -07:00
ishaan-jaff
bbb303bb54 (ci/cd) fix test_proxy_load_test_db 2024-02-28 18:02:32 -08:00
Krrish Dholakia
6a94ef6c16 fix(proxy_server.py): introduces a beta endpoint for admin to view global spend 2024-02-28 12:47:51 -08:00
Krrish Dholakia
7942539f9b test: testing fixes 2024-02-26 19:10:05 -08:00
Krrish Dholakia
d0c205fcd1 fix(proxy_server.py): don't cache request on key generate - misses the team related data 2024-02-26 18:48:55 -08:00
ishaan-jaff
476f401b74 (feat) update non default values 2024-02-20 18:55:20 -08:00
ishaan-jaff
2e074a8585 (test) test_call_with_key_over_model_budget 2024-02-16 17:45:49 -08:00
Krrish Dholakia
f4dc643b1c test(test_key_generate_prisma.py): fix test import 2024-02-10 16:16:12 -08:00
ishaan-jaff
196787359f (test) track_cost_ for end users 2024-02-06 15:25:51 -08:00
ishaan-jaff
4d4554b0e4 (test) test_upperbound_key_params 2024-02-05 22:39:36 -08:00