Ishaan Jaff
f22581bf93
fix - flush langfuse logs on proxy shutdown
2024-05-16 09:21:48 -07:00
Krish Dholakia
07a1cf39e8
Merge branch 'main' into litellm_end_user_cost_tracking
2024-05-15 22:27:04 -07:00
Krish Dholakia
b6e9a9be78
Merge pull request #3666 from BerriAI/litellm_jwt_fix
...
feat(proxy_server.py): JWT-Auth improvements
2024-05-15 22:22:44 -07:00
Krrish Dholakia
93cb65dfee
feat(proxy_server.py): support 'user_id_upsert' flag for jwt_auth
2024-05-15 22:19:59 -07:00
Krrish Dholakia
da2ea0ba04
feat(proxy_server.py): make team_id optional for jwt token auth (only enforced, if set)
...
Allows users to use jwt auth for internal chat apps
2024-05-15 21:05:14 -07:00
Ishaan Jaff
b81377ddb4
Merge pull request #3661 from BerriAI/litellm_enable_alerts_completions_endpoint
...
[FIX] raise alerts for exceptions on `/completions` endpoint
2024-05-15 20:46:02 -07:00
Krish Dholakia
d294e26fdb
Merge pull request #3660 from BerriAI/litellm_proxy_ui_general_settings
...
feat(proxy_server.py): Enabling Admin to control general settings on proxy ui
2024-05-15 20:36:42 -07:00
Krrish Dholakia
3f339cb694
fix(parallel_request_limiter.py): fix max parallel request limiter on retries
2024-05-15 20:16:11 -07:00
Krrish Dholakia
92dbe5f7fe
build(ui/general_settings.tsx): support updating global max parallel requests on the ui
2024-05-15 19:26:57 -07:00
Marc Abramowitz
d7f4ebb94a
Allow non-admins to use OpenAI routes
...
The problem we were having is non-admin users trying to use
`/engines/{model}/chat/completions` were getting an HTTP 401 error.
```shell
$ curl -sSL 'http://localhost:4000/engines/gpt-35-turbo-0125/chat/completions ' \
--header "Authorization: Bearer ${LITELLM_KEY}" \
--header 'Content-Type: application/json' \
--data ' {
"model": "gpt-35-turbo-0125",
"messages": [
{
"role": "user",
"content": "Write a poem about LiteLLM"
}
]
}' \
| jq '.'
{
"error": {
"message": "Authentication Error, Only proxy admin can be used to generate, delete, update info for new keys/users/teams. Route=/engines/gpt-35-turbo-0125/chat/completions. Your role=unknown. Your user_id=someone@company.com",
"type": "auth_error",
"param": "None",
"code": 401
}
}
```
This seems to be related to code in `user_api_key_auth` that checks that the URL
matches a list of routes that are allowed for non-admin users, where the list of
routes is in `LiteLLMRoutes.openai_routes.value`. The problem is that the route
`/engines/{model}/chat/completions` is not in that list and furthermore, that
wouldn't even work if it were, because the comparison is done with
`request.url.path` and that will have the actual model name in it (e.g.:
`gpt-35-turbo-0125`), rather than `{model}`.
I added a new list `LiteLLMRoutes.openai_route_names` and added the route
**names** to that list. Then I added a check in `user_api_key_auth` to see if
the route name is in the list of route names.
2024-05-15 17:36:11 -07:00
Ishaan Jaff
e022d7d197
fix - /organization/new logic
2024-05-15 17:27:46 -07:00
Ishaan Jaff
e5998bf0fb
fix - show alerts on /completions endpoint
2024-05-15 15:45:21 -07:00
Krrish Dholakia
ed9fe2e122
feat(proxy_server.py): Enabling Admin to control general settings on proxy ui
2024-05-15 15:26:57 -07:00
Ishaan Jaff
d847c4cb9c
Merge pull request #3655 from BerriAI/litellm_only_show_debug_info_server_side
...
Fix Proxy Server - only show API base, Model server log exceptions, not on client side
2024-05-15 14:20:14 -07:00
Ishaan Jaff
54c06f58ab
fix - show litellm debug info in errors
2024-05-15 14:18:12 -07:00
Ishaan Jaff
e3b02653c4
fix - don't raise hanging request alert for /completions
2024-05-15 10:27:02 -07:00
Krrish Dholakia
9945387d7a
feat(proxy_server.py): new /end_user/info
endpoint
...
get spend for a specific end-user
2024-05-15 09:50:52 -07:00
Krrish Dholakia
beffc3db45
refactor(proxy_server.py): update doc string for /user/update
2024-05-15 08:25:14 -07:00
Ishaan Jaff
41ef6a8462
fix check_request_disconnected = None case
2024-05-14 20:38:32 -07:00
Ishaan Jaff
eb882bb103
feat - cancel tasks when fast api request is cancelled
2024-05-14 19:58:51 -07:00
Ishaan Jaff
2a2791cab5
fix - return success spend reset
2024-05-14 11:38:39 -07:00
Ishaan Jaff
9fded05246
fix security for global_spend_reset
2024-05-14 11:04:50 -07:00
Ishaan Jaff
84629ef78a
feat - reset spend per team, api_key
2024-05-13 18:23:23 -07:00
Ishaan Jaff
8e7f2e93af
backend - show spend per tag by time
2024-05-13 17:13:48 -07:00
Ishaan Jaff
255c39a7c8
feat - /spend/report endpoint
2024-05-13 15:01:02 -07:00
Ishaan Jaff
d512e81a34
fix - show team based spend reports
2024-05-13 13:56:48 -07:00
Ishaan Jaff
471cb148cb
Merge pull request #3609 from BerriAI/litellm_send_daily_spend_report
...
[Feat] send weekly spend reports by Team/Tag
2024-05-13 12:45:37 -07:00
Ishaan Jaff
9da8443fd7
fix - only schedule spend alerting when db is not none
2024-05-13 12:30:54 -07:00
Ishaan Jaff
77191ff98a
test - weekly / monthly spend report alerts on /health/services
2024-05-13 10:50:26 -07:00
Ishaan Jaff
fa94632bc2
schedule weekly/monthly spend reports
2024-05-13 10:44:19 -07:00
Ishaan Jaff
09c064c94c
feat - show monthly spend reports
2024-05-13 10:10:44 -07:00
Ishaan Jaff
63e4176502
feat - _get_weekly_spend_reports
2024-05-13 09:26:51 -07:00
Krrish Dholakia
5f5fdb439b
fix(proxy_server.py): return 'allowed-model-region' in headers
2024-05-13 08:48:16 -07:00
Ishaan Jaff
e82c00622e
Merge pull request #3587 from BerriAI/litellm_proxy_use_batch_completions_model_csv
...
[Feat] Use csv values for proxy batch completions (OpenAI Python compatible)
2024-05-13 07:55:12 -07:00
Krrish Dholakia
2e89f56507
fix(proxy_server.py): linting fix
2024-05-11 22:05:01 -07:00
Ishaan Jaff
a844423e00
fix - use csv list for batch completions
2024-05-11 14:24:48 -07:00
Ishaan Jaff
b71f35de72
Merge pull request #3585 from BerriAI/litellm_router_batch_comp
...
[Litellm Proxy + litellm.Router] - Pass the same message/prompt to N models
2024-05-11 13:51:45 -07:00
Ishaan Jaff
c49033a687
support batch /chat/completions on proxy
2024-05-11 13:24:25 -07:00
Krish Dholakia
30117317a4
Merge branch 'main' into feat/add-azure-content-filter
2024-05-11 09:30:38 -07:00
Krrish Dholakia
f8db5414a7
fix(proxy_server.py): check + get end-user obj even for master key calls
...
fixes issue where region-based routing wasn't working for end-users if master key was given
2024-05-10 16:54:51 -07:00
Ishaan Jaff
3b2e295337
fix - proxy_server.py
2024-05-10 13:47:35 -07:00
Nick Wong
a1821428d1
added changes from upstream
...
Merge branch 'main' into fix/error-on-get-user-role
2024-05-09 16:14:14 -07:00
Nick Wong
ea0856408b
removed extra default dict return, which causes error if user_role is a string
2024-05-09 16:13:26 -07:00
Krrish Dholakia
8bb710b9c1
feat(proxy_server.py): expose new /team/list
endpoint
...
Closes https://github.com/BerriAI/litellm/issues/3523
2024-05-09 13:21:00 -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
Krish Dholakia
64ca2fde53
Merge branch 'main' into litellm_region_based_routing
2024-05-08 22:19:51 -07:00
Krrish Dholakia
0ea8222508
feat(router.py): enable filtering model group by 'allowed_model_region'
2024-05-08 22:10:17 -07:00
Krrish Dholakia
7c99808529
feat(proxy_server.py): add CRUD endpoints for 'end_user' management
...
allow admin to specify region + default models for end users
2024-05-08 18:50:36 -07:00
Ishaan Jaff
eeece6e90b
Merge branch 'main' into ui_show_spend_end_user
2024-05-08 18:29:25 -07:00
Ishaan Jaff
41fd17dc3d
feat - get price by end_user
2024-05-08 18:19:27 -07:00