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
feat(web): add language model inputModalities capability plumbing
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>
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
* Optional temperature setting to use with the model.
1216
1252
*/
1217
1253
temperature?: number;
1254
+
/**
1255
+
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
1256
+
*/
1257
+
inputModalities?: ("text"|"image"|"pdf")[];
1218
1258
}
1219
1259
/**
1220
1260
* Optional query parameters to include in the request url.
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
* Optional list of input modalities this model can accept. Used to gate non-text chat attachments. When omitted, the model is treated as text-only (fail-closed).
0 commit comments