mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-17 09:34:48 +00:00
chore(router): shorten type-discipline suppression reasons to fit 120-col format
Signed-off-by: Kylinny <junyi.yao.real@outlook.com> Signed-off-by: Kylinny <64238008+Kylinny@users.noreply.github.com>
This commit is contained in:
parent
69e51f40fe
commit
da0b57652b
1 changed files with 4 additions and 4 deletions
|
|
@ -407,7 +407,7 @@ _OPENAI_NATIVE_PROTOCOL_PROVIDERS: Final = frozenset(
|
|||
)
|
||||
|
||||
|
||||
def _deployment_speaks_openai_protocol(deployment: dict) -> bool: # mutable-ok: read-only access; router passes plain deployment dicts and this helper never mutates them
|
||||
def _deployment_speaks_openai_protocol(deployment: dict) -> bool: # mutable-ok: read-only access, never mutated
|
||||
litellm_params: Final = deployment.get("litellm_params") or {}
|
||||
provider: Final = provider_for_generic_call(litellm_params)
|
||||
if provider is None:
|
||||
|
|
@ -416,9 +416,9 @@ def _deployment_speaks_openai_protocol(deployment: dict) -> bool: # mutable-ok:
|
|||
|
||||
|
||||
def filter_tool_protocol_deployments(
|
||||
healthy_deployments: list[dict] | dict, # mutable-ok: mirrors the router list-or-dict candidate type; the filter builds new lists and never mutates inputs
|
||||
request_kwargs: dict | None = None, # mutable-ok: matches the OptionalParams dict type used across the router; read-only in this function
|
||||
) -> list[dict] | dict: # mutable-ok: returns the input or a narrowed new list; same list-or-dict contract as the router pipeline
|
||||
healthy_deployments: list[dict] | dict, # mutable-ok: mirrors router candidate type; read-only
|
||||
request_kwargs: dict | None = None, # mutable-ok: OptionalParams dict; read-only
|
||||
) -> list[dict] | dict: # mutable-ok: returns input or narrowed new list
|
||||
"""
|
||||
Keep only OpenAI-protocol deployments for OpenAI-format tool-calling requests.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue