Skip to content

fix: disambiguate VS Code vision models#161

Merged
Vizards merged 1 commit into
mainfrom
fix/vision-provider-collision
Jun 16, 2026
Merged

fix: disambiguate VS Code vision models#161
Vizards merged 1 commit into
mainfrom
fix/vision-provider-collision

Conversation

@Vizards

@Vizards Vizards commented Jun 15, 2026

Copy link
Copy Markdown
Owner

Summary

  • store VS Code vision model selections as provider-qualified vendor/id keys
  • filter unsupported Claude Code/Copilot CLI vision candidates from the proxy picker
  • keep legacy bare model IDs readable, including IDs that contain /

Fixes #149

Validation

  • npm run format:check
  • npm run compile
  • node .vscode-test/vision-provider-collision.test.js
  • git diff --check

Copilot AI 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.

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 targetChatSessionType metadata.

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.

@Vizards Vizards merged commit 1d7b668 into main Jun 16, 2026
2 checks passed
@Vizards Vizards deleted the fix/vision-provider-collision branch June 16, 2026 03:21
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.

视觉代理返回了空响应 [EMPTY_RESPONSE]

2 participants