mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-07 08:26:10 +00:00
chore: format A2A routing files
This commit is contained in:
parent
9af6eacf84
commit
97f01b6928
3 changed files with 5 additions and 15 deletions
|
|
@ -52,9 +52,7 @@ class A2ACompletionBridgeHandler:
|
|||
merged = dict(previous)
|
||||
for key, value in current.items():
|
||||
merged[key] = (
|
||||
A2ACompletionBridgeHandler._merge_stream_values(merged[key], value)
|
||||
if key in merged
|
||||
else value
|
||||
A2ACompletionBridgeHandler._merge_stream_values(merged[key], value) if key in merged else value
|
||||
)
|
||||
return merged
|
||||
if isinstance(previous, list) and isinstance(current, list):
|
||||
|
|
|
|||
|
|
@ -39,9 +39,7 @@ def _build_wxo_headers(
|
|||
{
|
||||
key: value
|
||||
for key, value in static_headers.items()
|
||||
if isinstance(key, str)
|
||||
and isinstance(value, str)
|
||||
and key.lower() not in _WXO_RESERVED_HEADERS
|
||||
if isinstance(key, str) and isinstance(value, str) and key.lower() not in _WXO_RESERVED_HEADERS
|
||||
}
|
||||
if isinstance(static_headers, Mapping)
|
||||
else {}
|
||||
|
|
@ -309,9 +307,7 @@ class WatsonxOrchestrateHandler:
|
|||
) -> dict[str, object]:
|
||||
wxo: Final = WatsonxOrchestrateHandler._extract_litellm_params(litellm_params)
|
||||
|
||||
client: Final = WatsonxOrchestrateHandler._http_client(
|
||||
timeout=timeout if timeout is not None else 90.0
|
||||
)
|
||||
client: Final = WatsonxOrchestrateHandler._http_client(timeout=timeout if timeout is not None else 90.0)
|
||||
token: Final = await WatsonxOrchestrateHandler._get_bearer_token(
|
||||
cp4d_host=wxo.cp4d_host,
|
||||
auth_mode=wxo.auth_mode,
|
||||
|
|
@ -362,9 +358,7 @@ class WatsonxOrchestrateHandler:
|
|||
) -> AsyncIterator[dict[str, object]]:
|
||||
wxo: Final = WatsonxOrchestrateHandler._extract_litellm_params(litellm_params)
|
||||
|
||||
client: Final = WatsonxOrchestrateHandler._http_client(
|
||||
timeout=timeout if timeout is not None else 120.0
|
||||
)
|
||||
client: Final = WatsonxOrchestrateHandler._http_client(timeout=timeout if timeout is not None else 120.0)
|
||||
token: Final = await WatsonxOrchestrateHandler._get_bearer_token(
|
||||
cp4d_host=wxo.cp4d_host,
|
||||
auth_mode=wxo.auth_mode,
|
||||
|
|
|
|||
|
|
@ -150,9 +150,7 @@ async def _route_registered_provider(
|
|||
registered_provider: Final = litellm_params.get("custom_llm_provider")
|
||||
registered_model: Final = litellm_params.get("model")
|
||||
native_provider: Final = registered_provider == "pydantic_ai_agents" or (
|
||||
registered_provider == "bedrock"
|
||||
and isinstance(registered_model, str)
|
||||
and "agentcore" in registered_model
|
||||
registered_provider == "bedrock" and isinstance(registered_model, str) and "agentcore" in registered_model
|
||||
)
|
||||
bridge_params: Final = _OBJECT_DICT_ADAPTER.validate_python(
|
||||
{"message": params["message"]} if native_provider else params
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue