Skip to content
Discussion options

You must be logged in to vote

这条报错是路由能力声明的判定,不是模型本身调用失败 —— 所以「配置了 deepseek-flash」和「能不能读图」是两个开关,得分开看。

报错从哪来

packages/fs/tool-fs/src/read-image.ts:119-131:read_image 会解析当前会话的活动路由,要求该路由的 inputModalities 显式包含 image:

const routed = exec.agent?.session.requestHeader()?.config
const provider = routed?.provider ?? exec.agent?.options.provider
const model = routed?.model ?? exec.agent?.options.model
const active = await llm.resolveModelInfo(provider, model, exec.signal)
if (active.inputModalities === undefined || !active.inputModalities.includes('image')) {
  throw new Error(`cannot read "${requestedPath}" as an image: model "${model}" does not declare image input; …`)
}

对 deepseek-official 这条路由,inputModalities 来自适配器的目录条目(pack…

Replies: 3 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Ericple
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants