fix(llm-pi-ai): accept inputModalities as alias for per-model input - #679
Open
sy121718 wants to merge 1 commit into
Open
fix(llm-pi-ai): accept inputModalities as alias for per-model input#679sy121718 wants to merge 1 commit into
sy121718 wants to merge 1 commit into
Conversation
The model-catalog layer advertises per-model input modalities under the key `inputModalities` (see dsh-host-apiproxy-model-modalities patch), but dsh-llm-pi-ai only reads `input`. A profile declaring vision via `inputModalities` is therefore silently ignored, the route falls back to the default text-only modality set, and image attachments are rejected at send time with MODEL_DOES_NOT_SUPPORT_IMAGES. - schema: declare optional `inputModalities` array alongside `input` (now defaulted to [] so absent arrays defer to catalog/route defaults) - consumer chain: entry.input ?? entry.inputModalities ?? base.input ?? base.inputModalities ?? request.defaultInput, preserving native-field precedence and existing fallback order - register yarn patch resolutions for @deepseek-ai/dsh-llm-pi-ai@0.1.1-rc.2 Verified with node --check plus a runtime smoke test driving resolveProfiles() directly: - inputModalities-only -> ["text","image"] (alias absorbed) - omitted -> ["text"] (defaultInput fallback intact) - both present -> native `input` wins
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.
为什么
桌面端模型目录(配合
dsh-host-apiproxy-model-modalities补丁)对外输出的字段名是inputModalities,但dsh-llm-pi-ai解析 per-model 配置时只读input。于是用户在 settings 里声明
inputModalities: [text, image]会被静默忽略,回落为默认的
["text"],发送图片时触发:改了什么
input改为.default([]),新增同类型的inputModalities字段作为别名entry.input ?? entry.inputModalities ?? base.input ?? base.inputModalities ?? defaultInput@deepseek-ai/dsh-llm-pi-ai@0.1.1-rc.2的 yarn patch resolution优先级保持:原生
input> 别名inputModalities> 目录base.input> 目录别名 > 路由默认。验证
用
resolveProfiles()直接驱动真实管线做了冒烟测试:inputModalities: [text,image]input == ["text","image"]✅input == ["text"](回落默认) ✅input与inputModalities同时写input优先 ✅node --check语法校验通过。