Skip to content

Host parity across OpenCode 1, OpenCode 2 and Pi - #871

Draft
antauth-alfonso[bot] wants to merge 27 commits into
mainfrom
parity/2026-11-23
Draft

antauth-alfonso[bot] wants to merge 27 commits into
mainfrom
parity/2026-11-23

Conversation

@antauth-alfonso

@antauth-alfonso antauth-alfonso Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Host parity across OpenCode 1, OpenCode 2 and Pi (Ufuk's rule: every host behaves the same unless a host truly cannot). Collected from a static parity audit; each fix follows the leading host's existing code and comes with a test that failed on main first.

Included so far:

  • Per-message effort on Haiku 5.5, Mythos 5.2, Opus 5 and Mythos 5.1 (the last two by Ufuk's decision, following Anthropic's page rather than Claude Code).
  • OpenCode 2: custom proxy headers only on API-key routes; cache diagnostics as on OpenCode 1 (shared code moved to Core); subscription price zeroing; Prime starts at plugin start (OpenCode 1 Prime now follows live setting changes too).
  • Pi: turn billing lineage; hybrid 20-block bridge marker; header quota merged into local quota; paid-route model aliases through the shared resolver; cache diagnostics; /claude quota refresh, limit editors and lane start.
  • OpenCode 1: keep-warm and thread cache boundary survive restarts; warms gzipped (OpenCode 1 and Pi); warms leave cache diagnostics as on OpenCode 2; under Thalamus, shared routing in every mode, wait-start reports and per-send billing reports.

Still to come on this branch: API-key requests unshaped and ANTHROPIC_INSECURE removed; 5-minute default cache on every host and the OpenCode 1 quota feed removed; Pi state move. Draft until those land and an Athena audit passes.


Summary by cubic

Host parity across OpenCode 1, OpenCode 2, and Pi so each host behaves the same unless it truly cannot, collected from a static parity audit. Each fix follows the leading host's existing code and ships with a test that failed on main first; the architecture and structure docs now match.

Per-message effort

  • Haiku 5.5, Mythos 5.2, Opus 5, and Mythos 5.1 now support per-message effort; Opus 5 and Mythos 5.1 follow Anthropic's page rather than Claude Code by user decision.
  • Changing effort mid-conversation preserves the prompt cache on all three hosts, and forks carry one effort marker at the question.

Parity fixes

  • Paid API-key requests are now unshaped on every host, ANTHROPIC_INSECURE is removed, all three hosts use the five-minute default cache, and the OpenCode 1 quota feed is gone.
  • CacheKeep prewarms no longer send the conversation's previous-message ID on OpenCode 1 and Pi; restore never delays OpenCode 1 or 2 startup, restart scans keep live temp files, and Pi shares the same per-session keep-warm claim.
  • Per-session keep-warm claims survive a wall-clock step during setup and older claims are never retaken on boot-time evidence alone.
  • Cache diagnostics never delay OpenCode 2 or Pi replies; Pi prewarms stay out of the diagnostics chain.
  • OpenCode 2: custom proxy headers apply only to API-key routes; cache diagnostics shared via core; OAuth model prices zeroed; Prime starts at plugin start.
  • OpenCode 1: Prime follows live setting changes; keep-warm and the thread cache boundary survive restarts; keep-warm requests use gzip on OpenCode 1 and Pi; under Thalamus, shared routing in every mode matches OpenCode 2, including provider waits, credential failures, paid fallback, revisits, refusal returns, wait-start and per-send billing reports; a routing ask after a failed attempt no longer waits for capacity inside the request.
  • Pi: turn billing lineage, hybrid 20-block cache bridge marker, header quota merged into the local quota without blocking the stream, paid-route model aliases through the shared resolver (applied only to the paid wire body), paid requests keep Pi's own cache markers, first-prompt and fork lookback, conversation cache diagnostics chained per primary turn (paid, forks, Prime and CacheKeep stay out), /claude quota refresh, limit editors, lane start, and killswitch edits that never alter the switch itself.

Still in draft: the Pi state move.

Written for commit d7e754d. Summary will update on new commits.

View guided diff Turn on auto-fix

@ualtinok
ualtinok force-pushed the parity/2026-11-23 branch 2 times, most recently from ec8655a to 56c0013 Compare November 23, 2026 18:12
…rts and per-send billing reports, as on OpenCode 2
…ms gzipped on OpenCode 1 and Pi; OpenCode 1 warms leave cache diagnostics
Save standard quota from the serving OAuth response through the native store without blocking the stream. Keep poll-owned fields and do not use rounded header percentages to authorize a paid fallback.

Share the OpenCode endpoint resolver without changing its wrapper. Pi keeps saved paid endpoints and applies Core model aliases only to the paid wire body.
Use Core opt-in, record validation and beta hashing on the final OAuth body and the corresponding SSE message start. Only primary conversation replies advance the processor-local predecessor, while session-tagged auxiliary replies can log without replacing it.

Keep paid requests, forks, Prime and CacheKeep observations out of this chain. Forget correlations at session shutdown.
OpenCode 2 now uses the short cache when the setting is missing or default; existing settings and runner policies still decide explicit choices. Update the release-oracle comparison only for the removed setting and the intentional default wire difference.

Remove the opt-in filesystem feed and keep the existing quota header harvest and relay coverage. Keep the legacy stored field available to migration for rollback; the shared settings reader reports it as unknown without rewriting the file.
Prime adds one startup timer even when disabled; quota-sweep fixtures still exercise the original poll and dispatch assertions. Keep-warm-off continues to report exact cache touches without forwarding usage to price a nonexistent target. The paid fallback sends no Claude Code betas, while the Pi settings test still observes both OAuth fast-mode states. Archive comparisons account for the first diagnostics predecessor, and fork prefix comparisons mask only the non-cache billing text and diagnostics.
Check the original CacheKeep target after the restart delay. The header hook receives a copy with rewritten bytes, but immediate attempts are fenced by the original object identity. Keep every existing account and origin check before dispatch. Drop diagnostics when building a warm in Core so Pi cannot replay a conversation predecessor and OpenCode keeps the same rule.
The new Prime interval and CacheKeep share a 60-second cadence, so find-by-period invoked Prime instead of exercising the token and retry assertions. Tick the CacheKeep manager directly. The OpenCode 2 default TTL in both diagnostics records is now five minutes; keep exact comparison of the other fields and the beta list.
…fallback, revisits and refusal returns as on OpenCode 2
…ent of lifetime; first-prompt and fork lookback; lane start by queued action; /claude refresh and killswitch edits as on OpenCode 2
…n across OpenCode 1 and 2 servers; restart scans keep live temp files
…tured without full usage; Pi warms stay out of diagnostics; OC2 prices survive a failed lookup; stricter test oracles
…re never taken over on boot-time evidence alone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant