can1357/oh-my-pi · error · ToolError

Resolved model ${textOnly.provider}/${textOnly.id} does not

Error message

Resolved model ${textOnly.provider}/${textOnly.id} does not support image input. Configure a vision-capable model for modelRoles.vision.

What it means

inspect_image resolved a model through @vision/@default/active-model patterns, but that model's declared input modalities do not include "image" — it is text-only. The tool refuses to send the image and tells you to configure a vision-capable model under modelRoles.vision.

Source

Thrown at packages/coding-agent/src/tools/inspect-image.ts:196

		let model: Model<Api> | undefined;
		let selectedPattern: string | undefined;
		for (const pattern of ["@vision", "@default", activeModelPattern]) {
			const resolved = resolvePattern(pattern);
			if (resolved?.input.includes("image")) {
				model = resolved;
				selectedPattern = pattern;
				break;
			}
		}
		const activeProvider = resolvePattern(activeModelPattern)?.provider;
		model ??= availableModels.find(
			candidate => candidate.provider === activeProvider && candidate.input.includes("image"),
		);
		model ??= availableModels.find(candidate => candidate.input.includes("image"));
		if (!model) {
			const textOnly = resolvePattern("@vision") ?? resolvePattern("@default") ?? resolvePattern(activeModelPattern);
			if (!textOnly) throw new ToolError("Unable to resolve a model for inspect_image.");
			throw new ToolError(
				`Resolved model ${textOnly.provider}/${textOnly.id} does not support image input. Configure a vision-capable model for modelRoles.vision.`,
			);
		}

		const apiKey = await modelRegistry.getApiKey(model);
		if (!apiKey) {
			throw new ToolError(
				`No API key available for ${model.provider}/${model.id}. Configure credentials for this provider or choose another vision-capable model.`,
			);
		}

		let imageInput: LoadedImageInput | null;
		const autoResize = this.session.settings.get("images.autoResize");
		const excludeWebP = webpExclusionForModel(model);
		const attachmentReference = parseImageAttachmentReference(params.path);
		const imageTarget = attachmentReference
			? undefined
			: await splitPathAndSelPreferringLiteral(params.path, this.session.cwd);

View on GitHub (pinned to 9690622007)

Solutions

  1. Set modelRoles.vision to a model known to support image input (e.g. openai/gpt-4o, anthropic/claude-...-vision-capable, google/gemini-*).
  2. Verify the chosen model's input modalities include "image" in the catalog/discovery output.
  3. If a vision model exists but isn't detected, fix/refresh provider discovery or the model metadata rather than the role.
  4. Register/connect a multimodal provider if none is available.

Example fix

// before
{ "modelRoles": { "vision": "openai/gpt-3.5-turbo" } }
// after
{ "modelRoles": { "vision": "openai/gpt-4o" } }
Defensive patterns

Strategy: validation

Validate before calling

const vision = session.modelRegistry.getAvailable().find(m => m.input.includes("image"));
if (!vision) {
  // no vision-capable model registered: configure one or skip image inspection
}

Type guard

function isVisionCapable(m: Model<Api>): boolean {
  return Array.isArray(m.input) && m.input.includes("image");
}

Try / catch

try {
  await inspectImageTool.execute(id, params, signal);
} catch (e) {
  if (e instanceof ToolError && e.message.includes("does not support image input")) {
    // reconfigure modelRoles.vision to a multimodal model
  } else throw e;
}

Prevention

When it happens

Trigger: modelRoles.vision (or @default / the active model) resolves to a text-only model, and no other available model advertises image input (the fallback scans all availableModels for input.includes("image") and found none).

Common situations: Pointing modelRoles.vision at a text-only model (e.g. a code model without vision); using a provider whose models.json metadata omits the image modality; running a small/local model roster with no multimodal model.

Related errors


AI-assisted analysis of can1357/oh-my-pi@9690622007 (2026-08-31). Data as JSON: /api/errors/450b38df6788f5d1. Report an issue: GitHub.