v1.0.3 · Haiku-only OpenCode plugin

opencode-sub2api-haiku-fix

A focused plugin that fixes Haiku's "You're out of extra usage" failure in OpenCode through Sub2API, while preserving thinking and leaving Sub2API, OpenCode, and OMO code untouched.

0
model
0
tests
0
deps
OpenCode / Haiku smoke
Verified path OpenCode → plugin fetch wrapper → Sub2API → Claude Haiku 4.5 smoke test returned OK without extra-usage errors

Narrow fix

Haiku needed the full Claude Code wire shape.

Opus and Sonnet already passed through the route. Haiku failed because its request fingerprint diverged: incomplete system body, missing Claude Code metadata, and thinking shape drift.

01

Preserve thinking

Haiku requests keep manual thinking enabled, with a bounded budget that respects `max_tokens`.

02

Patch only Haiku

Provider and body checks exit early for non-Haiku models, leaving Sonnet and Opus untouched.

03

No server fork

The fix lives in an OpenCode plugin, so Sub2API, OpenCode core, and OMO can keep updating normally.

Request surgery

Three precise transformations.

The plugin does not impersonate an account or carry credentials. It normalizes the request OpenCode is already sending through your configured provider.

plugin trace

Install

One package entry.

Add it to OpenCode's plugin list. Existing Sub2API auth and provider configuration stay exactly where they are.

~/.config/opencode/opencode.jsonc
{
  "plugin": [
    "opencode-sub2api-haiku-fix@latest"
  ]
}