mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-29 06:33:28 +00:00
warn when blocked_domains is dropped during web_search translation
This commit is contained in:
parent
bb340ce683
commit
86b7d293c5
1 changed files with 6 additions and 0 deletions
|
|
@ -8,6 +8,7 @@ path used for OpenAI and Azure models.
|
|||
import json
|
||||
from typing import Any, Dict, List, Optional, Union, cast
|
||||
|
||||
from litellm._logging import verbose_logger
|
||||
from litellm.litellm_core_utils.reasoning_effort_utils import (
|
||||
reasoning_effort_from_thinking_budget,
|
||||
)
|
||||
|
|
@ -189,6 +190,11 @@ class LiteLLMAnthropicToResponsesAPIAdapter:
|
|||
allowed = tool_dict.get("allowed_domains")
|
||||
if allowed:
|
||||
web_tool["filters"] = {"allowed_domains": allowed}
|
||||
if tool_dict.get("blocked_domains"):
|
||||
verbose_logger.warning(
|
||||
"Responses API does not support 'blocked_domains' on web_search tools; "
|
||||
"this field will be ignored."
|
||||
)
|
||||
result.append(web_tool)
|
||||
continue
|
||||
func_tool: Dict[str, Any] = {"type": "function", "name": tool_name}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue