Skip to content

feat(models): enable vision for Kimi K3 - #34

Merged
marcusolsson merged 1 commit into
mainfrom
feat/kimi-k3-vision
Aug 3, 2026
Merged

feat(models): enable vision for Kimi K3#34
marcusolsson merged 1 commit into
mainfrom
feat/kimi-k3-vision

Conversation

@bergetbjork

Copy link
Copy Markdown
Contributor

Summary

Add moonshotai/Kimi-K3 to VISION_MODELS so OpenCode enables image attachments for it.

Why

The plugin fetches chat models from /v1/models/chat and enables vision (attachment: true + modalities.input: ['text','image']) only for IDs listed in the hardcoded VISION_MODELS set. Kimi K3 is a multimodal model (vision: true in the inference-api catalog) and is now live in prod, but it was missing from this set — so OpenCode treated it as text-only and rejected image input.

Change

One line: add "moonshotai/Kimi-K3" alongside "moonshotai/Kimi-K2.6".

Test

  • tsc --noEmit
  • vitest run → 57 passed ✅
  • eslint/prettier via pre-commit ✅

Note

VISION_MODELS is a hardcoded allowlist that doesn't reflect the vision flag already returned by /v1/models. A future improvement could make this data-driven (read capabilities.vision from the API) so new vision models don't need a plugin release. Out of scope here.

Kimi K3 supports image input but was missing from VISION_MODELS, so the
plugin did not set attachment/modalities and OpenCode treated it as
text-only. Add moonshotai/Kimi-K3 so image attachments work, matching
Kimi K2.6.
@marcusolsson
marcusolsson merged commit 465e894 into main Aug 3, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants