Skip to content

fix(cli): support OpenCode V2 config format in setup-opencode (#11070) - #11079

Merged
diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.50from
rqzbeh:fix/opencode-v2-config-support
Aug 22, 2026
Merged

diegosouzapw merged 1 commit into
diegosouzapw:release/v3.8.50from
rqzbeh:fix/opencode-v2-config-support

Conversation

@rqzbeh

@rqzbeh rqzbeh commented Aug 22, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes #11070 where omniroute setup-opencode generated only OpenCode V1 config (provider.omniroute), which caused OpenCode 2 (opencode2) to reject the config block as invalid.

Changes

  1. src/shared/services/opencodeConfig.ts: Implemented buildOpenCodeV2ProviderConfig to output OpenCode V2 format (providers.omniroute with package, settings.baseURL, settings.apiKey, and models limits), and updated buildOpenCodeConfigDocument, mergeOpenCodeConfig, and mergeOpenCodeConfigText to emit both V1 and V2 definitions for full backwards & forwards compatibility.
  2. tests/unit/opencode-v2-config-11070.test.ts: Added automated unit test suite asserting that generated/merged OpenCode documents produce valid V1 (provider.omniroute) and V2 (providers.omniroute) sections and preserve existing properties.

Verification

  • node --import tsx/esm --test tests/unit/opencode-v2-config-11070.test.ts (2/2 passed)
  • node --import tsx/esm --test tests/unit/opencode-merge-provider-guard.test.ts tests/unit/t40-opencode-cli-tools-integration.test.ts tests/unit/opencode-config-dir-single-source.test.ts (passed)
  • npm run check:mutation-test-coverage (passed)
  • npm run check:dashboard-typecheck (passed)
  • npm run check:open-sse-typecheck (passed)

@diegosouzapw
diegosouzapw force-pushed the fix/opencode-v2-config-support branch from 9f686b6 to 4decd59 Compare August 22, 2026 19:00
@diegosouzapw
diegosouzapw merged commit 9a67185 into diegosouzapw:release/v3.8.50 Aug 22, 2026
5 of 7 checks passed
diegosouzapw pushed a commit that referenced this pull request Aug 23, 2026
…0964)

Merged after conflict triage: the six base-red repair files (vi.json, opencode.ts JSDoc, context-manager test, the three webhook dispatcher tests, the uncloseai orphan-test rename) were already drained on the tip by today's #11130/#11157/#11160/#11113 — those hunks resolved to the tip shape. What lands is the production-fix set: GLM transport-aware Anthropic headers, Claude Code-compatible model-listing rejection, combo live-test single-probe, zero-cost Auto-Combo interval normalization, recovery-clearing union handling, LLMLingua real-path compare, macOS netstat PID discovery, AI Horde R2 strict public-host validation. Sweep of every touched test file: 243/243 green; typecheck + file-size clean. (guide-settings-route's 4 reds reproduce on the pure tip — pre-existing drift from #11079, not from here.) Thank you @backryun!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…ouzapw#11070) (diegosouzapw#11079)

Cherry-picked the value commit (55da60f) onto the current tip, dropping the stale base-red sync commits. Focused tests: opencode-v2-config-11070 + merge-provider-guard + config-dir-single-source 12/12; mutation coverage gate no-drift (new test registered in tap.testFiles by the PR itself). Fixes diegosouzapw#11070 — setup-opencode now emits both V1 and V2 blocks. Thank you @rqzbeh!
muhamadgalihsaputra pushed a commit to niyatna/NiyatnaRoute that referenced this pull request Sep 27, 2026
…egosouzapw#10964)

Merged after conflict triage: the six base-red repair files (vi.json, opencode.ts JSDoc, context-manager test, the three webhook dispatcher tests, the uncloseai orphan-test rename) were already drained on the tip by today's diegosouzapw#11130/diegosouzapw#11157/diegosouzapw#11160/diegosouzapw#11113 — those hunks resolved to the tip shape. What lands is the production-fix set: GLM transport-aware Anthropic headers, Claude Code-compatible model-listing rejection, combo live-test single-probe, zero-cost Auto-Combo interval normalization, recovery-clearing union handling, LLMLingua real-path compare, macOS netstat PID discovery, AI Horde R2 strict public-host validation. Sweep of every touched test file: 243/243 green; typecheck + file-size clean. (guide-settings-route's 4 reds reproduce on the pure tip — pre-existing drift from diegosouzapw#11079, not from here.) Thank you @backryun!
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.

fix(cli): setup-opencode writes OpenCode V1 config; OpenCode 2 skips the entire OmniRoute provider

2 participants