Skip to content

[Bug]: BYOK vision-capable model is incorrectly reported as not supporting vision #213

Closed

Description

@doggy8088

Product or interface

CLI - interactive TUI

Version

0.4.12-dev

Platform

macOS

OS version and architecture

macOS 26.6.2

Issue area

Model output quality

Desktop log upload ID (optional)

No response

Steps to reproduce

  1. Configure a BYOK provider in minimax-code and select a model deepseek-v4.1-flash that accepts image input (vision).
  2. Start a session with that model.
  3. Take screenshots and tell mcode to read it.
  4. minimax-code reports that the selected model does not support vision.

Environment details (please confirm or replace before submitting):

  • Provider type: Ollama Cloud
  • Model: deepseek-v4.1-flash:cloud
  • Permission mode: yolo
  • Command without keys: mcode-dev
  • Image input method: paste image

Expected and actual behavior

Expected: because the configured BYOK model accepts image input, minimax-code should forward the image to the model and process it as a vision request.

Actual: minimax-code reports that the configured model does not support vision and refuses the image input, even though the model itself is vision-capable.

Impact: vision workflows are unusable with BYOK vision models.

Notes: the vision capability check appears to rely on a hard-coded model list or provider metadata instead of the BYOK configuration, so models it does not recognise are treated as text-only.

Redacted error summary

Screenshots

Image 1:

Image

Image 2:

Image

Additional Information

I think there should be a way to configure how the model brought by BYOK sets its Vision capabilities, but I can't find a way to configure it. Is it just a matter of adjusting ~/.minimax/config.yaml?

Before submitting

  • I have searched existing issues.
  • I have included my version and removed sensitive information.

Activity

  1. smartworldarafath commented on Sep 19, 2026

    @smartworldarafath
    Contributor

    Hi @MiniMax-AI maintainers,

    I ran into this as well while testing BYOK vision models, investigated the issue, and put together a fix on my fork:

    What was happening

    1. In model-ref.ts, capabilitiesFromModelConfig was only checking modalities.input or capabilities.support_image === true. It wasn't picking up attachment: true, array-form modalities (e.g. ['text', 'image']), vision: true, or top-level flags.
    2. UserModelInputView and McodeProviderModelInput were missing the capabilities field, so capability metadata was getting dropped when saving or updating custom providers.
    3. local-model-resolver.ts wasn't checking catalogModel.input for image support.
    4. mcode provider add didn't have a --support-image flag for declaring vision support from the CLI.

    Changes

    • Updated capabilitiesFromModelConfig in model-ref.ts to recognize vision capabilities across all common formats (attachment: true, array modalities, vision: true, etc.).
    • Added capabilities to UserModelInputView and McodeProviderModelInput.
    • Preserved and merged capabilities and modalities properly in service-input.ts and service-helpers.ts.
    • Updated deriveModelInput in local-model-resolver.ts to check catalog model input modalities.
    • Added --support-image flag to mcode provider add.
    • Added unit tests in model-ref.test.ts, service-input.test.ts, and provider-application.test.ts.

    Testing

    • Vitest unit tests pass.
    • pnpm typecheck and pnpm build pass cleanly with no errors.
    • Verified source inventory and tsconfig paths (check:source, check:tsconfig).

    Since PRs are limited to collaborators according to CONTRIBUTING.md, could someone please take a look and cherry-pick the commit 6ec8ad084ea53dffc2786e6c9e931f2714b17306 or grant collaborator access?

    Thanks!

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

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions