feat(tool): add Synthetic web search backend to websearch tool - #41160
Open
Qiiks wants to merge 1 commit into
Open
feat(tool): add Synthetic web search backend to websearch tool#41160Qiiks wants to merge 1 commit into
Qiiks wants to merge 1 commit into
Conversation
Adds 'synthetic' as a third web search provider alongside exa and parallel. Enabled when the synthetic provider is authed (auth store) or SYNTHETIC_API_KEY env is set. POSTs to https://api.synthetic.new/v2/search with Bearer auth and returns formatted results with url/title/text.
Contributor
|
Thanks for updating your PR! It now meets our contributing guidelines. 👍 |
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.
Issue for this PR
Closes #41164
Type of change
What does this PR do?
Adds
"synthetic"as a third web search backend alongsideexaandparallel:WebSearchProviderSchemagains"synthetic";selectWebSearchProviderhandles it (env override + flag + checksum fallback)callProviderPOSTs tohttps://api.synthetic.new/v2/searchwith Bearer auth and formats results (url/title/text)enableSyntheticruntime flag — auto-enabled whenSYNTHETIC_API_KEYis set, or explicitly viaOPENCODE_ENABLE_SYNTHETIC_SEARCH=1webSearchEnabledandwebSearchProviderLabelextendedAuth follows the existing
parallelpattern: the tool resolves the key from the auth store (opencode auth loginfor a synthetic provider) with a fallback to theSYNTHETIC_API_KEYenv var.How did you verify your code works?
websearch.test.ts: 12 pass / 0 fail.bun run typecheckclean.OPENCODE_WEBSEARCH_PROVIDER=synthetic opencode run --model ... "Search the web for: what is bun runtime"returned real formatted results from Synthetic's/v2/search(exit 0). Also verified auto-enablement via auth-store key (no env var) works.Screenshots / recordings
N/A (no UI change)
Checklist