Repository navigation
feat(web-search): backend registry and executor-runnable candidate set (#2188 L3) - #2206
Conversation
|
✅ Deterministic PR hygiene checks passed. |
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
📝 WalkthroughWalkthroughWeb-search backend selection now uses explicit OpenAI and Anthropic descriptors, filters candidates by active authentication and provider rules, and resolves Anthropic credentials during planning. Configuration references and guides document separate web-search and vision defaults. ChangesWeb search backend selection
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant Auth as SidecarAuthState
participant Filter as webSearchSidecarCandidates
participant Backends as WEB_SEARCH_BACKENDS
participant Planner as planWebSearch
Auth->>Filter: resolved authentication
Filter->>Backends: evaluate backend eligibility
Backends-->>Filter: runnable candidates
Planner->>Auth: resolve shared sidecar authentication
Auth-->>Planner: validated Anthropic provider data
Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Ingwannu
left a comment
There was a problem hiding this comment.
Reviewed the exact current head 92f5f42. The backend registry is limited to shipped executor-backed/auth-probed implementations, the OpenAI candidate predicate excludes account-qualified and custom provider rows that the forward executor cannot consume verbatim, and the default-backend documentation now matches resolveSidecarBackend. Focused tests and typecheck were green locally, and the full exact-head CI including macOS is green. Approved as the Layer 3 stacked change; do not merge this layer independently before its parent chain is ready and retargeted onto dev.
리뷰 · 우선순위 65 / 80#2188 L3임. 부모 #2204. 웹서치 후보 = (피커 ∪ 슬롯) ∩ 실행 가능한 백엔드.
openai 후보는 bare native slug나 luna 슬롯만. 해결방안: L2 위에 머지. 미래 백엔드는 031 문서대로 프로브 생긴 뒤에 레지스트리 줄만 추가. 이 댓글은 grok-bot이 작성했습니다 |
92f5f42 to
1f4a8da
Compare
WEB_SEARCH_BACKENDS registers only executor-backed, auth-probed backends (openai forward, anthropic stored-OAuth); future backends stay out until a live probe and executor land. webSearchSidecarCandidates = (picker ∪ auth slots) ∩ active backend family. planWebSearch consumes the shared auth state for presence; resolveSidecarBackend's explicit-or-openai preference is unchanged, and the config comment that claimed the opposite now tells the truth.
Account-bound selector/slug rows and custom openai-keyed rows reach the candidate set as provider openai, but the forward executor POSTs settings.model verbatim with no routeModel prefix-stripping, so those ids can never run. eligibleModel now requires a bare native slug or the auth slot. docs-site stops claiming anthropic-preferred for web-search (that default belongs to vision only).
1f4a8da to
9b827c2
Compare
lidge-jun#2188 L3) (lidge-jun#2206) * feat(web-search): backend registry and candidate intersection (lidge-jun#2188) WEB_SEARCH_BACKENDS registers only executor-backed, auth-probed backends (openai forward, anthropic stored-OAuth); future backends stay out until a live probe and executor land. webSearchSidecarCandidates = (picker ∪ auth slots) ∩ active backend family. planWebSearch consumes the shared auth state for presence; resolveSidecarBackend's explicit-or-openai preference is unchanged, and the config comment that claimed the opposite now tells the truth. * fix(web-search): restrict the openai backend to executor-runnable ids Account-bound selector/slug rows and custom openai-keyed rows reach the candidate set as provider openai, but the forward executor POSTs settings.model verbatim with no routeModel prefix-stripping, so those ids can never run. eligibleModel now requires a bare native slug or the auth slot. docs-site stops claiming anthropic-preferred for web-search (that default belongs to vision only). * docs(vision): describe the vision backend default on its own terms
Summary
Layer 3 of the #2188 stacked chain (parent: #2204). Web-search rule 2 — a model may be OFFERED as the web-search sidecar only when an active, executor-backed backend can actually run it:
src/web-search/backends.ts:WEB_SEARCH_BACKENDSregisters the two shipped backends (ChatGPT forward, Anthropic stored-OAuth) with auth-presence as the liveness probe. Future backends (Gemini/Grok/Zen/Exa) stay out until a live probe + executor land; probe contracts are recorded in the devlog unit (002/031).webSearchSidecarCandidates= (picker-visible ∪ auth slots) ∩ active-backend-runnable. The openai side requires a bare native slug or the Luna auth slot — account-boundselector/slugrows and custom openai-keyed rows are excluded because the forward executor POSTssettings.modelverbatim (review-caught).planWebSearchconsumes the shared auth state for credential presence.resolveSidecarBackend's explicit-or-openai preference is deliberately unchanged; thetypes/config.tscomment and three docs-site pages that claimed anthropic-preferred for web-search now tell the truth (vision keeps its own anthropic-if-credential default).Design doc:
devlog/_plan/260820_sidecar_selection_unification/030_layer3_websearch_slots.md.Verification
bun x tsc --noEmitclean;bun test --isolateacross web-search-candidates, web-search, web-search-anthropic, sidecar-candidates, sidecar-auth — green (9 new tests incl. selector/slug and custom-row exclusions, hidden-Luna slot survival, keyed-anthropic unreachability,resolveSidecarBackend(undefined) === "openai"pin).Checklist
--isolate)bun run typecheckcleanSummary by CodeRabbit
New Features
Bug Fixes
Tests