{"record":{"id":"96f626a92f728067","repo":"deepseek-ai/deepseek-harness","slug":"model-model-does-not-declare-image-input","errorCode":null,"errorMessage":"model \"${model}\" does not declare image input","messagePattern":"model \"(.+?)\" does not declare image input","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"packages/mcp/mcp-client/src/tools.ts","lineNumber":416,"sourceCode":" */\nasync function resolveImageAdmission(ctx: Context, exec: ToolExecution): Promise<AttachmentStore> {\n  const attachments = ctx.get('attachments')\n  if (attachments === undefined) throw new Error('no attachment store is mounted')\n  const routed = exec.agent?.session.requestHeader()?.config\n  const provider = routed?.provider ?? exec.agent?.options.provider\n  const model = routed?.model ?? exec.agent?.options.model\n  const llm = ctx.get('llm')\n  if (provider === undefined || model === undefined || llm === undefined) {\n    throw new Error('the current model route could not be resolved')\n  }\n  let info: Awaited<ReturnType<typeof llm.resolveModelInfo>>\n  try {\n    info = await llm.resolveModelInfo(provider, model, exec.signal)\n  } catch {\n    throw new Error('the current model route could not be verified')\n  }\n  if (info.inputModalities === undefined || !info.inputModalities.includes('image')) {\n    throw new Error(`model \"${model}\" does not declare image input`)\n  }\n  if (exec.signal.aborted) throw new Error('the tool call was canceled before image storage')\n  return attachments\n}\n\n/** Stable diagnostic text for an image block that was not admitted. */\nfunction imageDiagnostic(block: McpContentBlock, reason: string): string {\n  const mediaType = block.mimeType ?? 'unknown media type'\n  return `[image unavailable: ${mediaType}; ${reason}; raw image data remains available to programmatic callers]`\n}\n\n/**\n * Decode, preflight, and durably save one MCP result's ordered image batch.\n * Any refusal projects every image as text while retaining the canonical raw\n * value for programmatic callers.\n */\nasync function prepareImageProjection(\n  ctx: Context,","sourceCodeStart":398,"sourceCodeEnd":434,"githubUrl":"https://github.com/deepseek-ai/deepseek-harness/blob/b150a551b8d465e31e418e1b2eaf5e79bbb7d28e/packages/mcp/mcp-client/src/tools.ts#L398-L434","documentation":"Image-admission failure: the resolved model \"model\" does not declare image input capability in the LLM registry. Images from MCP results are only stored when the active model can actually consume them on the next request; the throw prevents an unusable attachment.","triggerScenarios":"Thrown at packages/mcp/mcp-client/src/tools.ts:416 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Remove the image, or switch to a model that declares image input."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b150a551b8d465e31e418e1b2eaf5e79bbb7d28e","analyzedAt":"2026-08-24T18:12:29.105Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}