Skip to content

fix: custom 渠道视觉助手误匹配同名文本模型 - #1677

Closed
aixuxing wants to merge 4 commits into
proma-ai:mainfrom
aixuxing:fix/vision-relay-custom-channel-trust-config
Closed

fix: custom 渠道视觉助手误匹配同名文本模型#1677
aixuxing wants to merge 4 commits into
proma-ai:mainfrom
aixuxing:fix/vision-relay-custom-channel-trust-config

Conversation

@aixuxing

Copy link
Copy Markdown
Contributor

问题

当视觉助手配置的渠道为 custom 时,resolvePiVisionRelayRoute 会退回全 Pi catalog 按 modelId(再按 name 兜底)匹配。由于 custom 没有专属 catalog provider,会遍历所有 provider,同名不同源的纯文本模型(如 HuggingFace 的 MiMo-V2.5)会抢在视觉版之前命中,导致 input 不含 image,最终误报"不支持图片输入"。

修复

custom 渠道的视觉能力由用户在视觉助手配置中显式声明(channelId + modelId)。这里直接信任用户配置,对 provider === 'custom' 提前返回 { adapterProvider: provider },不再退回全 catalog 按模型名兜底匹配。

若用户配置了非多模态模型,上游调用会失败,现有错误处理会返回 VISION_PROVIDER_ERROR 并携带具体原因。

改动

  • apps/electron/src/main/lib/adapters/pi-model-registry.ts:custom 视觉路由提前返回,信任用户配置

@aixuxing aixuxing changed the title fix: custom 渠道视觉助手误匹配同名文本模型Fix/vision relay custom channel trust config fix: custom 渠道视觉助手误匹配同名文本模型 Aug 15, 2026
@aixuxing aixuxing closed this Aug 17, 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.

1 participant