Skip to content

Providers: add Opencode Go support#42313

Merged
vincentkoc merged 6 commits intoopenclaw:mainfrom
ImLukeF:split/opencode-go-support
Mar 11, 2026
Merged

Providers: add Opencode Go support#42313
vincentkoc merged 6 commits intoopenclaw:mainfrom
ImLukeF:split/opencode-go-support

Conversation

@ImLukeF
Copy link
Copy Markdown
Contributor

@ImLukeF ImLukeF commented Mar 10, 2026

Split from #41560.\n\nScope:\n- Add opencode-go provider models + routing\n- Add onboarding/auth-choice wiring for opencode-go\n- Add provider docs and model-provider docs updates\n- Add related tests\n\nNo macOS UI changes in this PR.

@openclaw-barnacle openclaw-barnacle bot added docs Improvements or additions to documentation cli CLI command changes commands Command implementations agents Agent runtime and tooling size: M labels Mar 10, 2026
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps bot commented Mar 10, 2026

Greptile Summary

This PR adds full support for the opencode-go provider — a separate Go-hosted model catalog (Kimi K2.5, GLM-5, MiniMax M2.5) that coexists with the existing OpenCode Zen path. The implementation follows the established patterns for other API-key providers: new model definitions, a dedicated credentials helper, onboarding/auth-choice wiring, and thorough unit tests.

Key additions:

  • src/agents/opencode-go-models.ts: static model catalog with per-model routing (kimi/glm → OpenAI-compat, minimax → Anthropic messages) and alias resolution
  • src/commands/onboard-auth.config-opencode-go.ts: provider config/default-model helpers following the same shape as the Zen equivalents
  • Full AuthChoice, OnboardOptions, CLI flag, and non-interactive onboarding wiring
  • Tests covering alias resolution, model API routing, credential storage, auth-choice application, and live-run skip logic

Two minor findings remain:

  • applyOpencodeGoModelDefault in src/commands/opencode-go-model-default.ts is exported but never imported or called anywhere; only the re-exported OPENCODE_GO_DEFAULT_MODEL_REF constant is consumed
  • The inline comment in src/agents/live-model-filter.ts still reads "OpenRouter/opencode are pass-through proxies" but should include opencode-go since it was added to the condition

Confidence Score: 4/5

  • Safe to merge — implementation follows established provider patterns with good test coverage; only minor dead-code and stale-comment issues found.
  • The PR is well-structured and closely mirrors the existing OpenCode Zen provider pattern across every touch point (models, credentials, config helpers, auth-choice wiring, non-interactive onboarding, and tests). No logic errors or security issues were identified. The score is 4 rather than 5 due to one exported helper (applyOpencodeGoModelDefault) that appears to be dead code, and a stale comment in live-model-filter.ts — both of which are low-risk but worth cleaning up before merge.
  • src/commands/opencode-go-model-default.ts (exported unused function), src/agents/live-model-filter.ts (stale comment)

Comments Outside Diff (1)

  1. src/agents/live-model-filter.ts, line 84-88 (link)

    Comment should mention opencode-go

    The code condition on line 84 includes "opencode-go", but the comment on line 85 still only mentions "OpenRouter/opencode". Update the comment to reflect the current set of pass-through proxies:

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: src/agents/live-model-filter.ts
    Line: 84-88
    
    Comment:
    Comment should mention `opencode-go`
    
    The code condition on line 84 includes `"opencode-go"`, but the comment on line 85 still only mentions "OpenRouter/opencode". Update the comment to reflect the current set of pass-through proxies:
    
    
    
    How can I resolve this? If you propose a fix, please make it concise.

Last reviewed commit: 5d21dfd

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 5d21dfd85c

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 280183bc45

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

@vincentkoc vincentkoc self-assigned this Mar 11, 2026
@openclaw-barnacle openclaw-barnacle bot added the gateway Gateway runtime label Mar 11, 2026
@vincentkoc vincentkoc merged commit 7761e76 into openclaw:main Mar 11, 2026
9 checks passed
frankekn pushed a commit to MoerAI/openclaw that referenced this pull request Mar 11, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
frankekn pushed a commit to Effet/openclaw that referenced this pull request Mar 11, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
frankekn pushed a commit to ImLukeF/openclaw that referenced this pull request Mar 11, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
hydro13 pushed a commit to andyliu/openclaw that referenced this pull request Mar 11, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Treedy2020 pushed a commit to Treedy2020/openclaw that referenced this pull request Mar 11, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
mrosmarin added a commit to mrosmarin/openclaw that referenced this pull request Mar 11, 2026
* main: (49 commits)
  fix(agents): add nodes to owner-only tool policy fallbacks
  fix(gateway): propagate real gateway client into plugin subagent runtime
  fix(gateway): enforce caller-scope subsetting in device.token.rotate
  fix(terminal): stabilize skills table width across Terminal.app and iTerm (openclaw#42849)
  fix(models): guard optional model input capabilities  (openclaw#42096)
  macOS/onboarding: prompt for remote gateway auth tokens (openclaw#43100)
  fix(macos): use foundationValue when serializing browser proxy POST body (openclaw#43069)
  feat(ios): add local beta release flow (openclaw#42991)
  docs(changelog): update context pruning PR reference
  fix(context-pruning): cover image-only tool-result pruning
  fix(context-pruning): prune image-containing tool results instead of skipping them (openclaw#41789)
  fix(agents): include azure-openai in Responses API store override (openclaw#42934)
  fix(telegram): fall back on ambiguous first preview sends
  fix(telegram): prevent duplicate messages with slow LLM providers (openclaw#41932)
  Providers: add Opencode Go support (openclaw#42313)
  fix(sandbox): sanitize Docker env before marking OPENCLAW_CLI (openclaw#42256)
  macOS: add chat model selector and persist thinking (openclaw#42314)
  fix: clear pnpm prod audit vulnerabilities
  fix(build): restore full gate
  fix(gateway): split conversation reset from admin reset
  ...
dhoman pushed a commit to dhoman/chrono-claw that referenced this pull request Mar 11, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
ahelpercn pushed a commit to ahelpercn/openclaw that referenced this pull request Mar 12, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Ruijie-Ysp pushed a commit to Ruijie-Ysp/clawdbot that referenced this pull request Mar 12, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
leozhengliu-pixel pushed a commit to leozhengliu-pixel/openclaw that referenced this pull request Mar 13, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
plabzzxx pushed a commit to plabzzxx/openclaw that referenced this pull request Mar 13, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
wdskuki pushed a commit to wdskuki/openclaw that referenced this pull request Mar 16, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
senw-developers pushed a commit to senw-developers/va-openclaw that referenced this pull request Mar 17, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
t--becker pushed a commit to t--becker/openclaw that referenced this pull request Mar 19, 2026
* feat(providers): add opencode-go provider support and onboarding

* Onboard: unify OpenCode auth handling openclaw#42313 thanks @ImLukeF

* Docs: merge OpenCode Zen and Go docs openclaw#42313 thanks @ImLukeF

* Update CHANGELOG.md

---------

Co-authored-by: Ubuntu <[email protected]>
Co-authored-by: Vincent Koc <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling cli CLI command changes commands Command implementations docs Improvements or additions to documentation gateway Gateway runtime size: M

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants