Skip to content

Upgrading anthropic 0.37 to 0.38

Safe0.37.1 → 0.38.0New1Fixed2Other4

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: async method AsyncMessages.count_tokens(*, messages: Iterable[BetaMessageParam], model: ModelParam, system: Union[str, Iterable[BetaTextBlockParam]] | NotGiven=…, tool_choice: BetaToolChoiceParam | NotGiven=…, tools: Iterable[message_count_tokens_params.Tool] | NotGiven=…, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body…
  • added: method Messages.count_tokens(*, messages: Iterable[BetaMessageParam], model: ModelParam, system: Union[str, Iterable[BetaTextBlockParam]] | NotGiven=…, tool_choice: BetaToolChoiceParam | NotGiven=…, tools: Iterable[message_count_tokens_params.Tool] | NotGiven=…, betas: List[AnthropicBetaParam] | NotGiven=…, extra_headers: Headers | None=…, extra_query: Query | None=…, extra_body: Body | None=…, t…
  • added: export BetaBase64PDFBlockParam
  • added: export BetaBase64PDFSourceParam
  • added: export BetaMessageTokensCount
  • added: export MessageCountTokensParams
  • added: class BetaBase64PDFBlockParam(TypedDict)
  • added: field BetaBase64PDFBlockParam.cache_control: Optional[BetaCacheControlEphemeralParam]
  • added: field BetaBase64PDFBlockParam.source: Required[BetaBase64PDFSourceParam]
  • added: field BetaBase64PDFBlockParam.type: Required[Literal['document']]
  • added: class BetaBase64PDFSourceParam(TypedDict)
  • added: field BetaBase64PDFSourceParam.data: Required[Annotated[Union[str, Base64FileInput], PropertyInfo(format=base64)]]
  • added: field BetaBase64PDFSourceParam.media_type: Required[Literal['application/pdf']]
  • added: field BetaBase64PDFSourceParam.type: Required[Literal['base64']]
  • added: class BetaMessageTokensCount(BaseModel)
  • added: field BetaMessageTokensCount.input_tokens: int
  • added: class MessageCountTokensParams(TypedDict)
  • added: field MessageCountTokensParams.betas: Annotated[List[AnthropicBetaParam], PropertyInfo(alias=anthropic - beta)]
  • added: field MessageCountTokensParams.messages: Required[Iterable[BetaMessageParam]]
  • added: field MessageCountTokensParams.model: Required[ModelParam]
  • added: field MessageCountTokensParams.system: Union[str, Iterable[BetaTextBlockParam]]
  • added: field MessageCountTokensParams.tool_choice: BetaToolChoiceParam
  • added: field MessageCountTokensParams.tools: Iterable[Tool]
  • added: variable Tool: TypeAlias