@@ -1015,7 +1015,7 @@ class GetPromptRequest(Request[GetPromptRequestParams, Literal["prompts/get"]]):
10151015class TextContent (BaseModel ):
10161016 """Text content for a message."""
10171017
1018- type : Literal ["text" ]
1018+ type : Literal ["text" ] = "text"
10191019 text : str
10201020 """The text content of the message."""
10211021 annotations : Annotations | None = None
@@ -1030,7 +1030,7 @@ class TextContent(BaseModel):
10301030class ImageContent (BaseModel ):
10311031 """Image content for a message."""
10321032
1033- type : Literal ["image" ]
1033+ type : Literal ["image" ] = "image"
10341034 data : str
10351035 """The base64-encoded image data."""
10361036 mimeType : str
@@ -1050,7 +1050,7 @@ class ImageContent(BaseModel):
10501050class AudioContent (BaseModel ):
10511051 """Audio content for a message."""
10521052
1053- type : Literal ["audio" ]
1053+ type : Literal ["audio" ] = "audio"
10541054 data : str
10551055 """The base64-encoded audio data."""
10561056 mimeType : str
@@ -1076,7 +1076,7 @@ class ToolUseContent(BaseModel):
10761076 in the next user message.
10771077 """
10781078
1079- type : Literal ["tool_use" ]
1079+ type : Literal ["tool_use" ] = "tool_use"
10801080 """Discriminator for tool use content."""
10811081
10821082 name : str
@@ -1104,7 +1104,7 @@ class ToolResultContent(BaseModel):
11041104 from the assistant. It contains the output of executing the requested tool.
11051105 """
11061106
1107- type : Literal ["tool_result" ]
1107+ type : Literal ["tool_result" ] = "tool_result"
11081108 """Discriminator for tool result content."""
11091109
11101110 toolUseId : str
@@ -1171,7 +1171,7 @@ class EmbeddedResource(BaseModel):
11711171 of the LLM and/or the user.
11721172 """
11731173
1174- type : Literal ["resource" ]
1174+ type : Literal ["resource" ] = "resource"
11751175 resource : TextResourceContents | BlobResourceContents
11761176 annotations : Annotations | None = None
11771177 meta : dict [str , Any ] | None = Field (alias = "_meta" , default = None )
@@ -1189,7 +1189,7 @@ class ResourceLink(Resource):
11891189 Note: resource links returned by tools are not guaranteed to appear in the results of `resources/list` requests.
11901190 """
11911191
1192- type : Literal ["resource_link" ]
1192+ type : Literal ["resource_link" ] = "resource_link"
11931193
11941194
11951195ContentBlock = TextContent | ImageContent | AudioContent | ResourceLink | EmbeddedResource
@@ -1580,7 +1580,7 @@ def content_as_list(self) -> list[SamplingMessageContentBlock]:
15801580class ResourceTemplateReference (BaseModel ):
15811581 """A reference to a resource or resource template definition."""
15821582
1583- type : Literal ["ref/resource" ]
1583+ type : Literal ["ref/resource" ] = "ref/resource"
15841584 uri : str
15851585 """The URI or URI template of the resource."""
15861586 model_config = ConfigDict (extra = "allow" )
@@ -1589,7 +1589,7 @@ class ResourceTemplateReference(BaseModel):
15891589class PromptReference (BaseModel ):
15901590 """Identifies a prompt."""
15911591
1592- type : Literal ["ref/prompt" ]
1592+ type : Literal ["ref/prompt" ] = "ref/prompt"
15931593 name : str
15941594 """The name of the prompt or prompt template"""
15951595 model_config = ConfigDict (extra = "allow" )
0 commit comments