Commit graph

117 commits

Author SHA1 Message Date
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
Ishaan Jaff
5b6f22b5dd test fix key gen prisma 2024-06-15 10:49:14 -07:00
Ishaan Jaff
83a7d1e4aa fix - update team 2024-06-13 17:34:17 -07:00
Ishaan Jaff
206791f166 Merge pull request #4138 from BerriAI/litellm_log_management_endpoint_logs_otel
[FEAT]  log management endpoint logs to otel
2024-06-11 19:00:13 -07:00
Ishaan Jaff
f9fd962191 fix team endpoints 2024-06-11 18:10:20 -07:00
Krrish Dholakia
2a5a30fa7a fix(proxy_server.py): use consistent 400-status code error code for exceeded budget errors
standardizes error code for budget exceeded errors to status code 400
2024-06-11 16:10:58 -07:00
Krish Dholakia
b2cc37c971 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
185da8fd61 feat - log exceptions to OTEL 2024-06-10 12:34:18 -07:00
Krrish Dholakia
b0d5b94040 fix(proxy/_types.py): fix validation check 2024-06-08 22:56:56 -07:00
Ishaan Jaff
86f9e13711 test - enforce params 2024-06-06 09:22:12 -07:00
Ishaan Jaff
01d365fe99 fix test 2024-05-31 12:49:38 -07:00
Ishaan Jaff
720a470e3a fix test_generate_and_call_with_valid_key 2024-05-30 15:10:16 -07:00
Ishaan Jaff
b7dabe9bed fix literal usage 2024-05-30 14:28:53 -07:00
Ishaan Jaff
dc51fec22e fix migrate to LitellmUserRoles 2024-05-30 13:57:50 -07:00
Ishaan Jaff
6f50e7681d fix test_call_with_end_user_over_budget 2024-05-29 20:48:29 -07:00
Ishaan Jaff
5d3435aff8 fix - test budget exceeded prisma 2024-05-29 20:31:55 -07:00
Ishaan Jaff
87cef92a7e fix - __team_info 2024-05-25 15:36:20 -07:00
Ishaan Jaff
8efa76f1a4 fix - updating team 2024-05-25 15:31:25 -07:00
Ishaan Jaff
61bc6fae63 test - new_team 2024-05-25 15:20:49 -07:00
Krrish Dholakia
4095c1cbfe test(test_key_generate_prisma.py): fix tests with unique team id 2024-05-23 08:46:44 -07:00
Marc Abramowitz
156d04ec43 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
7b107ec165 Add more routes to test_generate_and_call_with_valid_key 2024-05-16 10:44:36 -07:00
Marc Abramowitz
98da3af032 Add more routes to test_generate_and_call_with_valid_key 2024-05-16 10:05:35 -07:00
Marc Abramowitz
a42fec803c 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
dd20907eab test - auth on /reset/spend 2024-05-14 11:28:35 -07:00
Krrish Dholakia
29ef2261f9 fix(auth_checks.py): fix 'get_end_user_object'
await cache get
2024-05-09 13:05:56 -07:00
Ishaan Jaff
42257d40c5 (ci/cd) fix test_master_key_hashing 2024-04-20 14:50:34 -07:00
Ishaan Jaff
d55237442b (ci/cd) testing with team_id and /user/new 2024-04-20 11:09:34 -07:00
Ishaan Jaff
44207fd404 fix - view spend per user 2024-04-18 20:23:04 -07:00
Krrish Dholakia
013611a676 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
539b5dd562 fix test_key_name_null 2024-04-16 21:37:31 -07:00
Ishaan Jaff
3ad0651b59 return correct response from user/new 2024-04-16 08:17:45 -07:00
Krrish Dholakia
ce9ea28e42 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
dab219d4d7 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
865cfd8c9f test new team request 2024-04-02 20:52:16 -07:00
Krrish Dholakia
029ee15951 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
6534f887cc support all-proxy-models for teams 2024-04-02 16:04:09 -07:00
Ishaan Jaff
857a7c9135 support all-models-on-proxy 2024-04-02 15:52:54 -07:00
Ishaan Jaff
78edb29a29 (fix) support all-models alias on backend 2024-04-02 15:12:37 -07:00
Krrish Dholakia
610b811033 test(test_key_generate_prisma.py): fix test 2024-03-29 20:30:43 -07:00
Krrish Dholakia
9fc8b8a215 fix(proxy_server.py): increment cached global proxy spend object 2024-03-29 20:02:31 -07:00
Krrish Dholakia
49e2624240 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
37be2ba569 (fix) fix error message raised on passing invalid tokens 2024-03-15 14:50:34 -07:00
Krrish Dholakia
3232feb123 fix(proxy_server.py): fix key caching logic 2024-03-13 19:10:24 -07:00
Krrish Dholakia
84a32370b8 test(test_key_generate_prisma.py): fix tests 2024-03-11 15:24:42 -07:00