Upgrading anthropic 0.16 to 0.17
Review needed0.16.0 → 0.17.0Deprecated1New1Changed1Other10
Review neededUpgrade verdict
1 deprecation.
In plain terms
- The older text completions endpoint is now labeled legacy; prefer the messages API.
Must act 1 item needs code or config changes
Nothing in this upgrade needs a code or configuration change.
Deprecations to plan for
Deprecated1
Marks the completions API as legacy.
completionsAPI changes
Generated by DepDelta from published Python source. Not mixed with prose notes.
- changed:
async method AsyncCompletions.create(*, max_tokens_to_sample: int, model: Union[str, Literal['claude-2.1', 'claude-instant-1']], prompt: str, metadata: completion_create_params.Metadata | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, temperature: float | NotGiven=…, top_k: int | NotGiven=…, top_p: float | NotGiven=…, extra_headers: Headers | None=…, extr… → async method AsyncCompletions.create(*, max_tokens_to_sample: int, model: Union[str, Literal['claude-3-opus-20240229', 'claude-2.1', 'claude-instant-1']], prompt: str, metadata: completion_create_params.Metadata | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, temperature: float | NotGiven=…, top_k: int | NotGiven=…, top_p: float | NotGiven=…, extra_heade… - changed:
method Completions.create(*, max_tokens_to_sample: int, model: Union[str, Literal['claude-2.1', 'claude-instant-1']], prompt: str, metadata: completion_create_params.Metadata | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, temperature: float | NotGiven=…, top_k: int | NotGiven=…, top_p: float | NotGiven=…, extra_headers: Headers | None=…, extra_query: Qu… → method Completions.create(*, max_tokens_to_sample: int, model: Union[str, Literal['claude-3-opus-20240229', 'claude-2.1', 'claude-instant-1']], prompt: str, metadata: completion_create_params.Metadata | NotGiven=…, stop_sequences: List[str] | NotGiven=…, stream: Literal[False] | NotGiven=…, temperature: float | NotGiven=…, top_k: int | NotGiven=…, top_p: float | NotGiven=…, extra_headers: Headers…
- added:
export ImageBlockParam
- changed:
field CompletionCreateParamsBase.model: Required[Union[str, Literal['claude-2.1', 'claude-instant-1']]] → field CompletionCreateParamsBase.model: Required[Union[str, Literal['claude-3-opus-20240229', 'claude-2.1', 'claude-instant-1']]]
- added:
class ImageBlockParam(TypedDict) - added:
class Source(TypedDict) - added:
field ImageBlockParam.source: Required[Source] - added:
field ImageBlockParam.type: Literal['image'] - added:
field Source.data: Required[Annotated[Union[str, Base64FileInput], PropertyInfo(format=base64)]] - added:
field Source.media_type: Required[Literal['image/jpeg', 'image/png', 'image/gif', 'image/webp']] - added:
field Source.type: Literal['base64']
- changed:
field MessageParam.content: Required[Union[str, Iterable[Union[TextBlockParam, ContentBlock]]]] → field MessageParam.content: Required[Union[str, Iterable[Union[TextBlockParam, ImageBlockParam, ContentBlock]]]]