Skip to content

Upgrading anthropic 0.51 to 0.52

Safe0.51.0 → 0.52.2New1Fixed3Other10

SafeUpgrade verdict

Only new features and fixes in this range.

  • Nothing in this range needs changes to your code. It adds features and fixes.
Nothing to change

No breaking, platform, security or deprecated items in this range.

Nothing in this upgrade needs a code or configuration change.

Generated by DepDelta from published Python source. Not mixed with prose notes.

  • added: export AsyncFiles
  • added: export AsyncFilesWithRawResponse
  • added: export AsyncFilesWithStreamingResponse
  • added: export Files
  • added: export FilesWithRawResponse
  • added: export FilesWithStreamingResponse
  • added: property AsyncBeta.files -> AsyncFiles
  • added: property Beta.files -> Files
  • added: async method AsyncFiles.delete(file_id: str, *, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | None | NotGiven=…) -> DeletedFile
  • added: async method AsyncFiles.download(file_id: str, *, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | None | NotGiven=…) -> AsyncBinaryAPIResponse
  • added: async method AsyncFiles.retrieve_metadata(file_id: str, *, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | None | NotGiven=…) -> FileMetadata
  • added: async method AsyncFiles.upload(*, file: FileTypes, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | None | NotGiven=…) -> FileMetadata
  • added: class AsyncFiles(AsyncAPIResource)
  • added: class Files(SyncAPIResource)
  • added: method AsyncFiles.list(*, after_id: str | NotGiven=…, before_id: str | NotGiven=…, limit: int | NotGiven=…, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | None | NotGiven=…) -> AsyncPaginator[FileMetadata, AsyncPage[FileMetadata]]
  • added: method Files.delete(file_id: str, *, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | None | NotGiven=…) -> DeletedFile
  • added: method Files.download(file_id: str, *, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | None | NotGiven=…) -> BinaryAPIResponse
  • added: method Files.list(*, after_id: str | NotGiven=…, before_id: str | NotGiven=…, limit: int | NotGiven=…, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | None | NotGiven=…) -> SyncPage[FileMetadata]
  • added: method Files.retrieve_metadata(file_id: str, *, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | None | NotGiven=…) -> FileMetadata
  • added: method Files.upload(*, file: FileTypes, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | None | NotGiven=…) -> FileMetadata
  • added: property AsyncFiles.with_raw_response -> AsyncFilesWithRawResponse
  • added: property AsyncFiles.with_streaming_response -> AsyncFilesWithStreamingResponse
  • added: property Files.with_raw_response -> FilesWithRawResponse
  • added: property Files.with_streaming_response -> FilesWithStreamingResponse
  • changed: async method AsyncMessages.count_tokens(*, messages: Iterable[BetaMessageParam], model: ModelParam, system: Union[str, Iterable[BetaTextBlockParam]] | NotGiven=…, thinking: BetaThinkingConfigParam | NotGiven=…, tool_choice: BetaToolChoiceParam | NotGiven=…, tools: Iterable[message_count_tokens_params.Tool] | NotGiven=…, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…… → async method AsyncMessages.count_tokens(*, messages: Iterable[BetaMessageParam], model: ModelParam, mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam] | NotGiven=…, system: Union[str, Iterable[BetaTextBlockParam]] | NotGiven=…, thinking: BetaThinkingConfigParam | NotGiven=…, tool_choice: BetaToolChoiceParam | NotGiven=…, tools: Iterable[message_count_tokens_params.Tool] | NotGiven=…, b…
  • changed: async method AsyncMessages.create(*, max_tokens: int, messages: Iterable[BetaMessageParam], model: ModelParam, metadata: BetaMetadataParam | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, system: Union[str, Iterable[BetaTextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, thinking: BetaThinkingConfigParam | NotGiven=…, tool_choice: BetaToolChoi… → async method AsyncMessages.create(*, max_tokens: int, messages: Iterable[BetaMessageParam], model: ModelParam, container: Optional[str] | NotGiven=…, mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam] | NotGiven=…, metadata: BetaMetadataParam | NotGiven=…, service_tier: Literal['auto', 'standard_only'] | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGi…
  • changed: method AsyncMessages.stream(*, max_tokens: int, messages: Iterable[BetaMessageParam], model: ModelParam, metadata: BetaMetadataParam | NotGiven=…, stop_sequences: List[str] | NotGiven=…, system: Union[str, Iterable[BetaTextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, thinking: BetaThinkingConfigParam | NotGiven=…, tool_choice: BetaToolChoiceParam | NotGiven=…, tools: Iterable[BetaT… → method AsyncMessages.stream(*, max_tokens: int, messages: Iterable[BetaMessageParam], model: ModelParam, metadata: BetaMetadataParam | NotGiven=…, container: Optional[str] | NotGiven=…, mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam] | NotGiven=…, service_tier: Literal['auto', 'standard_only'] | NotGiven=…, stop_sequences: List[str] | NotGiven=…, system: Union[str, Iterable[BetaText…
  • changed: method Messages.count_tokens(*, messages: Iterable[BetaMessageParam], model: ModelParam, system: Union[str, Iterable[BetaTextBlockParam]] | NotGiven=…, thinking: BetaThinkingConfigParam | NotGiven=…, tool_choice: BetaToolChoiceParam | NotGiven=…, tools: Iterable[message_count_tokens_params.Tool] | NotGiven=…, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_que… → method Messages.count_tokens(*, messages: Iterable[BetaMessageParam], model: ModelParam, mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam] | NotGiven=…, system: Union[str, Iterable[BetaTextBlockParam]] | NotGiven=…, thinking: BetaThinkingConfigParam | NotGiven=…, tool_choice: BetaToolChoiceParam | NotGiven=…, tools: Iterable[message_count_tokens_params.Tool] | NotGiven=…, betas: List[…
  • changed: method Messages.create(*, max_tokens: int, messages: Iterable[BetaMessageParam], model: ModelParam, metadata: BetaMetadataParam | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, system: Union[str, Iterable[BetaTextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, thinking: BetaThinkingConfigParam | NotGiven=…, tool_choice: BetaToolChoiceParam | N… → method Messages.create(*, max_tokens: int, messages: Iterable[BetaMessageParam], model: ModelParam, container: Optional[str] | NotGiven=…, mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam] | NotGiven=…, metadata: BetaMetadataParam | NotGiven=…, service_tier: Literal['auto', 'standard_only'] | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, syst…
  • changed: method Messages.stream(*, max_tokens: int, messages: Iterable[BetaMessageParam], model: ModelParam, metadata: BetaMetadataParam | NotGiven=…, stop_sequences: List[str] | NotGiven=…, system: Union[str, Iterable[BetaTextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, thinking: BetaThinkingConfigParam | NotGiven=…, tool_choice: BetaToolChoiceParam | NotGiven=…, tools: Iterable[BetaToolUn… → method Messages.stream(*, max_tokens: int, messages: Iterable[BetaMessageParam], model: ModelParam, container: Optional[str] | NotGiven=…, mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam] | NotGiven=…, metadata: BetaMetadataParam | NotGiven=…, service_tier: Literal['auto', 'standard_only'] | NotGiven=…, stop_sequences: List[str] | NotGiven=…, system: Union[str, Iterable[BetaTextBlock…
  • changed: async method AsyncMessages.create(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, system: Union[str, Iterable[TextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, thinking: ThinkingConfigParam | NotGiven=…, tool_choice: ToolChoiceParam | NotGiven=…… → async method AsyncMessages.create(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | NotGiven=…, service_tier: Literal['auto', 'standard_only'] | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, system: Union[str, Iterable[TextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, thinking: ThinkingConfig…
  • changed: method AsyncMessages.stream(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | NotGiven=…, stop_sequences: List[str] | NotGiven=…, system: Union[str, Iterable[TextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, top_k: int | NotGiven=…, top_p: float | NotGiven=…, thinking: ThinkingConfigParam | NotGiven=…, tool_choice: ToolChoiceParam | N… → method AsyncMessages.stream(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | NotGiven=…, container: Optional[str] | NotGiven=…, service_tier: Literal['auto', 'standard_only'] | NotGiven=…, stop_sequences: List[str] | NotGiven=…, system: Union[str, Iterable[TextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, top_k: int | NotGiven=…, top…
  • changed: method Messages.create(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, system: Union[str, Iterable[TextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, thinking: ThinkingConfigParam | NotGiven=…, tool_choice: ToolChoiceParam | NotGiven=…, tools: It… → method Messages.create(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | NotGiven=…, service_tier: Literal['auto', 'standard_only'] | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, system: Union[str, Iterable[TextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, thinking: ThinkingConfigParam | Not…
  • changed: method Messages.stream(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | NotGiven=…, stop_sequences: List[str] | NotGiven=…, system: Union[str, Iterable[TextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, top_k: int | NotGiven=…, top_p: float | NotGiven=…, thinking: ThinkingConfigParam | NotGiven=…, tool_choice: ToolChoiceParam | NotGiv… → method Messages.stream(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | NotGiven=…, container: Optional[str] | NotGiven=…, service_tier: Literal['auto', 'standard_only'] | NotGiven=…, stop_sequences: List[str] | NotGiven=…, system: Union[str, Iterable[TextBlockParam]] | NotGiven=…, temperature: float | NotGiven=…, top_k: int | NotGiven=…, top_p: f…
  • added: export BetaCacheCreation
  • added: export BetaCodeExecutionOutputBlock
  • added: export BetaCodeExecutionOutputBlockParam
  • added: export BetaCodeExecutionResultBlock
  • added: export BetaCodeExecutionResultBlockParam
  • added: export BetaCodeExecutionTool20250522Param
  • added: export BetaCodeExecutionToolResultBlock
  • added: export BetaCodeExecutionToolResultBlockContent
  • added: export BetaCodeExecutionToolResultBlockParam
  • added: export BetaCodeExecutionToolResultBlockParamContentParam
  • added: export BetaCodeExecutionToolResultError
  • added: export BetaCodeExecutionToolResultErrorCode
  • added: export BetaCodeExecutionToolResultErrorParam
  • added: export BetaContainer
  • added: export BetaContainerUploadBlock
  • added: export BetaContainerUploadBlockParam
  • added: export BetaFileDocumentSourceParam
  • added: export BetaFileImageSourceParam
  • added: export BetaMCPToolResultBlock
  • added: export BetaMCPToolUseBlock
  • added: export BetaMCPToolUseBlockParam
  • added: export BetaRequestMCPServerToolConfigurationParam
  • added: export BetaRequestMCPServerURLDefinitionParam
  • added: export BetaRequestMCPToolResultBlockParam
  • added: export BetaToolTextEditor20250429Param
  • added: export BetaWebSearchToolResultErrorCode
  • added: export DeletedFile
  • added: export FileListParams
  • added: export FileMetadata
  • added: export FileUploadParams
  • added: field BetaCacheControlEphemeralParam.ttl: Literal['5m', '1h']
  • added: class BetaCacheCreation(BaseModel)
  • added: field BetaCacheCreation.ephemeral_1h_input_tokens: int
  • added: field BetaCacheCreation.ephemeral_5m_input_tokens: int
  • added: class BetaCodeExecutionOutputBlock(BaseModel)
  • added: field BetaCodeExecutionOutputBlock.file_id: str
  • added: field BetaCodeExecutionOutputBlock.type: Literal['code_execution_output']
  • added: class BetaCodeExecutionOutputBlockParam(TypedDict)
  • added: field BetaCodeExecutionOutputBlockParam.file_id: Required[str]
  • added: field BetaCodeExecutionOutputBlockParam.type: Required[Literal['code_execution_output']]
  • added: class BetaCodeExecutionResultBlock(BaseModel)
  • added: field BetaCodeExecutionResultBlock.content: List[BetaCodeExecutionOutputBlock]
  • added: field BetaCodeExecutionResultBlock.return_code: int
  • added: field BetaCodeExecutionResultBlock.stderr: str
  • added: field BetaCodeExecutionResultBlock.stdout: str
  • added: field BetaCodeExecutionResultBlock.type: Literal['code_execution_result']
  • added: class BetaCodeExecutionResultBlockParam(TypedDict)
  • added: field BetaCodeExecutionResultBlockParam.content: Required[Iterable[BetaCodeExecutionOutputBlockParam]]
  • added: field BetaCodeExecutionResultBlockParam.return_code: Required[int]
  • added: field BetaCodeExecutionResultBlockParam.stderr: Required[str]
  • added: field BetaCodeExecutionResultBlockParam.stdout: Required[str]
  • added: field BetaCodeExecutionResultBlockParam.type: Required[Literal['code_execution_result']]
  • added: class BetaCodeExecutionTool20250522Param(TypedDict)
  • added: field BetaCodeExecutionTool20250522Param.cache_control: Optional[BetaCacheControlEphemeralParam]
  • added: field BetaCodeExecutionTool20250522Param.name: Required[Literal['code_execution']]
  • added: field BetaCodeExecutionTool20250522Param.type: Required[Literal['code_execution_20250522']]
  • added: class BetaCodeExecutionToolResultBlock(BaseModel)
  • added: field BetaCodeExecutionToolResultBlock.content: BetaCodeExecutionToolResultBlockContent
  • added: field BetaCodeExecutionToolResultBlock.tool_use_id: str
  • added: field BetaCodeExecutionToolResultBlock.type: Literal['code_execution_tool_result']
  • added: variable BetaCodeExecutionToolResultBlockContent: TypeAlias
  • added: class BetaCodeExecutionToolResultBlockParam(TypedDict)
  • added: field BetaCodeExecutionToolResultBlockParam.cache_control: Optional[BetaCacheControlEphemeralParam]
  • added: field BetaCodeExecutionToolResultBlockParam.content: Required[BetaCodeExecutionToolResultBlockParamContentParam]
  • added: field BetaCodeExecutionToolResultBlockParam.tool_use_id: Required[str]
  • added: field BetaCodeExecutionToolResultBlockParam.type: Required[Literal['code_execution_tool_result']]
  • added: variable BetaCodeExecutionToolResultBlockParamContentParam: TypeAlias
  • added: class BetaCodeExecutionToolResultError(BaseModel)
  • added: field BetaCodeExecutionToolResultError.error_code: BetaCodeExecutionToolResultErrorCode
  • added: field BetaCodeExecutionToolResultError.type: Literal['code_execution_tool_result_error']
  • added: variable BetaCodeExecutionToolResultErrorCode: TypeAlias
  • added: class BetaCodeExecutionToolResultErrorParam(TypedDict)
  • added: field BetaCodeExecutionToolResultErrorParam.error_code: Required[BetaCodeExecutionToolResultErrorCode]
  • added: field BetaCodeExecutionToolResultErrorParam.type: Required[Literal['code_execution_tool_result_error']]
  • added: class BetaContainer(BaseModel)
  • added: field BetaContainer.expires_at: datetime
  • added: field BetaContainer.id: str
  • added: class BetaContainerUploadBlock(BaseModel)
  • added: field BetaContainerUploadBlock.file_id: str
  • added: field BetaContainerUploadBlock.type: Literal['container_upload']
  • added: class BetaContainerUploadBlockParam(TypedDict)
  • added: field BetaContainerUploadBlockParam.cache_control: Optional[BetaCacheControlEphemeralParam]
  • added: field BetaContainerUploadBlockParam.file_id: Required[str]
  • added: field BetaContainerUploadBlockParam.type: Required[Literal['container_upload']]
  • added: class BetaFileDocumentSourceParam(TypedDict)
  • added: field BetaFileDocumentSourceParam.file_id: Required[str]
  • added: field BetaFileDocumentSourceParam.type: Required[Literal['file']]
  • added: class BetaFileImageSourceParam(TypedDict)
  • added: field BetaFileImageSourceParam.file_id: Required[str]
  • added: field BetaFileImageSourceParam.type: Required[Literal['file']]
  • added: class BetaMCPToolResultBlock(BaseModel)
  • added: field BetaMCPToolResultBlock.content: Union[str, List[BetaTextBlock]]
  • added: field BetaMCPToolResultBlock.is_error: bool
  • added: field BetaMCPToolResultBlock.tool_use_id: str
  • added: field BetaMCPToolResultBlock.type: Literal['mcp_tool_result']
  • added: class BetaMCPToolUseBlock(BaseModel)
  • added: field BetaMCPToolUseBlock.id: str
  • added: field BetaMCPToolUseBlock.input: object
  • added: field BetaMCPToolUseBlock.name: str
  • added: field BetaMCPToolUseBlock.server_name: str
  • added: field BetaMCPToolUseBlock.type: Literal['mcp_tool_use']
  • added: class BetaMCPToolUseBlockParam(TypedDict)
  • added: field BetaMCPToolUseBlockParam.cache_control: Optional[BetaCacheControlEphemeralParam]
  • added: field BetaMCPToolUseBlockParam.id: Required[str]
  • added: field BetaMCPToolUseBlockParam.input: Required[object]
  • added: field BetaMCPToolUseBlockParam.name: Required[str]
  • added: field BetaMCPToolUseBlockParam.server_name: Required[str]
  • added: field BetaMCPToolUseBlockParam.type: Required[Literal['mcp_tool_use']]
  • added: field BetaMessage.container: Optional[BetaContainer]
  • added: field Delta.container: Optional[BetaContainer]
  • added: class BetaRequestMCPServerToolConfigurationParam(TypedDict)
  • added: field BetaRequestMCPServerToolConfigurationParam.allowed_tools: Optional[List[str]]
  • added: field BetaRequestMCPServerToolConfigurationParam.enabled: Optional[bool]
  • added: class BetaRequestMCPServerURLDefinitionParam(TypedDict)
  • added: field BetaRequestMCPServerURLDefinitionParam.authorization_token: Optional[str]
  • added: field BetaRequestMCPServerURLDefinitionParam.name: Required[str]
  • added: field BetaRequestMCPServerURLDefinitionParam.tool_configuration: Optional[BetaRequestMCPServerToolConfigurationParam]
  • added: field BetaRequestMCPServerURLDefinitionParam.type: Required[Literal['url']]
  • added: field BetaRequestMCPServerURLDefinitionParam.url: Required[str]
  • added: class BetaRequestMCPToolResultBlockParam(TypedDict)
  • added: field BetaRequestMCPToolResultBlockParam.cache_control: Optional[BetaCacheControlEphemeralParam]
  • added: field BetaRequestMCPToolResultBlockParam.content: Union[str, Iterable[BetaTextBlockParam]]
  • added: field BetaRequestMCPToolResultBlockParam.is_error: bool
  • added: field BetaRequestMCPToolResultBlockParam.tool_use_id: Required[str]
  • added: field BetaRequestMCPToolResultBlockParam.type: Required[Literal['mcp_tool_result']]
  • changed: field BetaServerToolUseBlock.name: Literal['web_search'] → field BetaServerToolUseBlock.name: Literal['web_search', 'code_execution']
  • changed: field BetaServerToolUseBlockParam.name: Required[Literal['web_search']] → field BetaServerToolUseBlockParam.name: Required[Literal['web_search', 'code_execution']]
  • added: class BetaToolTextEditor20250429Param(TypedDict)
  • added: field BetaToolTextEditor20250429Param.cache_control: Optional[BetaCacheControlEphemeralParam]
  • added: field BetaToolTextEditor20250429Param.name: Required[Literal['str_replace_based_edit_tool']]
  • added: field BetaToolTextEditor20250429Param.type: Required[Literal['text_editor_20250429']]
  • added: field BetaUsage.cache_creation: Optional[BetaCacheCreation]
  • added: field BetaUsage.service_tier: Optional[Literal['standard', 'priority', 'batch']]
  • changed: field BetaWebSearchToolRequestErrorParam.error_code: Required[Literal['invalid_tool_input', 'unavailable', 'max_uses_exceeded', 'too_many_requests', 'query_too_long']] → field BetaWebSearchToolRequestErrorParam.error_code: Required[BetaWebSearchToolResultErrorCode]
  • changed: field BetaWebSearchToolResultError.error_code: Literal['invalid_tool_input', 'unavailable', 'max_uses_exceeded', 'too_many_requests', 'query_too_long'] → field BetaWebSearchToolResultError.error_code: BetaWebSearchToolResultErrorCode
  • added: variable BetaWebSearchToolResultErrorCode: TypeAlias
  • added: class DeletedFile(BaseModel)
  • added: field DeletedFile.id: str
  • added: field DeletedFile.type: Optional[Literal['file_deleted']]
  • added: class FileListParams(TypedDict)
  • added: field FileListParams.after_id: str
  • added: field FileListParams.before_id: str
  • added: field FileListParams.betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias=anthropic - beta)]
  • added: field FileListParams.limit: int
  • added: class FileMetadata(BaseModel)
  • added: field FileMetadata.created_at: datetime
  • added: field FileMetadata.downloadable: Optional[bool]
  • added: field FileMetadata.filename: str
  • added: field FileMetadata.id: str
  • added: field FileMetadata.mime_type: str
  • added: field FileMetadata.size_bytes: int
  • added: field FileMetadata.type: Literal['file']
  • added: class FileUploadParams(TypedDict)
  • added: field FileUploadParams.betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias=anthropic - beta)]
  • added: field FileUploadParams.file: Required[FileTypes]
  • added: field MessageCountTokensParams.mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam]
  • added: field MessageCreateParamsBase.container: Optional[str]
  • added: field MessageCreateParamsBase.mcp_servers: Iterable[BetaRequestMCPServerURLDefinitionParam]
  • added: field MessageCreateParamsBase.service_tier: Literal['auto', 'standard_only']
  • added: field MessageCreateParamsBase.service_tier: Literal['auto', 'standard_only']
  • changed: field MessageParam.content: Required[Union[str, Iterable[Union[TextBlockParam, ImageBlockParam, ToolUseBlockParam, ServerToolUseBlockParam, WebSearchToolResultBlockParam, ToolResultBlockParam, DocumentBlockParam, ThinkingBlockParam, RedactedThinkingBlockParam, ContentBlock]]]] → field MessageParam.content: Required[Union[str, Iterable[Union[ServerToolUseBlockParam, WebSearchToolResultBlockParam, TextBlockParam, ImageBlockParam, ToolUseBlockParam, ToolResultBlockParam, DocumentBlockParam, ThinkingBlockParam, RedactedThinkingBlockParam, ContentBlock]]]]
  • added: field Usage.service_tier: Optional[Literal['standard', 'priority', 'batch']]