Skip to content

Providers: add Opencode Go support and macOS model selector#41560

Closed
ImLukeF wants to merge 22 commits intoopenclaw:mainfrom
ImLukeF:ImLukeF/opencode-go-mac-model-selector
Closed

Providers: add Opencode Go support and macOS model selector#41560
ImLukeF wants to merge 22 commits intoopenclaw:mainfrom
ImLukeF:ImLukeF/opencode-go-mac-model-selector

Conversation

@ImLukeF
Copy link
Copy Markdown
Contributor

@ImLukeF ImLukeF commented Mar 10, 2026

Summary

  • add Opencode Go provider docs and onboarding/auth support
  • add the macOS chat model selector and persist the thinking selection
  • align the rebased Codex gpt-5.4 forward-compat expectation with current upstream behavior

Testing

  • pnpm test -- src/agents/opencode-go-models.test.ts src/commands/auth-choice.test.ts src/commands/onboard-auth.test.ts src/commands/onboard-non-interactive.provider-auth.test.ts src/agents/model-compat.test.ts
  • swift test --package-path apps/shared/OpenClawKit --filter ChatViewModelTests
  • swift test --package-path apps/macos --filter WebChatSwiftUISmokeTests

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

greptile-apps bot commented Mar 10, 2026

Greptile Summary

This PR adds full OpenCode Go provider support (auth onboarding, model catalog, API routing, documentation) and implements a macOS chat model selector with persistent thinking-level selection. The implementation closely mirrors the existing OpenCode Zen provider integration and is well-tested.

  • OpenCode Go provider (opencode-go): new model definitions (kimi-k2.5, glm-5, minimax-m2.5), per-model API routing (OpenAI-compatible for Kimi/GLM, Anthropic messages for MiniMax), alias resolver, OPENCODE_API_KEY auth wired into the non-interactive and interactive onboarding flows, and docs.
  • macOS model picker: listModels() / setSessionModel() / setSessionThinking() added to OpenClawChatTransport; OpenClawChatViewModel gains optimistic model-selection with server-side patch and rollback on failure; thinking-level is persisted to UserDefaults and restored across window sessions.
  • Live-test cleanup: isModelNotFoundErrorMessage is inlined locally in models.profiles.live.test.ts, removing the dependency on live-model-errors.js for MiniMax-specific detection.
  • Naming ambiguity: OPENCODE_GO_DEFAULT_MODEL is exported from two modules with different values — "kimi-k2.5" (bare ID) in src/agents/opencode-go-models.ts and "opencode-go/kimi-k2.5" (full ref) in src/commands/opencode-go-model-default.ts. Since the full ref is already available as OPENCODE_GO_DEFAULT_MODEL_REF in the agents file, the duplicate name is a maintainability risk.

Confidence Score: 4/5

  • PR is safe to merge; the only concern is a naming ambiguity that poses a maintainability risk rather than a runtime defect.
  • The PR implements well-structured changes following existing patterns and is covered by new tests (Swift and TypeScript). No logic errors or security issues were found. The single finding — OPENCODE_GO_DEFAULT_MODEL being exported from two modules with different values — is a maintainability risk since it could lead to accidental imports from the wrong module. However, current import sites pull from the correct modules, so there is no immediate production impact. The risk is primarily for future developers who might accidentally import from the wrong file.
  • src/commands/opencode-go-model-default.ts — resolve the duplicate constant name with src/agents/opencode-go-models.ts

Last reviewed commit: 92b07d5

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: 92b07d5bb2

ℹ️ 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: 8b6049ff95

ℹ️ 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: 926f6102ed

ℹ️ 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: ccc1c063bc

ℹ️ 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: 15a55458d7

ℹ️ 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: 86c1e18f4b

ℹ️ 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: 43957367bb

ℹ️ 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: 3a478f74f6

ℹ️ 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: 715b7194da

ℹ️ 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: 1260146cb6

ℹ️ 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: f368bf1e2c

ℹ️ 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".

@ImLukeF
Copy link
Copy Markdown
Contributor Author

ImLukeF commented Mar 10, 2026

Superseded by split PRs:\n- #42313 (Opencode Go provider support)\n- #42314 (macOS model selector + thinking persistence)

@ImLukeF ImLukeF closed this Mar 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agents Agent runtime and tooling app: macos App: macos cli CLI command changes commands Command implementations docs Improvements or additions to documentation size: XL

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant