Skip to content

fix: disambiguate colliding builtin model ids in configOptions - #175

Merged
william0wang merged 2 commits into
william0wang:mainfrom
alon-gb:fix/unique-builtin-model-options
Sep 11, 2026
Merged

fix: disambiguate colliding builtin model ids in configOptions#175
william0wang merged 2 commits into
william0wang:mainfrom
alon-gb:fix/unique-builtin-model-options

Conversation

@alon-gb

@alon-gb alon-gb commented Sep 10, 2026

Copy link
Copy Markdown
Contributor

Summary

session/new advertised duplicate model configOption values when two enabled builtin coding plans shipped the same GLM ids.

formatModelValue encodes builtins as the bare modelId so the dropdown stays clean. That collides when both builtin:zai-coding-plan and builtin:zai-start-plan are enabled — both list GLM-5.3 and GLM-5.3-Flash. ACP clients that key on uniqueness (Paseo Command Center: Duplicate Command Center contribution id: …:models:zcode:GLM-5.3) then refuse to start.

Colliding builtins now use the same providerId\modelId encoding already used for third-party models, so both plans stay selectable. A single builtin is still the bare modelId.

Test plan

  • pnpm exec vitest run tests/model-select-options.test.ts — fails before the fix (duplicate GLM-5.3), passes after
  • pnpm typecheck && pnpm lint && pnpm test (1141 tests)
  • Live session/new against a machine with both Z.ai coding plans enabled returns four unique model values:
builtin:zai-coding-plan\GLM-5.3
builtin:zai-coding-plan\GLM-5.3-Flash
builtin:zai-start-plan\GLM-5.3
builtin:zai-start-plan\GLM-5.3-Flash

Two enabled builtin coding plans (Z.ai Coding Plan + Start Plan) both
ship GLM-5.3. Bare modelId encoding advertised the same value twice,
which crashes ACP clients that key on uniqueness (Paseo Command Center).
Prefix colliding builtins the same way third-party models already are.
Collision-only prefixes advertised different id shapes depending on
how many builtin coding plans were enabled. Builtins now use the same
encoding as third-party models. Legacy bare modelIds still parse as
the first enabled builtin.
@william0wang
william0wang merged commit c1bb059 into william0wang:main Sep 11, 2026
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.

2 participants