You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: BYOK vision-capable model is incorrectly reported as not supporting vision #213
Configure a BYOK provider in minimax-code and select a model deepseek-v4.1-flash that accepts image input (vision).
Start a session with that model.
Take screenshots and tell mcode to read it.
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 2:
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.
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.
UserModelInputView and McodeProviderModelInput were missing the capabilities field, so capability metadata was getting dropped when saving or updating custom providers.
local-model-resolver.ts wasn't checking catalogModel.input for image support.
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?
Activity
smartworldarafath commentedon Sep 19, 2026
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:
fix/byok-vision-model-support6ec8ad084ea53dffc2786e6c9e931f2714b17306What was happening
model-ref.ts,capabilitiesFromModelConfigwas only checkingmodalities.inputorcapabilities.support_image === true. It wasn't picking upattachment: true, array-form modalities (e.g.['text', 'image']),vision: true, or top-level flags.UserModelInputViewandMcodeProviderModelInputwere missing thecapabilitiesfield, so capability metadata was getting dropped when saving or updating custom providers.local-model-resolver.tswasn't checkingcatalogModel.inputfor image support.mcode provider adddidn't have a--support-imageflag for declaring vision support from the CLI.Changes
capabilitiesFromModelConfiginmodel-ref.tsto recognize vision capabilities across all common formats (attachment: true, array modalities,vision: true, etc.).capabilitiestoUserModelInputViewandMcodeProviderModelInput.service-input.tsandservice-helpers.ts.deriveModelInputinlocal-model-resolver.tsto check catalog model input modalities.--support-imageflag tomcode provider add.model-ref.test.ts,service-input.test.ts, andprovider-application.test.ts.Testing
pnpm typecheckandpnpm buildpass cleanly with no errors.check:source,check:tsconfig).Since PRs are limited to collaborators according to
CONTRIBUTING.md, could someone please take a look and cherry-pick the commit6ec8ad084ea53dffc2786e6c9e931f2714b17306or grant collaborator access?Thanks!