Skip to content

[FEATURE]: Auto image-to-text transcription via multimodal model for non-multimodal providers #22828

Closed as not planned

Description

@RoyougiShiki
  • I have searched for existing issues and confirmed this is not a duplicate
  • I have read the contributing guidelines

Problem

When using a non-multimodal LLM provider (e.g., text-only models) in OpenCode, sending an image attachment results in the model being unable to understand or process the image. There is no automatic fallback mechanism to:

  1. Detect that the current model does not support image input
  2. Automatically route the image to a configured multimodal model for transcription
  3. Convert the image content to text description
  4. Pass the text description to the primary non-multimodal model

Current Behavior

  • User sends an image in the conversation
  • If the active model does not support image/vision input, the image is either ignored or causes an error
  • No automatic image transcription fallback exists

Expected Behavior

When a non-multimodal model receives an image, OpenCode should:

  1. Detect the model's modalities do not include image input
  2. Use a separately configured image caption model (multimodal model) to describe the image
  3. Replace the image with the text description in the context
  4. Continue the conversation with the primary model using the transcribed text

Suggested Configuration

Add a new top-level config option in opencode.json:

{
  "image_transcription_model": "dmxapi/glm-4.1v-thinking-flash"
}

Or within the provider's model definition, allow marking a model as the image transcription provider:

{
  "provider": {
    "dmxapi": {
      "models": {
        "glm-5.1": {
          "name": "glm-5.1"
        },
        "glm-4.1v-thinking-flash": {
          "name": "glm-4.1v-thinking-flash",
          "modalities": {
            "input": ["text", "image"],
            "output": ["text"]
          },
          "use_for_image_transcription": true
        }
      }
    }
  }
}

Related Issues

Unlike those previous requests, this proposal includes a concrete configuration design and leverages the existing modalities field already in the schema, making it straightforward to implement.

Use Case

Many users use cost-effective text-only models as their primary coding assistant, but still need image understanding (e.g., reading screenshots, diagrams, UI mockups). Having to manually switch models for image-related tasks is inconvenient. An automatic image transcription pipeline would provide the best of both worlds.

Environment

  • OpenCode version: latest (via npm)
  • OS: Windows
  • Primary model: text-only (via OpenAI-compatible provider)
  • Available multimodal model: GLM-4.1V-Thinking-Flash (via same provider)

Activity

  1. github-actions commented on Apr 16, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • The title should start with [FEATURE]: (e.g., [FEATURE]: Auto image-to-text transcription via multimodal model for non-multimodal providers)
    • Feature request issues require a verification checkbox confirming you've searched for existing issues and read the contributing guidelines

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


    This issue might be a duplicate of existing issues. Please check:

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. added
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on Apr 16, 2026
  3. changed the title [-]Feature Request: Auto image-to-text transcription via multimodal model for non-multimodal providers[/-] [+][FEATURE]: Auto image-to-text transcription via multimodal model for non-multimodal providers[/+] on Apr 16, 2026
  4. github-actions commented on Apr 16, 2026

    @github-actions
    Contributor

    Thanks for updating the issue! It now follows the contributing guidelines and feature request template. We appreciate you taking the time to make it compliant.

  5. removed
    coreAnything pertaining to core functionality of the application (opencode server stuff)
    on May 3, 2026
  6. github-actions commented on Jul 3, 2026

    @github-actions
    Contributor

    To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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