# OpenCode production request compatibility

Status: implemented and verified. Telegram presentation is also completed.
Publication and active-runtime restart remain with the operator. Step's native
attention-format compatibility remains unverified after a provider limit; the
working cascade can continue to other compatible models.

## Evidence and cause

The running 1.0.849 bundle matched the prepared artifact. The discrepancy was
request compatibility and routing, not an old installed bundle. Earlier live
Nemotron/Kilo probes did not establish compatibility of the newly prioritized
Muse/Step models with the full Telegram attention schema.

Real synthetic probes found:

- Muse Responses rejects `tool_choice: none`, `required` and named choices;
  it accepts only `auto`. The compatibility core definitions made the original
  tool-free request include tools on the wire. Host tool authority must remain
  unchanged when adapting that wire choice.
- After the choice repair, Muse rejects `uniqueItems` with the diagnostic
  “JSON schema keyword `uniqueItems` is not supported for structured outputs”.
  The existing schema-recovery path did not recognize this HTTP 400 wording.
- Step returned `pong` for a plain conversation, but the original attention
  schema returned an opaque upstream HTTP 400. Its cause is still under live
  investigation; do not attribute it to a particular keyword without evidence.
- The public native fast path promoted a sealed `conversation` judgment into
  an action runner. That produced the empty progress panel and false incomplete
  suffix. Admission must require both action route and action execution class.

## Required work and acceptance

1. Condition the selected model's actual protocol and observed wire limitations.
   Keep original tool choice, offered names, argument schemas and structured
   response validation authoritative. Compatibility definitions grant no actions.
2. Recognize only evidenced HTTP 400 schema limitations and retain bounded
   same-route recovery. Preserve auth, rate, context, cancellation and ownership
   behavior; never treat arbitrary upstream messages as capability evidence.
3. Validate with real OpenCode generations through production builders, parsers,
   fallback discovery, budgeting and original host-schema checks. No fabricated
   model replies. The reusable `scripts/live-opencode-fallback-harness.mjs`
   enters the exact production remote phase without inventing a local result or
   local failure. This does not test local broker admission or Telegram transport.
4. Fix public conversation admission and complete the paragraph/Activity
   presentation work under its separate work order. Preserve final ACK authority.
5. Rebuild all workspace packages, verify the packaged artifact, retain safe live
   receipts and commit/push scoped changes.

## Verification

The real remote cascade returned original-schema-valid attention JSON from
Muse after HTTP 400 -> same-model adapted HTTP 200, then returned `pong` on
HTTP 200. The first selected-backend probes also returned `pong` from Step.
Synthetic input only; zero local inference requests, Telegram messages or tool
executions. Mocked regressions protect invariants and are not availability proof.

The clean rebuild, tarball audit and compiler-free fresh npm installation passed.
The [installed-bundle live receipt](evidence/opencode-installed-production-stream-live-20261012.json)
exercises the exact shipped fallback stream phase, actual free/available model
discovery, production request/parser paths and the original attention schema.
Both attention and conversation passed with 56,000 bytes of synthetic background:
Muse returned HTTP 400 -> adapted same-model HTTP 200 for attention, and HTTP 200
with exactly `pong` for conversation. No model/metadata replies were mocked.
The installed and prepared bundle SHA256 is
`d8636120a09b01e5510cb048c5cafcbb0598474653831174196e6e708de3c33e`.
The packed artifact SHA256 is
`88e078ab0bfd38895f8d1691060526f5c7bba8b894b874be7b1c0b361a72545b`.
The validation artifact retains version 1.0.849; the operator's publication
workflow must still select a new release version.

Step's [bounded diagnostic](evidence/opencode-step-rate-limited-diagnostic-20261012.json)
stopped after one HTTP 429 (“Endpoint is unavailable”). Its second diagnostic
was withheld. No evidence supports a static Step schema adaptation, so none was
invented. This is not a promise that all remote providers remain available.

404 focused inference regression tests and 237 Telegram regression tests passed.
The latter use explicit mocked transport acknowledgements, not real Telegram
sends. Inference acceptance uses real providers. Local admission and the active
bot's restart were deliberately outside this live remote harness.

Reproduce after building and installing the artifact:

```sh
node scripts/live-opencode-fallback-harness.mjs --run --cascade --stream \
  --bundle /path/to/installed/omnius/dist/index.js --context-bytes 56000 \
  --cases attention,conversation --output /tmp/omnius-opencode-live.json
```

Delivered implementation commits: `7a48a712` (inference compatibility) and
`82fce9cf` (Telegram narration, activity controls and conversation admission).
