feat(exa): add optional direct REST backend - #647
Draft
wuyak wants to merge 1 commit into
Draft
Conversation
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
Closes #646.
为已有个人
EXA_API_KEY的用户增加一个可选 Exa REST 直连后端,同时完整保留当前免 Key 的mcporter + Exa MCP路径。What changed
agent-reach-exa search/contents/status:search直连POST https://api.exa.ai/search;contents直连POST https://api.exa.ai/contents;status只检查本地凭据,不发起计费请求。agent-reach configure exa-key:--stdin;x-api-key请求头,不进入 URL、请求体或错误文本。Exa REST API(仅当个人 Key 已配置);Exa via mcporter(现有免 Key 回退)。warn/active_backend: null,首次真实只读调用再验证网络、额度与限流。Semantics preserved
REST 客户端按当前官方 Exa MCP 实现固定了相同默认行为:
auto;numResults: 10;contents: { highlights: true };category:解析;maxCharacters: 3000;对应上游实现:
webSearch.tswebFetch.tsconfig.tserrorHandler.ts没有改成
instant,没有把默认条数改成 5,也没有取消 Highlights 或正文抓取。Compatibility and non-goals
Verification (current head
d8a6b3e)ruff check agent_reach tests— passedmypy agent_reach— passedpytest -q— 603 passed, 16 subtests passedgit diff --check upstream/main...HEAD— passedagent-reach versionworks;agent-reach-exa status --jsonworks without a network request;agent_reach/exa_api.py.The one-run latency observation is documented in #646 as bounded evidence, not as a performance guarantee.