mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
style: simplify bridge_params and type supported_endpoints as List[str]
This commit is contained in:
parent
f4fa9441db
commit
54eed72ecd
2 changed files with 9 additions and 10 deletions
|
|
@ -1571,15 +1571,14 @@ def completion( # type: ignore # noqa: PLR0915
|
|||
# If the model will be bridged to the Responses API, allow params
|
||||
# that the bridge can handle (e.g. web_search_options) even if the
|
||||
# provider's chat/completions config doesn't list them.
|
||||
if responses_api_model_info.get("mode") == "responses":
|
||||
_bridge_params = []
|
||||
if web_search_options is not None:
|
||||
_bridge_params.append("web_search_options")
|
||||
if _bridge_params:
|
||||
existing = optional_param_args.get("allowed_openai_params") or []
|
||||
optional_param_args["allowed_openai_params"] = list(
|
||||
set(existing + _bridge_params)
|
||||
)
|
||||
if (
|
||||
responses_api_model_info.get("mode") == "responses"
|
||||
and web_search_options is not None
|
||||
):
|
||||
existing = optional_param_args.get("allowed_openai_params") or []
|
||||
optional_param_args["allowed_openai_params"] = list(
|
||||
set(existing + ["web_search_options"])
|
||||
)
|
||||
|
||||
optional_params = get_optional_params(
|
||||
**optional_param_args, **non_default_params
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ class ProviderSpecificModelInfo(TypedDict, total=False):
|
|||
bedrock_output_config_effort_ceiling: Optional[
|
||||
Literal["low", "medium", "high", "max", "xhigh"]
|
||||
]
|
||||
supported_endpoints: Optional[list]
|
||||
supported_endpoints: Optional[List[str]]
|
||||
|
||||
|
||||
class SearchContextCostPerQuery(TypedDict, total=False):
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue