Disambiguate OpenCode model dropdown labels by provider#1024
Open
yusufemreboyraz wants to merge 1 commit into
Open
Disambiguate OpenCode model dropdown labels by provider#1024yusufemreboyraz wants to merge 1 commit into
yusufemreboyraz wants to merge 1 commit into
Conversation
fetchModels() built the dropdown label from the model name alone, so models with identical names from different providers (e.g. deepseek-v4-pro via DeepSeek vs. via OpenRouter) were indistinguishable in the UI even though their ids were already unique. Fixes backnotprop#988
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fetchModels()inpackages/ai/providers/opencode-sdk.tsbuilt each model's dropdownlabelfrommodel.name ?? model.idalone.deepseek-v4-provia both DeepSeek and OpenRouter). Theidfield already disambiguates them (${provider.id}/${model.id}), but thelabelshown in the dropdown did not, so identical entries appeared side by side with no way to tell them apart.deepseek-v4-pro (DeepSeek)vs.deepseek-v4-pro (OpenRouter).Test plan
bun x tsc --noEmit -p packages/ai/tsconfig.json— clean.bun test packages/ai/ai.test.ts— 102/102 pass.bun test(full suite) — same pass/fail counts asmain(5 pre-existing failures unrelated to this change, caused by missing generated codegen files, reproduced identically onmainwithout this diff).Fixes #988