Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions docs/protocol/schema.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1714,6 +1714,9 @@ Information about a selectable model.
<ResponseField name="_meta" type={"object"}>
Extension point for implementations
</ResponseField>
<ResponseField name="description" type={"string | null"}>
Optional description of the model.
</ResponseField>
<ResponseField name="modelId" type={<a href="#modelid">ModelId</a>} required>
Unique identifier for the model.
</ResponseField>
Expand Down
3 changes: 3 additions & 0 deletions rust/agent.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,6 +590,9 @@ pub struct ModelInfo {
pub model_id: ModelId,
/// Human-readable name of the model.
pub name: String,
/// Optional description of the model.
#[serde(default, skip_serializing_if = "Option::is_none")]
pub description: Option<String>,
/// Extension point for implementations
#[serde(skip_serializing_if = "Option::is_none", rename = "_meta")]
pub meta: Option<serde_json::Value>,
Expand Down
4 changes: 4 additions & 0 deletions schema/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,10 @@
"_meta": {
"description": "Extension point for implementations"
},
"description": {
"description": "Optional description of the model.",
"type": ["string", "null"]
},
"modelId": {
"$ref": "#/$defs/ModelId",
"description": "Unique identifier for the model."
Expand Down
5 changes: 5 additions & 0 deletions typescript/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1369,6 +1369,10 @@ export interface ModelInfo {
_meta?: {
[k: string]: unknown;
};
/**
* Optional description of the model.
*/
description?: string | null;
/**
* Unique identifier for the model.
*/
Expand Down Expand Up @@ -2135,6 +2139,7 @@ export const promptCapabilitiesSchema = z.object({
/** @internal */
export const modelInfoSchema = z.object({
_meta: z.record(z.unknown()).optional(),
description: z.string().optional().nullable(),
modelId: z.string(),
name: z.string(),
});
Expand Down