# All OpenCode free models in the fallback cascade

Status: implemented and verified. Publication and runtime replacement remain
with the user. The subsequent live-reply fixes are tracked separately in
[fallback reply contracts](WO-fallback-reply-contracts-20261012.md).
The original preferred-first/provider-fairness ordering recorded below has been
superseded by [benchmark-informed priority](WO-fallback-quality-order-20261012.md)
at the user's subsequent request.

## Request

All free models offered by OpenCode must be lined up in Omnius's fallback chain,
including later catalog entries and models using the Responses API. This extends
the [keyless fallback repair](WO-keyless-fallback-coverage-20261012.md).

## Findings

The prior implementation loaded the free chat catalog dynamically, but limited
each provider to 16 compatible models. An installed-runtime regression with 512
eligible models reproduced exhaustion after only 16 OpenCode dispatches. The
global distinct-attempt bound also assumed 16 models per provider.

The [current primary-source audit](evidence/opencode-all-free-audit-20261012.json)
found eight active, live, explicitly zero-cost models:

| Model | API |
| --- | --- |
| `nemotron-3.5-lightning-free` | Chat completions |
| `big-pickle` | Chat completions |
| `ling-3.1-flash-free` | Chat completions |
| `longcat-2.5-preview-free` | Chat completions |
| `mimo-v2.6-flash-free` | Chat completions |
| `space-bunny-free` | Chat completions |
| `step-5-preview-free` | Chat completions |
| `muse-spark-1.3-contributor-free` | Responses |

The chat-only parser excluded Muse Spark 1.3 because its per-model SDK is
`@ai-sdk/openai`, whose upstream transport uses `/responses`. OpenCode's default
loader excludes deprecated models; the current live ID list also contains an
unknown free-suffix ID without corresponding cost/capability metadata. Neither
a deprecated entry nor an unknown suffix alone establishes an offered free
model for automatic routing.

## Work and acceptance

1. Enumerate every compatible OpenCode free model within the shared 512-row
   catalog safety bound. Adjust total dispatch accounting accordingly. Keep
   stable ordering, preferred Nemotron first, provider fairness and model-level
   cooldowns. Newly published eligible catalog entries require no code update.
2. Add the source-derived, exact-origin Responses adapter for the model's
   declared transport. Preserve full conversation, tool-result history, exact
   original host tool schemas and choices, structured output, cancellation and
   no replay after visible output. Protocol metadata never authorizes tools.
3. Share enumeration and Responses handling with the credentialless setup
   pool. Model-specific failures must not disable all OpenCode alternatives.
   Keep setup deadlines and count network requests against the full model bound.
4. Prove full 512-model traversal through the helper and packaged backend in
   unary and streaming modes, including tool/schema requests, plus Responses
   routing, capability exclusions, cooldowns, catalog refresh and host identity
   isolation. Tests use synthetic HTTP; no local model requests or tools execute.
5. Rebuild and verify the package, record receipts, commit and push scoped work.
   Preserve unrelated checkout changes and leave publication/runtime activation
   to the user.

All models belong in the eligible cascade; a request still stops at its first
usable success, cancellation, or deadline. Capability and context checks must
not weaken the requested contract to force an incompatible model into use.

## Verification

The complete current metadata audit yields all eight active live free models,
including Muse's declared Responses transport. The regression suite reconstructs
the audited metadata to assert exactly that coverage. Both the production helper
and the packaged backend reach the 512th eligible model after 511 model-specific
failures, in text, forced native-tool and strict-schema requests, unary and
streaming. Other providers retain their first attempt before OpenCode alternates.

The source suites passed 399 orchestrator and 100 CLI tests, with one existing
skip. This includes 57 setup-pool tests, model-level cooldowns, catalog refresh,
transport isolation, complete context/tool/schema preservation and Responses
terminal/cancellation handling. The compatibility harness passed 30 tests.

Full clean recursive build, bundling, packing and compiler-free fresh npm
installation passed for the prepared 1.0.848 artifact. The required SQLite
prebuild loaded. The [installed backend receipt](evidence/opencode-all-free-installed-verification-20261012.json)
records all 48 mocked transport cases passing, including full 512-model traversal
and Muse's six unary/streaming text/tool/schema cases. These checks sent no real
inference requests or Telegram messages. No package was published by this work.
