feat: add --no-native-web flag to skip Parallel AI in Claude Code

When running in Claude Code, the assistant has a built-in WebSearch tool
that's free and higher quality than Parallel AI/Brave/OpenRouter. Adding
--no-native-web to the SKILL.md invocation defers web search to the
assistant, saving API credits. OpenClaw invocations don't pass this flag,
so they continue using native web backends.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Matt Van Horn
2026-03-03 06:34:03 -08:00
parent d4ac57f041
commit b990aed40e
3 changed files with 54 additions and 3 deletions
+10 -2
View File
@@ -668,6 +668,7 @@ def run_research(
resolved_handle: str = None,
do_hackernews: bool = True,
do_polymarket: bool = True,
no_native_web: bool = False,
) -> tuple:
"""Run the research pipeline.
@@ -704,7 +705,7 @@ def run_research(
# Determine web search mode
do_web = sources in ("all", "web", "reddit-web", "x-web")
web_backend = env.get_web_search_source(config) if do_web else None
web_backend = env.get_web_search_source(config) if (do_web and not no_native_web) else None
web_needed = do_web and not web_backend
# Web-only mode
@@ -1113,6 +1114,12 @@ def main():
"Example: --search reddit,hn (default: all configured sources)"
),
)
parser.add_argument(
"--no-native-web",
action="store_true",
default=False,
help="Skip native web search backends (Parallel/Brave/OpenRouter). Use when the assistant has its own WebSearch tool.",
)
args = parser.parse_args()
@@ -1199,7 +1206,7 @@ def main():
"tiktok": has_apify,
"hackernews": True,
"polymarket": True,
"web_search_backend": web_source,
"web_search_backend": "deferred to assistant" if args.no_native_web else web_source,
}
ui.show_diagnostic_banner(diag)
@@ -1320,6 +1327,7 @@ def main():
resolved_handle=args.x_handle,
do_hackernews=search_do_hackernews,
do_polymarket=search_do_polymarket,
no_native_web=args.no_native_web,
)
# Processing phase