Skip to content

Upgrading anthropic 0.76 to 0.77

Breaking0.76.0 → 0.77.1Breaking1New2Changed1Fixed3Other4

BreakingUpgrade verdict

1 breaking change.

  • The parameter used to request structured output is renamed, so existing code using the old name must be updated.
1 item needs code or config changes
Breaking1
Migrates sending message format to output_config rather than output_format.
output_configoutput_format

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

  • added: export ParsedContentBlockStopEvent
  • added: export ParsedMessageStopEvent
  • added: export ParsedMessageStreamEvent
  • changed: async method AsyncMessages.count_tokens(*, messages: Iterable[MessageParam], model: ModelParam, system: Union[str, Iterable[TextBlockParam]] | Omit=…, thinking: ThinkingConfigParam | Omit=…, tool_choice: ToolChoiceParam | Omit=…, tools: Iterable[MessageCountTokensToolParam] | Omit=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Ti… → async method AsyncMessages.count_tokens(*, messages: Iterable[MessageParam], model: ModelParam, output_config: OutputConfigParam | Omit=…, output_format: None | JSONOutputFormatParam | type | Omit=…, system: Union[str, Iterable[TextBlockParam]] | Omit=…, thinking: ThinkingConfigParam | Omit=…, tool_choice: ToolChoiceParam | Omit=…, tools: Iterable[MessageCountTokensToolParam] | Omit=…, extra_head…
  • changed: async method AsyncMessages.create(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | Omit=…, service_tier: Literal['auto', 'standard_only'] | Omit=…, stop_sequences: SequenceNotStr[str] | Omit=…, stream: Literal[False] | Omit=…, system: Union[str, Iterable[TextBlockParam]] | Omit=…, temperature: float | Omit=…, thinking: ThinkingConfigParam | Omit=…… → async method AsyncMessages.create(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | Omit=…, output_config: OutputConfigParam | Omit=…, service_tier: Literal['auto', 'standard_only'] | Omit=…, stop_sequences: SequenceNotStr[str] | Omit=…, stream: Literal[False] | Omit=…, system: Union[str, Iterable[TextBlockParam]] | Omit=…, temperature: float | Omi…
  • changed: method AsyncMessages.stream(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | Omit=…, container: Optional[str] | Omit=…, service_tier: Literal['auto', 'standard_only'] | Omit=…, stop_sequences: SequenceNotStr[str] | Omit=…, system: Union[str, Iterable[TextBlockParam]] | Omit=…, temperature: float | Omit=…, top_k: int | Omit=…, top_p: float | Omit=…… → method AsyncMessages.stream(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | Omit=…, output_config: OutputConfigParam | Omit=…, output_format: None | JSONOutputFormatParam | type[ResponseFormatT] | Omit=…, container: Optional[str] | Omit=…, service_tier: Literal['auto', 'standard_only'] | Omit=…, stop_sequences: SequenceNotStr[str] | Omit=…, syste…
  • changed: method Messages.count_tokens(*, messages: Iterable[MessageParam], model: ModelParam, system: Union[str, Iterable[TextBlockParam]] | Omit=…, thinking: ThinkingConfigParam | Omit=…, tool_choice: ToolChoiceParam | Omit=…, tools: Iterable[MessageCountTokensToolParam] | Omit=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, timeout: float | httpx.Timeout | Non… → method Messages.count_tokens(*, messages: Iterable[MessageParam], model: ModelParam, output_config: OutputConfigParam | Omit=…, output_format: None | JSONOutputFormatParam | type | Omit=…, system: Union[str, Iterable[TextBlockParam]] | Omit=…, thinking: ThinkingConfigParam | Omit=…, tool_choice: ToolChoiceParam | Omit=…, tools: Iterable[MessageCountTokensToolParam] | Omit=…, extra_headers: Header…
  • changed: method Messages.create(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | Omit=…, service_tier: Literal['auto', 'standard_only'] | Omit=…, stop_sequences: SequenceNotStr[str] | Omit=…, stream: Literal[False] | Omit=…, system: Union[str, Iterable[TextBlockParam]] | Omit=…, temperature: float | Omit=…, thinking: ThinkingConfigParam | Omit=…, tool_choi… → method Messages.create(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | Omit=…, output_config: OutputConfigParam | Omit=…, service_tier: Literal['auto', 'standard_only'] | Omit=…, stop_sequences: SequenceNotStr[str] | Omit=…, stream: Literal[False] | Omit=…, system: Union[str, Iterable[TextBlockParam]] | Omit=…, temperature: float | Omit=…, thinki…
  • changed: method Messages.stream(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | Omit=…, container: Optional[str] | Omit=…, service_tier: Literal['auto', 'standard_only'] | Omit=…, stop_sequences: SequenceNotStr[str] | Omit=…, system: Union[str, Iterable[TextBlockParam]] | Omit=…, temperature: float | Omit=…, top_k: int | Omit=…, top_p: float | Omit=…, thi… → method Messages.stream(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | Omit=…, output_config: OutputConfigParam | Omit=…, output_format: None | JSONOutputFormatParam | type[ResponseFormatT] | Omit=…, container: Optional[str] | Omit=…, service_tier: Literal['auto', 'standard_only'] | Omit=…, stop_sequences: SequenceNotStr[str] | Omit=…, system: Un…
  • added: async method AsyncMessages.parse(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | Omit=…, output_config: OutputConfigParam | Omit=…, output_format: Optional[type[ResponseFormatT]] | Omit=…, service_tier: Literal['auto', 'standard_only'] | Omit=…, stop_sequences: SequenceNotStr[str] | Omit=…, stream: Literal[False] | Literal[True] | Omit=…, system:…
  • added: method Messages.parse(*, max_tokens: int, messages: Iterable[MessageParam], model: ModelParam, metadata: MetadataParam | Omit=…, output_config: OutputConfigParam | Omit=…, output_format: Optional[type[ResponseFormatT]] | Omit=…, service_tier: Literal['auto', 'standard_only'] | Omit=…, stop_sequences: SequenceNotStr[str] | Omit=…, stream: Literal[False] | Literal[True] | Omit=…, system: Union[str,…
  • added: export JSONOutputFormatParam
  • added: export OutputConfigParam
  • added: export ParsedContentBlock
  • added: export ParsedMessage
  • added: export ParsedTextBlock
  • added: field BetaOutputConfigParam.format: Optional[BetaJSONOutputFormatParam]
  • changed: field BetaServerToolUseBlock.caller: Caller → field BetaServerToolUseBlock.caller: Optional[Caller]
  • removed: class RequestParamsOutputFormat(TypedDict)
  • removed: field RequestParamsOutputFormat.schema: Required[object]
  • removed: field RequestParamsOutputFormat.type: Required[Literal['json_schema']]
  • added: class JSONOutputFormatParam(TypedDict)
  • added: field JSONOutputFormatParam.schema: Required[Dict[str, object]]
  • added: field JSONOutputFormatParam.type: Required[Literal['json_schema']]
  • added: field MessageCountTokensParams.output_config: OutputConfigParam
  • added: field MessageCreateParamsBase.output_config: OutputConfigParam
  • added: class OutputConfigParam(TypedDict)
  • added: field OutputConfigParam.format: Optional[JSONOutputFormatParam]
  • added: class ParsedMessage(Message, Generic[ResponseFormatT])
  • added: class ParsedTextBlock(TextBlock, Generic[ResponseFormatT])
  • added: field ParsedMessage.content: List[ParsedContentBlock[ResponseFormatT]]
  • added: field ParsedMessage.content: List[ParsedContentBlock]
  • added: field ParsedTextBlock.parsed_output: Optional[ResponseFormatT]
  • added: property ParsedMessage.parsed_output -> Optional[ResponseFormatT]
  • added: variable ParsedContentBlock: TypeAlias
  • added: field ToolBash20250124Param.strict: bool
  • added: field ToolParam.strict: bool
  • added: field ToolTextEditor20250124Param.strict: bool
  • added: field ToolTextEditor20250429Param.strict: bool
  • added: field ToolTextEditor20250728Param.strict: bool
  • added: field WebSearchTool20250305Param.strict: bool
  • changed: field WebSearchToolRequestErrorParam.error_code: Required[Literal['invalid_tool_input', 'unavailable', 'max_uses_exceeded', 'too_many_requests', 'query_too_long']] → field WebSearchToolRequestErrorParam.error_code: Required[Literal['invalid_tool_input', 'unavailable', 'max_uses_exceeded', 'too_many_requests', 'query_too_long', 'request_too_large']]
  • changed: field WebSearchToolResultError.error_code: Literal['invalid_tool_input', 'unavailable', 'max_uses_exceeded', 'too_many_requests', 'query_too_long'] → field WebSearchToolResultError.error_code: Literal['invalid_tool_input', 'unavailable', 'max_uses_exceeded', 'too_many_requests', 'query_too_long', 'request_too_large']