Skip to content

feat(web): add language model inputModalities capability plumbing#1372

Draft
whoisthey wants to merge 2 commits into
mainfrom
whoisthey/language-model-input-modalities
Draft

feat(web): add language model inputModalities capability plumbing#1372
whoisthey wants to merge 2 commits into
mainfrom
whoisthey/language-model-input-modalities

Conversation

@whoisthey

@whoisthey whoisthey commented Jun 26, 2026

Copy link
Copy Markdown

Lays the groundwork for chat file attachments by teaching Sourcebot which input modalities a configured language model can accept.

  • Adds an optional inputModalities declaration (text | image | pdf) to every provider definition in schemas/v3/languageModel.json, and regenerates the schema types/snippets.
  • Adds a fail-closed resolveModelInputModalities resolver (packages/web/src/features/chat/modelCapabilities.ts): when a model does not declare its input modalities, it is treated as text-only.
  • Exposes the resolved inputModalities on the client-safe LanguageModelInfo (populated via getConfiguredLanguageModelsInfo and the MCP ask path).

This is pure capability plumbing. It adds no attachment UI and no live provider capability probing (both are future work; see the tryResolveAnthropicThinkingConfig precedent in llm.server.ts).

Add an optional `inputModalities` declaration to language model config and
expose a resolved capability set to the client.

- Schema: add optional `inputModalities` (`text` | `image` | `pdf`) to every
  provider definition in `schemas/v3/languageModel.json` and regenerate the
  schema types/snippets.
- Add a fail-closed `resolveModelInputModalities` resolver that defaults to
  text-only when a model does not declare its input modalities.
- Expose the resolved `inputModalities` on the client-safe `LanguageModelInfo`
  (populated via `getConfiguredLanguageModelsInfo` and the MCP ask path).

This is groundwork for chat file attachments. It adds no attachment UI and no
live provider capability probing yet.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Draft detected.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: aca24ac5-7808-4ea5-82b1-3967216e9832

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch whoisthey/language-model-input-modalities

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-authored-by: Cursor <cursoragent@cursor.com>
@mintlify

mintlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
sourcebot 🟢 Ready View Preview Jun 26, 2026, 4:07 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

@mintlify

mintlify Bot commented Jun 26, 2026

Copy link
Copy Markdown

Preview deployment for your docs. Learn more about Mintlify Previews.

Project Status Preview Updated (UTC)
sourcebot 🟡 Building Jun 26, 2026, 3:58 AM

💡 Tip: Enable Workflows to automatically generate PRs for you.

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.

1 participant