Skip to content

fix(opencode-go): pin claude-haiku-5-5 to the Anthropic wire - #6788

Merged
lidge-jun merged 1 commit into
devfrom
codex/l7-opencode-go-haiku-wire
Oct 9, 2026
Merged

lidge-jun merged 1 commit into
devfrom
codex/l7-opencode-go-haiku-wire

Conversation

@lidge-jun

@lidge-jun lidge-jun commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Carries #6779 by @agents-dev so it runs under repository CI.

OpenCode Go serves claude-haiku-5-5 on its Anthropic Messages endpoint (/zen/go/v1/messages, @ai-sdk/anthropic), per the official Go endpoint table. OpenCodex routed it through the Chat wire, so requests for that model failed. This adds it to the provider-local ANTHROPIC_WIRE_MODELS["opencode-go"] set in src/types/wire.ts, next to the MiniMax models that already use the same mechanism. Hard pins take precedence over per-model wire overrides, so a Chat or Responses override cannot send Haiku down the wrong wire.

Beyond the source PR, this resolves its open review thread: the test now also checks the exact model through captureRouteStaticPolicy and the resolver's static-policy argument, across all three inbound protocols, with attempted Chat/Responses overrides and repeated resolution. structure/providers-and-adapters.md, structure/transports/responses-wire-shapes.md and the OpenCode Go paragraph in guides/providers.md name the new pin. The seven translated provider guides do not describe Go wires, so they are unchanged.

Closes #6779 once landed (the source PR is closed manually after this merges).

Verification

  • bun test tests/server/adapter-resolve.test.ts: 20 pass / 2 fail on the unchanged source (the new assertions), 22 pass / 0 fail with the change.
  • bun test tests/test-layout.test.ts: 2 pass. bun run typecheck, bun run privacy:scan, bun run structure:check, git diff --check: pass.
  • Independent gpt-6.1-sol review of c2650e7717: PASS.
  • Not run locally: the full suite and a live OpenCode Go call. Hosted Cross-platform CI on this head covers the rest.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (No credential or workflow changes.)

Co-authored-by: agents-dev [email protected]

Summary by CodeRabbit

  • Bug Fixes
    • OpenCode Go requests for claude-haiku-5-5 now consistently use the Anthropic Messages protocol, including when Chat or Responses overrides are configured. This behavior is maintained across supported inbound protocols without changing provider credentials or destination.
  • Documentation
    • Updated provider and transport guidance to clarify OpenCode Go’s Anthropic routing for supported models and how it relates to protocol overrides.

Carry #6779's Haiku wire pin and direct resolver regression. Cover the exact
model through captureRouteStaticPolicy and the resolver's fifth argument for
Responses, Chat and Anthropic inbound, attempted Chat/Responses overrides,
repeat resolution, sibling models and custom provider identity.

Update the source owner, Responses transport contract and English provider
guide to match OpenCode Go's documented Messages endpoint. The seven translated
guides contain no Go wire description and remain unchanged.

Verification: adapter-resolve red 20 pass / 2 fail before the source fix;
green 22 pass / 0 fail after. Layout 2 pass / 0 fail. Typecheck, privacy and
structure pass. Full suite and docs build deferred to coordinator CI under
this bounded lane's explicit validation scope.

Co-authored-by: agents-dev <[email protected]>
@lidge-jun
lidge-jun requested a review from Ingwannu as a code owner October 9, 2026 01:42
@github-actions

github-actions Bot commented Oct 9, 2026

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

@github-actions github-actions Bot added the bug Something isn't working label Oct 9, 2026
@coderabbitai

coderabbitai Bot commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: lidge-jun/opencodex/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 0b1629bf-1ebe-4748-a99d-bc49bced51c8
📥 Commits

Reviewing files that changed from the base of the PR and between c15037b and c2650e7.

📒 Files selected for processing (5)
  • docs-site/src/content/docs/guides/providers.md
  • src/types/wire.ts
  • structure/providers-and-adapters.md
  • structure/transports/responses-wire-shapes.md
  • tests/server/adapter-resolve.test.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.


📝 Walkthrough

Walkthrough

OpenCode Go’s claude-haiku-5-5 model is now pinned to the Anthropic wire. Tests cover routing across inbound protocols and model overrides. Documentation describes the pin and Haiku’s use of the Anthropic Messages wire.

Changes

OpenCode Go Haiku routing

Layer / File(s) Summary
Pin Haiku routing and document the wire
src/types/wire.ts, tests/server/adapter-resolve.test.ts, docs-site/src/content/docs/guides/providers.md, structure/transports/responses-wire-shapes.md, structure/providers-and-adapters.md
claude-haiku-5-5 is added to OpenCode Go’s Anthropic-pinned model IDs. Tests check that the pin persists across inbound protocols and overrides, while sibling and custom-provider routing remain unchanged. Documentation describes the pin and Haiku’s Messages wire.

Priority: ➖ Normal

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix · Severity of issue fixed: Medium

Merge Risk: ⚪ Minimal · up to c2650

No actionable merge-blocking issue is identified; the change is ready for normal merge checks.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the primary change: pinning the exact claude-haiku-5-5 model to the Anthropic wire for OpenCode Go. It matches the source changes, tests, and stated objecti…
Linked Issues check Passed Issue #6779 requires an exact opencode-go/claude-haiku-5-5 pin to the Anthropic wire, preservation of sibling routing, and protection from configured Chat or Responses overrides. src/types/wire.ts…
Out of Scope Changes check Passed The changed source is limited to the provider-local model pin in src/types/wire.ts. The added tests in tests/server/adapter-resolve.test.ts verify exact-model routing, override resistance, protoco…
Docstring Coverage Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 2…
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-09T01:45:10.158838Z c2650e7 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@lidge-jun
lidge-jun merged commit 26d1174 into dev Oct 9, 2026
35 checks passed
@lidge-jun
lidge-jun deleted the codex/l7-opencode-go-haiku-wire branch October 9, 2026 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant