Skip to content

Subagent with vision-capable model fails to analyze images #34409

Description

@qiqingli

Description

An image-analyst subagent was configured using moonshotai/kimi-k2.6 (a multimodal model). Switching to this model in the main session works fine for image analysis. However, when called via subagent, it returns: "the currently running model does not support directly reading image files."
Steps to reproduce:

Environment:

  • macOS
  • opencode 1.17.11

Plugins

No response

OpenCode version

opencode 1.17.11

Steps to reproduce

  1. Configure a vision-capable model in opencode.json:
    "moonshotai/kimi-k2.6": {
    "name": "kimi-k2.6",
    "attachment": true,
    "modalities": {
    "input": ["text", "image"],
    "output": ["text"]
    }
    }
  2. Create subagent config at ~/.config/opencode/agents/image-analyst.md:

description: Image recognition and visual analysis agent
mode: subagent
model: Nvidia/moonshotai/kimi-k2.6
temperature: 0.1
tools:
write: false
edit: false
bash: false

  1. Invoke the image-analyst subagent with an image file
  2. The subagent responds that the current model does not support image input
    Expected behavior: The subagent should receive and analyze the image, just as the main session does when switched to kimi-k2.6.
    Actual behavior: The subagent reports that the model does not support image input.

Additional verification:
Directly calling the Nvidia API (kimi-k2.6 model) via curl successfully analyzes the image, confirming there is no issue at the API level. The problem lies in opencode's subagent mechanism, which fails to pass image attachments to the subagent's model.

Screenshot and/or share link

No response

Operating System

macOS 13.7.8

Terminal

iTerm2

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions