fix: disambiguate VS Code vision models#161
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
This PR resolves VS Code “vision model” selection collisions by storing the selected vision model as a provider-qualified vendor/id key (while still accepting legacy bare IDs), and by filtering out known unsupported Claude Code / Copilot CLI vision candidates so the proxy picker doesn’t offer unusable choices.
Changes:
- Store and propagate the selected VS Code vision model as
lmModelKey(vendor/id) end-to-end (UI state, webview payload, config save/load). - Add VS Code model key parsing/normalization to keep legacy bare IDs (including IDs containing
/) readable and migratable. - Centralize vision-related logging and extend model filtering using vendor + best-effort
targetChatSessionTypemetadata.
Reviewed changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/provider/vision/ui/script.ts | Switches webview script from lmModelId to provider-qualified lmModelKey handling. |
| src/provider/vision/ui/panel.ts | Updates panel state/payload plumbing and config save path to use lmModelKey, and routes logging through new vision logger helpers. |
| src/provider/vision/ui/html.ts | Renames the LM select element/id to lmModelKey to match the new payload shape. |
| src/provider/vision/types.ts | Adds key to VisionLanguageModelOption so UI/options can carry provider-qualified identifiers. |
| src/provider/vision/sources/vscode/model.ts | Adds best-effort accessor for proposed targetChatSessionType metadata. |
| src/provider/vision/sources/vscode/index.ts | Implements vendor/id key generation, legacy-compatible parsing, model filtering, and key-based selection/save logic. |
| src/provider/vision/sources/endpoint/test.ts | Moves test logging into centralized vision log helpers. |
| src/provider/vision/service.ts | Routes vision proxy selection/config error logging through the new vision log module. |
| src/provider/vision/resolve.ts | Uses centralized logging for “unavailable” and “describe failed” paths. |
| src/provider/vision/log.ts | New central logging helpers for vision proxy selection, failures, and test diagnostics. |
| README.md | Documents deepseek-copilot.visionModel now saving vendor/id while still reading legacy bare IDs. |
| README.zh-cn.md | Same documentation update (Chinese). |
| package.nls.json | Updates setting description to reflect vendor/id storage + legacy compatibility. |
| package.nls.zh-cn.json | Same setting description update (Chinese). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Fixes #149
Validation