Skip to content

[Bug]: opencode-go vision-capable models cannot use image tool β€” missing MediaUnderstandingProviderΒ #70482

Closed

Description

@byungskers

πŸ› Bug Report (ν•œκ΅­μ–΄ μš”μ•½ μ•„λž˜)

Bug type

Behavior bug (incorrect output/state without crash)

Summary

Users subscribed to the OpenCode Go provider (via opencode-go) cannot use the image tool with vision-capable models (kimi-k2.6, minimax-m2.7, glm-5, mimo-v2-omni, qwen3.6-plus, etc.) even though these models support multimodal/vision capabilities through the OpenCode Go API.

ν•œκ΅­μ–΄ μš”μ•½: OpenCode Go ν”„λ‘œλ°”μ΄λ”λ₯Ό κ΅¬λ…ν•˜μ—¬ OpenClaw에 μ—°κ²°ν•œ μ‚¬μš©μžλ“€μ΄, ν•΄λ‹Ή ν”„λ‘œλ°”μ΄λ”μ˜ λ©€ν‹°λͺ¨λ‹¬/λΉ„μ „ λͺ¨λΈλ“€(kimi, minimax, glm, mimo, qwen λ“±)둜 이미지 뢄석 κΈ°λŠ₯을 μ‚¬μš©ν•  수 μ—†λŠ” λ²„κ·Έμž…λ‹ˆλ‹€.

Steps to reproduce

  1. Subscribe to OpenCode Go and configure agents.defaults.model.primary to a vision-capable model (e.g., opencode-go/kimi-k2.6)
  2. Do NOT set agents.defaults.imageModel
  3. Send an image to the agent
  4. Observe that the image tool is either missing or fails with No media-understanding provider registered for opencode-go

μž¬ν˜„ 방법: OpenCode Goλ₯Ό κ΅¬λ…ν•˜μ—¬ agents.defaults.model.primaryλ₯Ό opencode-go/kimi-k2.6 λ“±μœΌλ‘œ μ„€μ •ν•˜κ³ , imageModel은 μ„€μ •ν•˜μ§€ μ•Šμ€ 채 이미지λ₯Ό μ „μ†‘ν•˜λ©΄ 이미지 툴이 λ…ΈμΆœλ˜μ§€ μ•Šκ±°λ‚˜ "No media-understanding provider registered for opencode-go" μ—λŸ¬κ°€ λ°œμƒν•©λ‹ˆλ‹€.

Expected behavior

The image tool should work with opencode-go vision-capable models, analyzing the uploaded image using the same model.

κΈ°λŒ€ λ™μž‘: OpenCode Go ν”„λ‘œλ°”μ΄λ”μ˜ λΉ„μ „ λͺ¨λΈλ‘œ 이미지λ₯Ό 뢄석할 수 μžˆμ–΄μ•Ό ν•©λ‹ˆλ‹€.

Actual behavior

  • If no explicit imageModel is configured: createImageTool() returns null because resolveImageModelConfigForTool() cannot find a config-driven fallback for opencode-go
  • Even with PR fix(image): keep tool available for vision-capable runtime modelsΒ #62266's runtime fallback: the actual invocation may still fail because opencode-go has no registered MediaUnderstandingProvider

μ‹€μ œ λ™μž‘: imageModel 섀정이 μ—†μœΌλ©΄ createImageTool()이 null을 λ°˜ν™˜ν•˜κ³ , PR #62266의 λŸ°νƒ€μž„ fallback이 μ μš©λ˜μ–΄λ„ μ‹€μ œ μ‹€ν–‰ μ‹œ opencode-go에 λ“±λ‘λœ MediaUnderstandingProviderκ°€ μ—†μ–΄μ„œ μ‹€νŒ¨ν•©λ‹ˆλ‹€.

Verified Affected Models

The following opencode-go models are confirmed to show input: ["text"] only in the catalog, despite being vision-capable:

  • opencode-go/kimi-k2.6 (my current session model)
  • opencode-go/minimax-m2.7
  • opencode-go/glm-5
  • opencode-go/mimo-v2-omni
  • opencode-go/qwen3.6-plus

Note: opencode-go/glm-5.1 is not vision-capable and is not affected by this issue.

ν™•μΈλœ 영ν–₯ λͺ¨λΈ: μœ„ λͺ¨λΈλ“€μ€ μ‹€μ œλ‘œ λΉ„μ „ κΈ°λŠ₯을 μ§€μ›ν•˜μ§€λ§Œ, OpenClaw μΉ΄νƒˆλ‘œκ·Έμ—μ„œλŠ” input: ["text"]둜만 ν‘œμ‹œλ©λ‹ˆλ‹€. glm-5.1은 λΉ„μ „ κΈ°λŠ₯이 μ—†μ–΄ ν•΄λ‹Ήλ˜μ§€ μ•ŠμŠ΅λ‹ˆλ‹€.

Root Causes

  1. Missing MediaUnderstandingProvider registration: extensions/opencode-go/index.ts does not call api.registerMediaUnderstandingProvider(). Other providers like minimax and openai do register one.
  2. Missing image input capability in model catalog: Vision-capable models in the opencode-go catalog are listed with only input: ["text"] instead of input: ["text", "image"].

κ·Όλ³Έ 원인:

  1. extensions/opencode-go/index.ts에 api.registerMediaUnderstandingProvider() 호좜이 μ—†μŒ. minimax, openai λ“± λ‹€λ₯Έ ν”„λ‘œλ°”μ΄λ”λŠ” λ“±λ‘λ˜μ–΄ 있음.
  2. λͺ¨λΈ μΉ΄νƒˆλ‘œκ·Έμ—μ„œ λΉ„μ „ λͺ¨λΈλ“€μ΄ input: ["text"]둜만 ν‘œμ‹œλ¨. μ‹€μ œλ‘œλŠ” input: ["text", "image"]μ—¬μ•Ό 함.

Related Issues/PRs

κ΄€λ ¨ 이슈: #61789(μœ μ‚¬ν•œ λŸ°νƒ€μž„ 이슈), #62266(Greptile이 opencode-go의 λ™μΌν•œ provider λˆ„λ½ 지적), #53093(κ³Όκ±° νšŒκ·€)

OpenClaw version

2026.4.21

Operating system

macOS (but affects all platforms)

Model

opencode-go/kimi-k2.6, opencode-go/minimax-m2.7, opencode-go/glm-5, opencode-go/mimo-v2-omni, opencode-go/qwen3.6-plus

Provider / routing chain

OpenClaw β†’ opencode-go provider β†’ OpenCode Go API

Suggested Fix

  1. Add media-understanding-provider.ts to extensions/opencode-go/ following the OpenAI-compatible pattern (OpenCode Go API is OpenAI-compatible)
  2. Register it in extensions/opencode-go/index.ts
  3. Update opencode-go model catalog to mark vision-capable models with input: ["text", "image"]

μ œμ•ˆν•˜λŠ” μˆ˜μ •:

  1. extensions/opencode-go/에 media-understanding-provider.ts μΆ”κ°€ (OpenAI-compatible νŒ¨ν„΄ μ‚¬μš©, OpenCode Go APIλŠ” OpenAI-compatible)
  2. extensions/opencode-go/index.tsμ—μ„œ 등둝
  3. λΉ„μ „ λͺ¨λΈλ“€μ˜ μΉ΄νƒˆλ‘œκ·Έλ₯Ό input: ["text", "image"]둜 μ—…λ°μ΄νŠΈ

Activity

  1. added a commit that references this issue on Apr 23, 2026
    b438d08
  2. steipete commented on Apr 25, 2026

    @steipete
    Contributor

    Fixed on main in 7e52223.

    What changed:

    • opencode-go now registers a plugin-owned media-understanding image provider.
    • The opencode-go manifest now declares media-understanding metadata, so image-tool resolution can find the Go catalog image default before runtime provider load.
    • The Go image default is opencode-go/kimi-k2.5, which the current Pi catalog marks as input: ["text", "image"].
    • I also added the same manifest metadata for opencode, covering the older provider-alias image-tool gap.

    Verification:

    • pnpm test extensions/opencode/index.test.ts extensions/opencode/media-understanding-provider.test.ts extensions/opencode/plugin-registration.contract.test.ts extensions/opencode-go/index.test.ts extensions/opencode-go/media-understanding-provider.test.ts extensions/opencode-go/plugin-registration.contract.test.ts src/media-understanding/defaults.test.ts src/agents/tools/image-tool.test.ts
    • pnpm check:changed
    • Live smoke with ~/.profile OpenCode auth: opencode-go/kimi-k2.5 accepted a generated PNG image payload through OpenCode Go and returned text (Red).

    One note: current Pi metadata already marks several Go models (kimi-k2.5, kimi-k2.6, mimo-v2-omni, qwen3.5-plus, qwen3.6-plus) as image-capable. minimax-m2.7 is still text-only in Pi metadata, so the image tool pairs Go sessions to the plugin default instead of assuming every Go model is vision-capable.

  3. locked as resolved and limited conversation to collaborators on Apr 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    Priority

    None yet

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions