Skip to content

docs(opencode): add reasoning capability validation procedure - #577

Merged
mogul merged 7 commits into
mainfrom
docs/574-reasoning-validation
Nov 5, 2026
Merged

mogul merged 7 commits into
mainfrom
docs/574-reasoning-validation

Conversation

@mogul

@mogul mogul commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

🤖: AI agent (First Mate), AI-assisted change (OpenCode). Human review required before merge.

Summary

Adds integrations/isolation/acq-kits/opencode/docs/reasoning-validation.md: the separate procedure ADR 0006 requires before reasoning may be published, plus the result of running its design experiment live on OpenCode 2.0.30. The finding is "not verifiable here / recommend the field stay absent for all models". No script, no data, no schema or catalog change, no capability value.

Key findings (details and limits are in the doc):

  • OpenCode 2.0.30 treats a provider-model reasoning setting as an unsupported legacy setting and omits it (logged as a normalization warning). Request, variants, events and usage were identical for absent, true and false.
  • model#low|medium|high variants work and send reasoning_effort regardless of the field.
  • The USAi gateway returned no reasoning field and no reasoning_tokens for the four models examined. Hidden thinking shows only as token accounting, which differs per family, and the effort and disable switches tried had no observable effect, so there is no usable control on any model. Every model is therefore indeterminate and the field stays absent: a null observation or a control working only on another model cannot establish false, which needs an explicit target-specific gateway or vendor statement that the model's reasoning capability itself is unsupported (a rejected parameter, effort value or endpoint is not one); true needs target-specific positive evidence.
  • Consequence: the ADR's mapping table row (neutral reasoning to OpenCode reasoning) is a no-op on the pinned version. ADR 0006 is now amended (see below).

Issues

Before / After

  • Before: ADR 0006 says a separate reasoning procedure is required; none exists.
  • After: the procedure exists with purpose, scope, preconditions, steps, controls, classification, decision rule, evidence-file format, stop conditions and limits, and its decision rule currently publishes nothing.

Verification

Run live (sandbox with OpenCode 2.0.30, gateway reached through the sandbox proxy):

  • About 60 direct gateway requests (chat completions, streaming and non-streaming) across claude-sonnet-5.5, gpt-6-astra, gemini-3.5-flash, gpt_5_2_default_v2, with llama_4_maverick once: baseline, reasoning_effort low/high/none and thinking: disabled (the last two on two models only).
  • 18 OpenCode runs against the live gateway (3 models, field absent/true/false, 2 runs each, isolated XDG tree, --standalone) plus 1 smoke run.
  • About 25 OpenCode runs against a local stand-in server to compare request bodies and events for field absent/true/false, --thinking, and variants.
  • Binary inspection of the OpenCode 2.0.30 executable by text search.

Not run: OpenCode 1.x, any model other than those listed, repeat runs beyond single digits, cost and latency measurement, the Quickstart projection. The procedure itself was not executed end to end (its steps were exercised piecemeal).

Checks (re-run after the amendment): make validate passes; markdownlint (.github/linters/run-markdownlint.mjs) passes; pytest 779 passed; ruff reports only pre-existing findings in unrelated files; pre-commit secret scan passes. Raw notes were kept in a gitignored scratch directory and are not in the PR.

Owner decision and ADR 0006 amendment

The owner of the epic accepted keeping reasoning absent for every model (2026-11-04). A second commit amends integrations/isolation/docs/decisions/0006-neutral-model-capability-metadata.md with a dated Amendment section (status stays proposed, history not rewritten):

  • Mapping row reasoning now reads "not applied on 2.0.30": OpenCode 2.0.30 drops the field with the warning omitted unsupported legacy setting; variants do not depend on it.
  • Evidence table row for reasoning now points to reasoning-validation.md and states the decision rule: no value is published; revisit only if a future OpenCode or gateway exposes an observable control.
  • Renderer note: render-provider-config.mjs still emits a supplied boolean reasoning (and its tests assert that). Nothing is emitted today because the catalog and snapshots carry no reasoning. Harmless on 2.0.30 beyond one logged warning per model; OpenCode 1.x behavior was not tested. Code and tests were deliberately not changed.
  • Unresolved: OpenCode 1.x, cost and latency, models not probed, consumers outside the kit.

Still docs only: no schema, catalog, renderer or script change.

Merge Guard

Docs only. Human review required. Do not merge as authority for publishing any reasoning value; ADR 0006 is still proposed.

Rollback

Revert the commits on this branch (docs only).

Security Impact

No credential exposure. The API key was read only through the environment variable placeholder by OpenCode and by throwaway local scripts that did not print, log or store it, and no environment dump was run. The document contains no key, no transcripts and no non-public hostnames. No change to authentication, data handling or attack surface.

mogul and others added 2 commits November 4, 2026 21:21
Record the live investigation of the neutral reasoning field against
OpenCode 2.0.30 and the USAi gateway: OpenCode omits the field as an
unsupported legacy setting and the gateway exposes no reasoning signal,
so the field stays absent for every model. No script and no data.

Co-authored-by: OpenCode Agent <[email protected]>
@mogul
mogul marked this pull request as ready for review November 4, 2026 22:06
@mogul
mogul requested a review from a team as a code owner November 4, 2026 22:06
Record that OpenCode 2.0.30 drops the reasoning model setting, mark the
mapping row as not applied, and capture the owner decision to keep
reasoning absent for every model.

Co-authored-by: OpenCode Agent <[email protected]>

@basiliskus basiliskus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: request changes — a54f752cc776c7afe03bf2d0072fd8841a49ca5d

Must fix before merge: 1. Keep unsuccessful or unobserved reasoning indeterminate; it cannot substantiate known-unsupported metadata.

  1. Major — integrations/isolation/acq-kits/opencode/docs/reasoning-validation.md:139–141 (publication at :160–162): Missing telemetry plus failed arithmetic qualifies a target as “Does not reason,” while the on-switch positive control runs on a different model. A reasoning-capable target with thinking disabled by default, suppressed telemetry, or wrong answers can therefore receive reasoning: false once a consumer needs it. Retain indeterminate/absent unless target-specific evidence establishes unsupported capability; successful reporting on another model cannot establish that.

    Evidence — confirmed: The classification permits this case; ADR 0006 defines false as known-unsupported, and the document's own limits say reporting does not establish internal reasoning.

Not verified: Live gateway/model behavior and the author's unattached raw probes; local Python validation blocked by missing packages. Exact-head CI passes, but does not exercise this procedure.

Assisted-by: OpenCode [GPT 6.1 Sol Latest Guardrails Defaultv2] skill:change-review

@mogul

mogul commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

🤖: AI agent (First Mate), posting on behalf of @mogul. Reply to the review at a54f752c.

Fixed in 09ddedef. Every class now needs target-specific evidence. false (known-unsupported) is concluded only from an explicit gateway or vendor statement about that model; a null or negative observation, or a positive control run on another model, is Indeterminate and the field stays absent. true needs a signal on the target plus the target`s own switch changing it. The decision rule, controls, limits (reporting telemetry does not establish internal reasoning), the ADR 0006 amendment and its evidence-table row are reconciled, and the kit README notes that OpenCode 2.0.30 drops the field.

@mogul
mogul requested a review from basiliskus November 4, 2026 23:53

@basiliskus basiliskus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: request changes — 09ddedef32d1e5787db4e72ab5848104e32cf06d

Must fix before merge: 1. Do not treat rejection of a reasoning parameter as proof that reasoning capability is unsupported.

Prior finding: the missing-telemetry/failed-arithmetic path to false is resolved in 09ddede; those observations now stay indeterminate.

  1. Major — integrations/isolation/acq-kits/opencode/docs/reasoning-validation.md:147–151 (publication at :182–185): The replacement rule accepts an error naming a reasoning parameter as unsupported for the target as evidence for reasoning: false. That establishes unsupported request syntax/control, not unsupported reasoning capability: a reasoning-capable model can reject a parameter, effort value, or endpoint while reasoning through its supported API. A consumer needing the distinction could therefore still publish an incorrect known-unsupported value. Remove this example and explicitly keep parameter/value/endpoint rejections indeterminate unless the response states that the target's reasoning capability itself is unsupported. Align the ADR's evidence rule with that distinction.

    Evidence — confirmed rule mismatch, not a live gateway reproduction: The classification explicitly permits this evidence. OpenAI's model documentation calls GPT-5 Pro a reasoning model but limits it to the Responses API and reasoning.effort: high; request-control support and capability are distinct.

Not verified: Live gateway behavior, author's unattached raw probes, and OpenCode V2 docs (HTTP 403). Exact-head CI passes; a duplicate title job was cancelled before any steps, not a demonstrated lint failure. CI does not exercise this procedure.

Assisted-by: OpenCode [GPT 6.1 Sol Latest Guardrails Defaultv2] skill:change-review

@mogul

mogul commented Nov 5, 2026

Copy link
Copy Markdown
Contributor Author

🤖: AI agent (First Mate), posting on behalf of @mogul. Reply to the review at 09ddedef.

Fixed in b2c3c257. I removed the "error naming a reasoning parameter" example. Parameter, value and endpoint rejections now stay indeterminate unless the response or the vendor documentation states that the models reasoning capability itself is unsupported, and the procedure gives one example of each kind. truestill needs target-specific evidence of the capability, not just an accepted control. ADR 0006 and its amendment, the kit README and the image procedure are aligned to the same rule, and the branch also mergesmain`. CI is green.

@basiliskus basiliskus left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verdict: approve — b2c3c2575178b0c5019e7a3e4e9559b22fd0fa6d

Must fix before merge: none.

Prior findings:

  1. Resolved in 09ddede, retained at this head: Missing telemetry, failed arithmetic and another model's control cannot establish reasoning: false; these remain indeterminate/absent.
  2. Resolved in b2c3c25: integrations/isolation/acq-kits/opencode/docs/reasoning-validation.md:148–170 now explicitly distinguishes unsupported capability from parameter/value/endpoint rejection. Publication at :181–192, ADR 0006's evidence/amendment rules, the kit README and the image procedure preserve that distinction. Confirmed by tracing the current documentation, not by live gateway reproduction.

No new findings. This approves the documentation change, not publication of any reasoning value; the current decision keeps the field absent.

Not verified: Live gateway/OpenCode behavior, the author's unattached raw probes, and end-to-end procedure execution; OpenCode V2 configuration docs returned HTTP 403. Exact-head CI passes but does not execute this procedure.

Assisted-by: OpenCode [GPT 6.1 Sol Latest Guardrails Defaultv2] skill:change-review

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.

2 participants