mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-06 02:48:13 +00:00
fix(proxy): make inference model selection exhaustive
This commit is contained in:
parent
0fd4e93c48
commit
812f6c7024
2 changed files with 4 additions and 1 deletions
|
|
@ -6,7 +6,7 @@ from typing import Annotated, Any, Final, Literal, Union, get_args, get_origin
|
|||
|
||||
import orjson
|
||||
from fastapi import Request, UploadFile, status
|
||||
from typing_extensions import NotRequired, ReadOnly, Required
|
||||
from typing_extensions import NotRequired, ReadOnly, Required, assert_never
|
||||
|
||||
from litellm._logging import verbose_proxy_logger
|
||||
from litellm.constants import (
|
||||
|
|
@ -56,6 +56,7 @@ def resolve_inference_model(
|
|||
return endpoint_model
|
||||
case "completion":
|
||||
return settings.get("completion_model") or cli_model or endpoint_model or body_model
|
||||
assert_never(kind)
|
||||
|
||||
|
||||
def _normalize_media_type(content_type: str) -> str:
|
||||
|
|
|
|||
|
|
@ -7932,6 +7932,8 @@ async def test_managed_application_uses_persisted_identity_without_provisioning_
|
|||
result: Final = await JWTAuthManager.auth_builder(**arguments)
|
||||
auth: Final = JWTAuthManager.user_api_key_auth_from_result(result)
|
||||
assert auth.agent_id == "stable-id"
|
||||
assert auth.api_key is None
|
||||
assert auth.token is None
|
||||
assert auth.user_id is None
|
||||
assert auth.team_id is None
|
||||
assert auth.managed_agent_context is not None
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue