# Genuine OpenCode access and source compatibility — 2026-10-14

Status: implemented and verified against the exact scoped source snapshot. All nine active free models passed live bundled Telegram attention, reply generation and review. Actual automatic failover and native tool continuations passed. No mocked inference reply establishes acceptance.

## Proven failure and correction

The original missing-credential explanation was incomplete. Official source intentionally supports anonymous free access with `apiKey: "public"`. A supported request observer in genuine v2.0.29 captured the final serialized request without changing its endpoint, headers or body. A synthetic cross-control isolated the failure to Omnius's added `x-opencode-request` header:

| Live control | HTTP |
| --- | --- |
| Genuine body and genuine headers | 200 |
| Genuine body and original Omnius headers | 403 FreeTierError |
| Omnius body and genuine headers | 200 |
| Omnius headers with only User-Agent version updated | 403 |
| Omnius headers with only x-omnius-client removed | 403 |
| Omnius headers with only x-opencode-request removed | 200 |
| Omnius headers with only project ID replaced | 403 |

The repair removes only the obsolete request header. Omnius attribution, session affinity, original bodies, provider-bound authorization and endpoint pinning remain intact. The experiment establishes today's failure, not the gateway's private implementation or the date its behavior changed.

An older cached catalog also routed genuine clients through `/zen/v1`; the current unchanged public catalog routes through `/inference/v1`. Stable 1.19.0 and installed 2.0.10 both succeeded when supplied the current catalog through supported configuration. Omnius already used the current endpoint; changing its endpoint was not the header repair.

## Required work and acceptance

1. Remove the obsolete request header in the shared transport and assert its absence for Chat, Responses, streaming and onboarding. Done.
2. Treat a FreeTierError as a denial of the attempted model/request. Keep healthy siblings eligible, bound retries and preserve independent credential-revocation fences. Done.
3. Preserve the producer's original JSON schema across Telegram compatibility retries. Compose schema validation with the producer's semantic callback. Do not relax the harness to count an untyped retry as fully validated. Done.
4. Treat gateway `/models` entries as positive listing hints. Its omissions are not exhaustive negatives: the genuine installed client returned a valid reply from `nemotron-3-ultra-free` while that alias was omitted. Retain strict active, zero-cost, transport and endpoint eligibility; preserve selected-model and capability priority. Done.
5. For validated built-in catalog models with unknown native structured-output support, use prompt-only framing from the first request, retaining the full original contract and host callback. Ultra's native-schema request returned an upstream error; a wire-only diagnostic omitting that hint returned valid attention, generation and review. Keep generic 500 classification and other providers unchanged. Done.
6. Refresh the saved fallback catalog from the same public metadata: include active Ultra and remove now-deprecated Ling 3.1. Unknown raw capabilities remain unknown. Done.
7. Verify the exact scoped source snapshot with a full build, focused regressions, a private bundle and live Telegram-phase tests, including real automatic failover. Done; receipts below.

No private conversation, provider key, local inference request or Telegram message is needed for these synthetic acceptance tests. The operator's live client and publish staging remain untouched. A running old package needs the repaired package loaded before its transport changes.

## Reproducible genuine-client harness

```sh
node scripts/live-opencode-access-harness.mjs \
  --binary /absolute/path/to/official/opencode \
  --model opencode/muse-spark-1.3-contributor-free \
  --model opencode/nemotron-3-ultra-free \
  --output-dir /tmp/omnius-genuine-cli-access-new-run \
  --tool-policy ask --timeout-ms 120000
```

`--catalog /absolute/path/to/unchanged-public-catalog.json` is optional. It validates the official provider host/path and zero-cost selected rows, copies the receipt without modification and records its hash. Without it, the report records a free-identifier check rather than claiming verified pricing; the genuine client owns discovery.

The harness uses private application/XDG/project directories, no inherited provider credentials, a fixed synthetic prompt, no automatic approval and timeout cancellation limited to its own process group. It leaves the system HOME setting alone. Ask permissions retain genuine tool schemas; they are not a universal operating-system sandbox. Version 1 runs privately in process; version 2 uses `--standalone`. A pass requires exit 0, exactly `OPENCODE_LIVE_OK`, no truncation and no recorded tools, permissions or errors. Full raw logs remain private; the report contains bounded text, sanitized errors, body digests and separately identified runtime/provider log IDs.

The Telegram harness invokes actual attention routing, chat generation and independent semantic review. It forbids Telegram delivery and native action dispatch. Pinned runs test each model; an explicit cascade run tests automatic provider recovery. All model responses remain live. Contract regression fixtures are reported separately.

## Source and evidence anchors

Official current source: `13afea6a1a76360936bbaa7677cff600ad52d452`; installed v2.0.10 tag: `b8cedc1a7a5e2916bbb65dc1d4b620729c261638`; stable v1.19.0: `733b2c627e5aec39cb33cc22373bdce33053ef2c`.

- Current `packages/core/src/plugin/provider/opencode.ts:337` selects the public sentinel when no credential is configured.
- `packages/core/src/session/model-request.ts:279` builds the genuine session headers; its supported `http.request` hook at 337 observes the final request without a proxy or binary patch.
- TUI and `run --standalone` share server-side inference identity. The local server's Basic password is not a remote credential.
- Provider filtering uses canonical catalog costs and capabilities. The gateway listing does not define all callable aliases.
- The Console inference proxy delegates anonymous authorization/accounting to the gateway. The inspected public source does not define FreeTierError enforcement.

Current public catalog SHA-256: `94443e070c993dd16f330d05b9d4bc4ecef7684138d19c9fcfe8f423a1f5415d`. It contains nine active eligible free models; other zero-price deprecated entries remain excluded.

The initial repaired eight-model run completed all 26 HTTP calls with 200; it also exposed the retry's missing schema receipt. The subsequent run retained that schema but recorded an intermittent Big Pickle envelope failure, Ultra's native-format upstream failure and a Step endpoint outage. Later Big Pickle byte captures returned valid standard SSE and passed all three phases, so no speculative parser change was made. Failed runs remain evidence; a later pass does not erase them. Final verification retains those failures and confirms recovery without relaxing validation.


## Final verification and delivery boundary

The isolated clean workspace build and 1,095 focused tests passed (846 orchestrator, 249 CLI, 38 suites). The package bundle, 605-file tarball audit, README checks and pack passed. Two earlier timing-only test failures under concurrent load passed unchanged with serial CLI execution; their logs remain recorded. The private artifact uses projected declared runtime dependencies; this verification does not claim a new fresh npm install.

Bundle SHA-256: `023444acbff8efddf071415dafa8cb0bf5500b99c5f1863fe238b5fd63248ac3`. All 23 staged runtime/test/harness files match the sealed tested snapshot byte for byte. Subsequent work-order and receipt additions do not change those files.

Live acceptance used that bundle with ordinary Node settings and no provider key:

- Nine models, 18 cases covering attention, reply generation and independent review: passed; all 29 inference HTTP calls returned 200. Big Pickle and Lightning needed bounded attention retries with the full original contract retained.
- Real automatic cascade: Big Pickle produced rejected output during attention and again during review; both phases recovered through Muse. The five HTTP calls remained live, and the reviewed reply completed successfully.
- Native tool calls: Muse Responses and Ultra Chat each generated `diagnostic_add(19,23)`, the host actually computed 42, and each model continued with the actual result. Four live calls passed; two arithmetic tool actions executed.

Telegram network delivery/ACK and the native action runner remain outside this inference harness. No test sent a Telegram message, generated local GPU inference, changed user configuration, restarted a live session or published a package. The operator owns publication; existing clients must load the repaired package afterward.

[Curated genuine-client controls, retained failures, sealed verification and final live receipts](evidence/genuine-opencode-access-repair-20261014.json).
