Skip to content

Fix desktop model switcher provider scope merge / 修复桌面模型切换器配置作用域合并#4492

Merged
esengine merged 3 commits into
esengine:main-v2from
SivanCola:fix/desktop-model-switcher-provider-merge
Jun 16, 2026
Merged

Fix desktop model switcher provider scope merge / 修复桌面模型切换器配置作用域合并#4492
esengine merged 3 commits into
esengine:main-v2from
SivanCola:fix/desktop-model-switcher-provider-merge

Conversation

@SivanCola

Copy link
Copy Markdown
Collaborator

Summary

  • Merge [[providers]] across user and project TOML sources by provider name, matching the existing plugin merge behavior.
  • Merge desktop provider_access across config scopes so project desktop settings do not hide account-level providers from the chat model switcher.
  • Add a regression test for a workspace project config that previously hid user-configured MiniMax models.

Fixes #4486.

Verification

  • go test ./internal/config
  • go test ./internal/config ./internal/control ./internal/boot with isolated user config
  • go test . in the desktop module

@SivanCola SivanCola requested a review from esengine as a code owner June 15, 2026 08:37
@github-actions github-actions Bot added v2 Go rewrite (1.x) — main-v2 branch, active development desktop Wails desktop app (desktop/**) config Configuration & setup (internal/config) labels Jun 15, 2026
@SivanCola SivanCola enabled auto-merge June 15, 2026 08:39

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

Copy link
Copy Markdown

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: 7f42e6b241

ℹ️ About Codex in GitHub

Your team has set up Codex to 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 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread internal/config/config.go Outdated
Comment thread internal/config/config.go Outdated
@SivanCola

Copy link
Copy Markdown
Collaborator Author

Follow-up pushed in 33cf89d2 to fix the CI failures from the provider merge follow-up.

Root cause:

  • The previous follow-up merged official provider aliases by canonical Settings ID, which collapsed distinct legacy providers such as deepseek-flash and deepseek-pro into one entry.
  • That broke legacy model refs and effort capability lookup, causing the failing internal/boot, internal/cli, and internal/control tests.

Fix:

  • Merge provider tables by provider name again, keeping official legacy aliases distinct.
  • Keep the project-render scoping behavior so merged user providers are not written back into project config files.

Verified locally:

  • go test ./internal/boot -run TestBuildMigratesLegacyConfigEndToEnd -count=1
  • go test ./internal/cli -run TestEffortCommandAutoClearsProviderEffort -count=1
  • go test ./internal/control -run TestSlashArgItems -count=1
  • go test ./internal/config -run 'TestLoadForRootKeepsOfficialProviderAliasesDistinct|TestSaveForRootDoesNotWriteUserProvidersIntoProjectConfig' -count=1
  • go test ./internal/config ./internal/boot ./internal/cli ./internal/control with isolated user config
  • go test -race ./internal/boot ./internal/cli ./internal/control with isolated user config
  • go test . in the desktop module

GitHub CI is now green on the updated head.

@esengine esengine merged commit 4b7d984 into esengine:main-v2 Jun 16, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

config Configuration & setup (internal/config) desktop Wails desktop app (desktop/**) v2 Go rewrite (1.x) — main-v2 branch, active development

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: desktop无法切换model

2 participants