Commit Graph
12839 Commits
Author SHA1 Message Date
Ishaan Jaff 775eb0ba99 bump: version 1.37.10 → 1.37.11 2024-05-15 21:01:02 -07:00
Ishaan Jaff 5300a4c9b3 fix model prices 2024-05-15 21:00:56 -07:00
Ishaan JaffandGitHub 881812d5de Merge pull request #3543 from kmheckel/main
Updated Ollama cost models to include LLaMa3 and Mistral/Mixtral Instruct series
2024-05-15 20:50:50 -07:00
Ishaan JaffandGitHub 370049c549 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
Ishaan JaffandGitHub 7aac76b485 Merge pull request #3662 from BerriAI/litellm_feat_predibase_exceptions
[Fix] Mask API Keys from Predibase AuthenticationErrors
2024-05-15 20:45:40 -07:00
Krish DholakiaandGitHub 25e4b34574 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
Ishaan Jaff e49fa9bd2c (ci/cd) run again 2024-05-15 20:29:23 -07:00
Ishaan JaffandGitHub b3d472f910 Merge pull request #3664 from BerriAI/litellm_revert_3600
[Fix] Revert #3600 https://github.com/BerriAI/litellm/pull/3600
v1.37.10
2024-05-15 20:19:35 -07:00
Krrish Dholakia 594ca947c8 fix(parallel_request_limiter.py): fix max parallel request limiter on retries 2024-05-15 20:16:11 -07:00
Ishaan Jaff c2a306c4dd (ci/cd) run again 2024-05-15 20:03:30 -07:00
Ishaan Jaff 765d43d241 fix utils.py 2024-05-15 19:54:52 -07:00
Ishaan Jaff 1a67f244fb fix types/router.py 2024-05-15 19:46:30 -07:00
Ishaan Jaff 86223bc703 revert changes to types/completion.py 2024-05-15 19:45:16 -07:00
Ishaan Jaff 136746abc9 fix test config 2024-05-15 19:42:39 -07:00
Ishaan Jaff 8e3aa14287 fix revert 3600 2024-05-15 19:40:34 -07:00
Krrish Dholakia 153ce0d085 build(ui/general_settings.tsx): support updating global max parallel requests on the ui 2024-05-15 19:26:57 -07:00
Ishaan Jaff d208dedb35 (ci/cd) run again 2024-05-15 17:39:21 -07:00
Marc Abramowitz ddf77656fb 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 89dd1ffee8 fix deep copy logic in during_call_hook 2024-05-15 17:34:54 -07:00
Ishaan Jaff 240b183d7a ci/cd run again 2024-05-15 17:31:14 -07:00
Ishaan Jaff 1262c5cb39 fix - /organization/new logic 2024-05-15 17:27:46 -07:00
Ishaan Jaff ed0a815c2b test - exceptions predibase 2024-05-15 16:53:41 -07:00
Ishaan Jaff b88ad61490 feat - predibase exceptions 2024-05-15 16:52:33 -07:00
Ishaan Jaff f138c15859 (ci/cd) fix test_vertex_ai_stream 2024-05-15 16:32:40 -07:00
Ishaan Jaff f2e8b2500f fix function calling mistral large latest 2024-05-15 16:05:17 -07:00
Ishaan Jaff 9f43761000 fix - show alerts on /completions endpoint 2024-05-15 15:45:21 -07:00
Ishaan Jaff e518b1e6c1 fix - vertex exception test 2024-05-15 15:37:59 -07:00
Krrish Dholakia 6a357b4275 feat(proxy_server.py): Enabling Admin to control general settings on proxy ui 2024-05-15 15:26:57 -07:00
Ishaan Jaff 6d8ea641ec (ci/cd) fix test_content_policy_exception_azure 2024-05-15 14:47:39 -07:00
Ishaan Jaff 371043d683 fix - test mistral/large _parallel_function_call 2024-05-15 14:31:00 -07:00
Ishaan Jaff 3e831b4e1a fix debug logs on router test 2024-05-15 14:28:17 -07:00
Ishaan Jaff fdf7a4d8c8 fix - test_lowest_latency_routing_first_pick 2024-05-15 14:24:13 -07:00
Ishaan JaffandGitHub c00d232900 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 1a11b151b7 fix - show litellm debug info in errors 2024-05-15 14:18:12 -07:00
Sebastián EstévezandGitHub 9b7465a222 Another dictionary changed size during iteration error
```
ImportError while loading conftest '/astra-assistants-api/tests/openai-sdk/conftest.py'.
conftest.py:13: in <module>
    from impl.astra_vector import CassandraClient
../../impl/astra_vector.py:45: in <module>
    from impl.services.inference_utils import get_embeddings
../../impl/services/inference_utils.py:5: in <module>
    import litellm
.cache/pypoetry/virtualenvs/astra-assistants-api-eiSmbCzm-py3.10/lib/python3.10/site-packages/litellm/__init__.py:678: in <module>
    from .main import *  # type: ignore
.cache/pypoetry/virtualenvs/astra-assistants-api-eiSmbCzm-py3.10/lib/python3.10/site-packages/litellm/main.py:73: in <module>
    from .llms.azure_text import AzureTextCompletion
.cache/pypoetry/virtualenvs/astra-assistants-api-eiSmbCzm-py3.10/lib/python3.10/site-packages/litellm/llms/azure_text.py:23: in <module>
    openai_text_completion_config = OpenAITextCompletionConfig()
.cache/pypoetry/virtualenvs/astra-assistants-api-eiSmbCzm-py3.10/lib/python3.10/site-packages/litellm/llms/openai.py:192: in __init__
    for key, value in locals_.items():
E   RuntimeError: dictionary changed size during iteration
```
2024-05-15 17:06:54 -04:00
Ishaan Jaff f6e342303e show debug info on slack alerts 2024-05-15 13:23:44 -07:00
Krrish Dholakia d9ad7c6218 fix(router.py): fix validation error for default fallback 2024-05-15 13:23:00 -07:00
Ishaan Jaff 59e18f23e0 fix - show litellm_debug_info 2024-05-15 13:07:04 -07:00
Ishaan JaffandGitHub 74f093bb4b Merge pull request #3653 from BerriAI/litellm_fix_text_completions
[Fix] - Alerting on `/completions` -  don't raise hanging request alert for /completions
2024-05-15 11:28:55 -07:00
Krrish Dholakia dba713ea43 fix(router.py): add validation for how router fallbacks are setup
prevent user errors
2024-05-15 10:44:16 -07:00
Ishaan JaffandGitHub efca96baf8 Merge pull request #3647 from paul-gauthier/openrouter-gpt-4o
cloned gpt-4o models into openrouter/openai in costs&context.json
2024-05-15 10:33:19 -07:00
Ishaan Jaff 2e81347607 fix - don't raise hanging request alert for /completions 2024-05-15 10:27:02 -07:00
Ishaan JaffandGitHub 5177e4408e Merge pull request #3651 from BerriAI/litellm_improve_load_balancing
[Feat] Proxy + router - don't cooldown on 4XX error that are not 429, 408, 401
2024-05-15 10:24:34 -07:00
Ishaan Jaff f17f0a09d8 feat - router use _is_cooldown_required 2024-05-15 10:03:55 -07:00
Krrish Dholakia f5d73547c7 fix(lowest_latency.py): allow ttl to be a float 2024-05-15 09:59:21 -07:00
Krrish Dholakia 5dcf3d672c feat(proxy_server.py): new /end_user/info endpoint
get spend for a specific end-user
2024-05-15 09:50:52 -07:00
Ishaan Jaff ae80148c12 test - router cooldowns 2024-05-15 09:43:30 -07:00
Ishaan Jaff 52f8c39bbf feat - don't cooldown deployment on BadRequestError 2024-05-15 09:03:27 -07:00
Krrish Dholakia f43da3597d test: fix test 2024-05-15 08:51:40 -07:00
Krrish Dholakia fffb2427f3 fix(types/init.py): don't import openai assistants types by default 2024-05-15 08:50:31 -07:00