Skip to content

fix(responses): normalize OpenCode Go output include - #8827

Closed
Ingwannu wants to merge 1 commit into
lidge-jun:devfrom
Ingwannu:fix/8702-opencode-go-output-include
Closed

Ingwannu wants to merge 1 commit into
lidge-jun:devfrom
Ingwannu:fix/8702-opencode-go-output-include

Conversation

@Ingwannu

@Ingwannu Ingwannu commented Nov 16, 2026 •

Copy link
Copy Markdown
Owner

Summary

Closes #8702.

OpenCode Go multiplexes Responses backends with different include support. A Codex App request containing the optional output.encrypted_content entry can receive a 400 before inference. Reuse the existing exact Go final-URL predicate and shared include cleanup to omit only that entry at https://opencode.ai/zen/go/v1/responses, across its models.

  • Preserve reasoning.encrypted_content, other/unknown entries, malformed values, caller input and existing reasoning history. Omit include if removal leaves an empty array.
  • Keep ordinary OpenAI, Zen, custom and lookalike destinations unchanged. No model-name allowlist, endpoint expansion, model metadata, new dependency or GUI change.
  • Add real outbound-body regressions in the existing Go test file and update the owning structure contract plus factual English/Spanish reference text. Dependent citation docs refer to the destination policy without duplicating an obsolete allowlist.

Verification

Base: da021e37dc15ba740aaca05fd4fd125c12df578e (dev was still identical immediately before publication). Bun 1.4.4, Linux, ubuntu UID/GID 1000, isolated worktree and fresh temporary HOME/CODEX_HOME/OPENCODEX_HOME/TMPDIR; one local workload at a time under cgroup CPU/memory/swap/process/time caps.

  • Before the source fix, bun test tests/providers/opencode-go-grok46-responses.test.ts: 44 pass / 4 fail, the newly asserted output-include cleanup fails on the actual emitted request.
  • After the fix, bun test tests/providers/opencode-go-grok46-responses.test.ts tests/responses/responses-muse-tool-choice.test.ts tests/adapters/openai/openai-empty-assistant-history.test.ts: 104 pass / 0 fail, 414 assertions. Includes multiple Go model families, reasoning/unknown-entry preservation, non-mutation, empty/malformed includes and unrelated destination controls. Existing final-URL predicate controls cover credentials, query/fragment and wrong resources.
  • bun check --no-script --noEmit: 2,549 files, no type errors.
  • bun test tests/ci-workflows/structure-ssot.test.ts tests/ci-workflows/file-size-ratchet.test.ts tests/ci-workflows/docs-spanish-localization.test.ts: structure 51 pass, ratchet 9 pass. Spanish initially failed on the added external-link parity; after updating the Spanish contract, bun test tests/ci-workflows/docs-spanish-localization.test.ts: 30 pass / 0 fail. No ratchet baseline increased.
  • git diff --check: passed.
  • bun install --frozen-lockfile --ignore-scripts for root, GUI type dependencies and docs: passed. No lockfile or manifest changes.
  • bun run --cwd docs-site build: not completed. Astro generated pages/images, then the Starlight/Pagefind integration did not finish within the fixed 300-second local envelope and was terminated by the cgroup service timer. No limit increase or unbounded retry. Complete docs build remains for hosted CI.

Resource exception / remaining coverage: the repository-wide import graph is disproportionate to this one optional-field compatibility correction on this shared development host. Focused behavioral tests, typecheck and structural/localization gates are recorded above; the full and changed suites were not run. Required hosted CI, complete docs build and owner review remain pending, so this stays Draft. No native Windows/macOS run, paid provider/model call, real credential operation or live Codex App end-to-end verification was performed. Fixture success does not certify all upstream models.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed.
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. Manual review: only a pre-existing exact final URL classifier and optional request-body entry are used; no credential, destination or permission change.

@coderabbitai

coderabbitai Bot commented Nov 16, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@github-actions

Copy link
Copy Markdown
Contributor

✅ Deterministic PR hygiene checks passed.

lidge-jun added a commit that referenced this pull request Nov 17, 2026
…nclude, Command Code root schemas, JEV continuation effort (#8873)

Lane R3 of the 2026-11-17 triage round: rewrite the Claude Code sentences Cognition refuses for Devin (#8703), normalize the OpenCode Go output include (#8827), normalize root tool schemas for Command Code's Claude upstreams (#8591), and keep JEV's decided effort through tool-loop continuations (#8861, continuation fix only), with review follow-ups.

Co-authored-by: 袁威豪 <137183806+jhl880617@users.noreply.github.com>
Co-authored-by: Ingwannu <186453546+Ingwannu@users.noreply.github.com>
Co-authored-by: Mursyid <ciddhere@gmail.com>
Co-authored-by: tachyon6 <songjunjun62754@gmail.com>
@lidge-jun

Copy link
Copy Markdown
Owner

Thank you. This change was carried, with your authorship kept as a Co-authored-by trailer, in #8873, which is now merged into dev as 2590e2e (2026-11-17 triage round). Closing as superseded; see #8873 for the review follow-ups made on top.

@lidge-jun lidge-jun closed this Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Provider compatibility]: OpenCode Go Responses rejects output.encrypted_content from Codex App

2 participants