Repository navigation
read_image refuses on vision-capable models whose image input is not declared — refusal should point at the fix #6049
ffournierm
started this conversation in
Ideas
Replies: 1 comment 1 reply
|
@ffournierm 你这篇把"声明面 vs 能力面"的裂缝又推到一处新的可操作位置—— 源级确认
三个请求 + 一个插件可挂载面观察
判别:这是 inputModalities 家族第 6 成员, |
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Version
@deepseek-ai/dsh0.1.2-rc.1 (global npm install)What happened
A real agent session needed to read a page of a scanned PDF (a French PLU zoning regulation, raster-only, no text layer). It rasterized the page to PNG and called
read_image:GLM 5.3 Flash is image-input-capable on its OpenAI-compatible endpoint — the refusal was about the declaration, not the model. The agent then pip-installed
rapidocr-onnxruntime+pymupdfinto a scratch venv and OCR'd the page locally to get text into context — work a supportedread_imagecall would have made unnecessary.Root cause
read_image's capability gate (assertImageCapableRoute,dsh-tool-fs) requires the resolved route to explicitly declare image input. Modality resolution for a custom-provider model falls through:input:on the provider'smodelsentry,defaultInput,DEFAULT_INPUT = ["text"].Two gaps:
glm-5.3-flashonly under providerzai, declared"input": ["text"]— nofriendlientry, and no image modality anywhere in the GLM family. (Theopenai-completionstransport itself carries image parts fine — see verification below.)input: [text, image]to the model entry in settings resolves it, but nothing points there: the refusal message says "switch to an image-capable model", the settings templates don't mention theinputfield, and the tool description ("Requires the current model to accept image input") reads as a model property, not a configuration one.Verified workaround
Headless run after the change:
read_imageon a 1×1 PNG returned the image block, and the model correctly reported the rendered pixel color (r=0, g=255, b=0, a=127). Same harness, same model, one line of config.Requests
...does not declare image input; if this model accepts images, declare "input: [text, image]" on its models entry. The current message sends users model-shopping when the model is fine.zai.json(and any friendli coverage) should carry"input": ["text", "image"].modelsschema acceptsinput: [text, image]— worth one line wherever custom providers are documented, plus a mention inread_image's tool description.Happy to file the pi-ai catalog piece wherever that data lives upstream if this isn't the right home for item 2.
All reactions