fix(opencode-go): satisfy provider wire contract - #3405
Conversation
|
✅ Deterministic PR hygiene checks passed. |
✅ READY
Review readiness checklist
✅ 4/4 boxes ticked. This pull request is already Ready for Review. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (7)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughThe change adds OpenCode Go session-header resolution during route normalization and preserves that header during key failover. It also expands Muse Spark web-search sanitization to remove ChangesProvider compatibility
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to This update adds stable OpenCode Go session affinity and removes rejected Muse Spark web-search fields while preserving documented exceptions. The covered behavior is ready to merge. Sequence Diagram(s)sequenceDiagram
participant Client
participant handleResponses
participant resolveOpenCodeGoTransport
participant OpenCodeGoEndpoint
Client->>handleResponses: Send request with session lane
handleResponses->>resolveOpenCodeGoTransport: Resolve provider transport
resolveOpenCodeGoTransport->>resolveOpenCodeGoTransport: Derive x-opencode-session
resolveOpenCodeGoTransport->>OpenCodeGoEndpoint: Send normalized request
OpenCodeGoEndpoint-->>handleResponses: Return provider response
handleResponses-->>Client: Return response
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes satisfy linked issue Full details: Out of Scope Changes checkExplanation The code, tests, and documentation changes are directly related to the linked provider compatibility requirements in Full details: Docstring CoverageExplanation Docstring coverage is 45.45% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 11 functions across 6 files. (1 skipped: 1 unsupported.) Full details: Title checkExplanation The title clearly identifies the primary OpenCode Go compatibility change: satisfying the provider wire contract through session-header handling. It is concise and remains related to the changeset, even though it does not mention the secondary Muse Spark update.
✨ Finishing Touches🧪 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 |
리뷰 · 우선순위 70 / 80설명 이 PR은 OpenCode Go( 첫 번째 문제는 세션 친화도입니다. OpenCode Go는 요청마다 고치는 방식은 xAI 쪽 두 번째 문제는 Muse Spark plain 현재 우선순위 70은 “OpenCode Go/Muse 실사용에서 캐시 친화도와 web_search 400이 바로 깨지는 프로바이더 와이어 버그”이지만, Codex 전 사용자 공통 블로커는 아니고 native Chat 경로 후속 여부가 남아 있어서 즉시 강제 랜딩보다 CI·CodeRabbit 확인 후 머지가 맞는 위치입니다. 라인 메인테이너의 판단이 필요한 지점
너의 추천 이 댓글은 grok-bot이 작성했습니다 |
9b20297 to
06c4d8f
Compare
lidge-jun
left a comment
There was a problem hiding this comment.
Reviewed as maintainer for the 260904 bug-backlog merge train.
Verified both halves of #3378. Destination matching is exact and rejects lookalike provider names, the session value is an opaque hash rather than anything caller-derived, an explicitly configured header still wins case-insensitively, config is not mutated, and generated affinity survives API-key rotation. Injection happens before model wire selection, so both the Chat and Responses paths carry it. The Muse sanitizer change stays scoped to plain web_search on the affected models and leaves preview tools and unrelated models alone.
On the four suite failures your description attributes to the dev baseline: this train verifies against hosted CI rather than a local full-suite run, and every required check on this PR is green, so that attribution is recorded rather than re-litigated here. It lands last in the train; #3420 touched src/adapters/openai-responses.ts too, but only the output-repair helpers, and mergeability was re-confirmed after that merge landed.
Summary
x-opencode-sessionvalue from OpenCodex's existing session lane for canonical OpenCode Go trafficindexed_web_accessfield alongsidesearch_content_typesfrom plain Muse Spark 1.2/1.3web_searchtools, while leaving preview tools and unrelated models unchangedCloses #3378
Verification
bun x tsc --noEmitand the doctor-service memory-contract typecheckbun test tests/opencode-go-session-header.test.ts tests/muse-spark-web-search-compat.test.ts tests/key-failover.test.ts— 26 pass, 0 fail.cmdquoting failures inmulti-agent-keep-native-v1.test.tsoauth-store-multi.test.tsCREDITS.mdprivacy failure introduced by the currentdevbasei18n-orphans.test.tsbun run privacy:scancurrently fails only on the three email-shaped examples newly added to upstreamCREDITS.md; this PR does not touch that file or the scannerdevbase (db2e2eb4709905fc8e7acfa982b5e945f859e15e) is itself red in upstream CI for the privacy gate, macOS suite, and test shard 2/4: https://github.com/lidge-jun/opencodex/actions/runs/33820290617git diff --checkpassNo GUI changes.
Review readiness checklist
This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:
No CI failures were introduced by this PR; the current
devbaseline failures are documented above.I pushed my PR to the latest dev commit.
I resolved all correct Codex and CodeRabbit findings.
My PR is ready for review.
Checklist