{"id":50508971,"url":"https://github.com/aaronlab/raven-review","last_synced_at":"2026-06-02T18:32:50.662Z","repository":{"id":346477336,"uuid":"1190153059","full_name":"aaronlab/raven-review","owner":"aaronlab","description":"Raven proxy code review \u0026 web search interception analysis (Claude Code WebSearch → Tavily)","archived":false,"fork":false,"pushed_at":"2026-03-24T03:12:30.000Z","size":50,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-09T15:53:22.457Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aaronlab.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-24T02:33:25.000Z","updated_at":"2026-03-24T03:12:33.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/aaronlab/raven-review","commit_stats":null,"previous_names":["zey413/raven-review","aaronagent/raven-review","aaronlab/raven-review"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/aaronlab/raven-review","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlab%2Fraven-review","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlab%2Fraven-review/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlab%2Fraven-review/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlab%2Fraven-review/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aaronlab","download_url":"https://codeload.github.com/aaronlab/raven-review/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aaronlab%2Fraven-review/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33833277,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-02T02:00:07.132Z","response_time":109,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-06-02T18:32:49.837Z","updated_at":"2026-06-02T18:32:50.649Z","avatar_url":"https://github.com/aaronlab.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# Raven Review — Web Search Interception Analysis\n\n对 [nocoo/raven](https://github.com/nocoo/raven) 项目的持续 code review，聚焦于在 raven proxy 上拦截 Claude Code 的 web search 调用并替换为 Tavily 搜索引擎。\n\n## 核心结论\n\n**43 行代码改动** = 完整的 Claude Code WebSearch → Tavily 替换方案。\n\n- 0 新文件、0 新依赖、0 新类型\n- 向后兼容（没有 `TAVILY_API_KEY` 时行为不变）\n- 含重试 (max 3)、降级 (Tavily 挂了不崩)、正确的 metrics 追踪\n\n## Review 系列\n\n| 文件 | 焦点 | 方案行数 |\n|------|------|---------|\n| [raven-review-001.md](raven-review-001.md) | 架构分析 \u0026 候选方案 | — |\n| [raven-review-002.md](raven-review-002.md) | 独立模块方案 | ~71 行 |\n| [raven-review-003.md](raven-review-003.md) | 会话历史兼容 \u0026 鲁棒版 | ~106 行 |\n| [raven-review-004.md](raven-review-004.md) | **突破：纯内联极简** | ~37 行 |\n| [raven-review-005.md](raven-review-005.md) | 极限压缩确认 | ~37 行 |\n| [raven-review-006.md](raven-review-006.md) | Edge case 压力测试 \u0026 加固 | ~43 行 |\n| [raven-review-007.md](raven-review-007.md) | 核心假设验证 \u0026 定稿 | **43 行 (最终)** |\n\n## 快速使用\n\n参见 [patch/web-search-tavily.patch](patch/web-search-tavily.patch)：\n\n```bash\ncd /path/to/raven\ngit apply /path/to/web-search-tavily.patch\necho \"TAVILY_API_KEY=tvly-your-key\" \u003e\u003e packages/proxy/.env.local\nbun run dev\n```\n\n## 原理\n\n```\nClaude Code → POST /v1/messages (含 web_search_20250305 server tool)\n    ↓\nRaven: 剥离 server tool → 注入 web_search function tool\n    ↓\nCopilot API: Claude 模型返回 tool_calls [{name: \"web_search\", args: {query: \"...\"}}]\n    ↓\nRaven: 拦截 → 调 Tavily API → 把结果作为 tool result 追加 → 再次请求 Copilot\n    ↓\nCopilot API: 基于搜索结果生成最终回答\n    ↓\nRaven: 翻译回 Anthropic 格式 → 返回给 Claude Code\n```\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronlab%2Fraven-review","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faaronlab%2Fraven-review","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faaronlab%2Fraven-review/lists"}