docs: document opencode web-search opt-in for review reasoners#22
Merged
Conversation
Adds the two-env-var knob (OPENCODE_ENABLE_EXA=1 + EXA_API_KEY) to .env.example and a brief subsection in the Quick Start of README. When both vars are set, opencode's built-in websearch / webfetch tools become available to every review reasoner running through the open runtime — model decides per-task whether the lookup is worth doing (verify API contracts, check CVE/deprecation status, confirm library version behavior). No PR-AF wiring is required beyond setting the vars on the deployment; opencode inherits parent env from agentfield's run_cli, and tool awareness is communicated to the model via the standard tool-definition layer (verified: model invokes websearch autonomously when the task warrants it). No prompt-level guardrails added. Review reasoners are short / single- shot / analytic — no loop-risk where unrestrained search could rabbit-hole. SWE-AF's run_coder is the exception (long iterative coding loops); that gets a restraint snippet in its own PR. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Documents the two-env-var knob that enables opencode's built-in
websearch/webfetchtools for PR-AF's review reasoners:When both vars are set on the deployment, the model gains the ability to verify external API contracts, check CVE/deprecation status, and confirm library version behavior during a review — and decides per-task whether the lookup is worth doing.
Why no code changes
opencode reads these env vars natively. They reach the opencode subprocess through agentfield's
run_cliparent-env propagation (regression-guarded in Agent-Field/agentfield#544). The model is told about the available tools via the standard tool-definition layer — verified end-to-end against the agentfield SDK, where the model autonomously invokedwebsearchfor a task that needed current information.So the wiring already works; this PR just makes the knob discoverable.
What's changed
.env.example— adds the two env vars with a brief explanationREADME.md— adds an "Optional: web search" subsection under Quick StartWhy no prompt-level guardrails
Review reasoners are short / single-shot / analytic — no long iterative loops where an unrestrained model could rabbit-hole on searches. The model's own judgment plus opencode's tool advertisement is sufficient. (SWE-AF's
run_coderis the exception and gets a restraint snippet in its own PR.)🤖 Generated with Claude Code