Skip to content

feat(opencode): declare model input modalities in the system prompt - #59446

Open
luochen1990 wants to merge 1 commit into
anomalyco:v1from
luochen1990:system-prompt-modalities
Open

luochen1990 wants to merge 1 commit into
anomalyco:v1from
luochen1990:system-prompt-modalities

Conversation

@luochen1990

@luochen1990 luochen1990 commented Oct 27, 2026 •

Copy link
Copy Markdown
Contributor

Issue for this PR

Feature PR, no existing issue.

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The system prompt tells the model its name and ID, but never which input modalities it accepts. A multimodal model has no way to learn that it can read images in this session, and a text-only model only finds out by trying and failing. This adds one line next to the model identity listing the enabled capabilities.input entries (reads none when nothing is enabled), so capability info travels with the identity info.

How did you verify your code works?

  • bun run typecheck in packages/opencode
  • this exact change has been running in a downstream v1-based build since August, across multimodal and text-only models

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

This branch has not been deployed

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant