Skip to content

Commit 9c4a0db

Browse files
committed
Disallow WebFetch tool for non-Anthropic providers
WebFetch, like WebSearch, is an Anthropic-only tool. Add it to the disallowed tools list when the provider is not Anthropic.
1 parent 57e6c7f commit 9c4a0db

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

backend/app/services/claude_agent.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -539,10 +539,11 @@ async def _build_claude_options(
539539
for env_var in user_settings.custom_env_vars:
540540
env[env_var["key"]] = env_var["value"]
541541

542-
# WebSearch is an Anthropic-only tool — non-Anthropic providers don't support it
542+
# WebSearch and WebFetch are Anthropic-only tools — non-Anthropic providers don't support them
543543
disallowed_tools: list[str] = []
544544
if provider_type != ProviderType.ANTHROPIC.value:
545545
disallowed_tools.append("WebSearch")
546+
disallowed_tools.append("WebFetch")
546547

547548
sdk_permission_mode = SDK_PERMISSION_MODE_MAP.get(
548549
permission_mode, "acceptEdits"

0 commit comments

Comments
 (0)