Skip to content

Commit c6499b9

Browse files
release: 0.82.0 (#1186)
* codegen metadata * codegen metadata * feat(api): fix shared UserLocation and error code types * fix: add backward-compat aliases for removed nested UserLocation classes (#1409) * release: 0.82.0 --------- Co-authored-by: stainless-app[bot] <142633134+stainless-app[bot]@users.noreply.github.com> Co-authored-by: Packy Gallagher <[email protected]>
1 parent acc4720 commit c6499b9

13 files changed

+73
-74
lines changed

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.81.0"
2+
".": "0.82.0"
33
}

.stats.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
configured_endpoints: 34
22
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic%2Fanthropic-5387c517ad6a3b9790063962c2956476b24a17d163c68c8d091367f6db8cf4ed.yml
33
openapi_spec_hash: 13d3d0a8e62a955b8b4df99c18d387d0
4-
config_hash: 4f1b01a1e5768795f83a32fb65c24c06
4+
config_hash: 4e204fead5f0af80eb9effa1d1e34dca

CHANGELOG.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,18 @@
11
# Changelog
22

3+
## 0.82.0 (2026-02-18)
4+
5+
Full Changelog: [v0.81.0...v0.82.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.81.0...v0.82.0)
6+
7+
### Features
8+
9+
* **api:** fix shared UserLocation and error code types ([da3b931](https://github.com/anthropics/anthropic-sdk-python/commit/da3b931a2be768d77c228a4804d2f7f75caeb71c))
10+
11+
12+
### Bug Fixes
13+
14+
* add backward-compat aliases for removed nested UserLocation classes ([#1409](https://github.com/anthropics/anthropic-sdk-python/issues/1409)) ([56db1e3](https://github.com/anthropics/anthropic-sdk-python/commit/56db1e3db6108e1c0f4e9363a5f23b54976dc877))
15+
316
## 0.81.0 (2026-02-18)
417

518
Full Changelog: [v0.80.0...v0.81.0](https://github.com/anthropics/anthropic-sdk-python/compare/v0.80.0...v0.81.0)

api.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ from anthropic.types import (
156156
URLImageSource,
157157
URLPDFSource,
158158
Usage,
159+
UserLocation,
159160
WebFetchBlock,
160161
WebFetchBlockParam,
161162
WebFetchTool20250910,
@@ -175,6 +176,7 @@ from anthropic.types import (
175176
WebSearchToolResultBlockParam,
176177
WebSearchToolResultBlockParamContent,
177178
WebSearchToolResultError,
179+
WebSearchToolResultErrorCode,
178180
MessageStreamEvent,
179181
MessageStartEvent,
180182
MessageDeltaEvent,

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "anthropic"
3-
version = "0.81.0"
3+
version = "0.82.0"
44
description = "The official Python library for the anthropic API"
55
dynamic = ["readme"]
66
license = "MIT"

src/anthropic/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
22

33
__title__ = "anthropic"
4-
__version__ = "0.81.0" # x-release-please-version
4+
__version__ = "0.82.0" # x-release-please-version

src/anthropic/types/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@
6767
from .message_start_event import MessageStartEvent as MessageStartEvent
6868
from .output_config_param import OutputConfigParam as OutputConfigParam
6969
from .text_citation_param import TextCitationParam as TextCitationParam
70+
from .user_location_param import UserLocationParam as UserLocationParam
7071
from .anthropic_beta_param import AnthropicBetaParam as AnthropicBetaParam
7172
from .beta_not_found_error import BetaNotFoundError as BetaNotFoundError
7273
from .document_block_param import DocumentBlockParam as DocumentBlockParam
@@ -159,6 +160,7 @@
159160
from .server_tool_caller_20260120_param import ServerToolCaller20260120Param as ServerToolCaller20260120Param
160161
from .web_fetch_tool_result_block_param import WebFetchToolResultBlockParam as WebFetchToolResultBlockParam
161162
from .web_fetch_tool_result_error_block import WebFetchToolResultErrorBlock as WebFetchToolResultErrorBlock
163+
from .web_search_tool_result_error_code import WebSearchToolResultErrorCode as WebSearchToolResultErrorCode
162164
from .code_execution_tool_20250522_param import CodeExecutionTool20250522Param as CodeExecutionTool20250522Param
163165
from .code_execution_tool_20250825_param import CodeExecutionTool20250825Param as CodeExecutionTool20250825Param
164166
from .code_execution_tool_20260120_param import CodeExecutionTool20260120Param as CodeExecutionTool20260120Param
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2+
3+
from __future__ import annotations
4+
5+
from typing import Optional
6+
from typing_extensions import Literal, Required, TypedDict
7+
8+
__all__ = ["UserLocationParam"]
9+
10+
11+
class UserLocationParam(TypedDict, total=False):
12+
type: Required[Literal["approximate"]]
13+
14+
city: Optional[str]
15+
"""The city of the user."""
16+
17+
country: Optional[str]
18+
"""
19+
The two letter
20+
[ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
21+
user.
22+
"""
23+
24+
region: Optional[str]
25+
"""The region of the user."""
26+
27+
timezone: Optional[str]
28+
"""The [IANA timezone](https://nodatime.org/TimeZones) of the user."""

src/anthropic/types/web_search_tool_20250305_param.py

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,12 @@
66
from typing_extensions import Literal, Required, TypedDict
77

88
from .._types import SequenceNotStr
9+
from .user_location_param import UserLocationParam
910
from .cache_control_ephemeral_param import CacheControlEphemeralParam
1011

1112
__all__ = ["WebSearchTool20250305Param", "UserLocation"]
1213

1314

14-
class UserLocation(TypedDict, total=False):
15-
"""Parameters for the user's location.
16-
17-
Used to provide more relevant search results.
18-
"""
19-
20-
type: Required[Literal["approximate"]]
21-
22-
city: Optional[str]
23-
"""The city of the user."""
24-
25-
country: Optional[str]
26-
"""
27-
The two letter
28-
[ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
29-
user.
30-
"""
31-
32-
region: Optional[str]
33-
"""The region of the user."""
34-
35-
timezone: Optional[str]
36-
"""The [IANA timezone](https://nodatime.org/TimeZones) of the user."""
37-
38-
3915
class WebSearchTool20250305Param(TypedDict, total=False):
4016
name: Required[Literal["web_search"]]
4117
"""Name of the tool.
@@ -74,8 +50,11 @@ class WebSearchTool20250305Param(TypedDict, total=False):
7450
strict: bool
7551
"""When true, guarantees schema validation on tool names and inputs"""
7652

77-
user_location: Optional[UserLocation]
53+
user_location: Optional[UserLocationParam]
7854
"""Parameters for the user's location.
7955
8056
Used to provide more relevant search results.
8157
"""
58+
59+
60+
UserLocation = UserLocationParam # backward compat alias

src/anthropic/types/web_search_tool_20260209_param.py

Lines changed: 5 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,36 +6,12 @@
66
from typing_extensions import Literal, Required, TypedDict
77

88
from .._types import SequenceNotStr
9+
from .user_location_param import UserLocationParam
910
from .cache_control_ephemeral_param import CacheControlEphemeralParam
1011

1112
__all__ = ["WebSearchTool20260209Param", "UserLocation"]
1213

1314

14-
class UserLocation(TypedDict, total=False):
15-
"""Parameters for the user's location.
16-
17-
Used to provide more relevant search results.
18-
"""
19-
20-
type: Required[Literal["approximate"]]
21-
22-
city: Optional[str]
23-
"""The city of the user."""
24-
25-
country: Optional[str]
26-
"""
27-
The two letter
28-
[ISO country code](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) of the
29-
user.
30-
"""
31-
32-
region: Optional[str]
33-
"""The region of the user."""
34-
35-
timezone: Optional[str]
36-
"""The [IANA timezone](https://nodatime.org/TimeZones) of the user."""
37-
38-
3915
class WebSearchTool20260209Param(TypedDict, total=False):
4016
name: Required[Literal["web_search"]]
4117
"""Name of the tool.
@@ -74,8 +50,11 @@ class WebSearchTool20260209Param(TypedDict, total=False):
7450
strict: bool
7551
"""When true, guarantees schema validation on tool names and inputs"""
7652

77-
user_location: Optional[UserLocation]
53+
user_location: Optional[UserLocationParam]
7854
"""Parameters for the user's location.
7955
8056
Used to provide more relevant search results.
8157
"""
58+
59+
60+
UserLocation = UserLocationParam # backward compat alias

0 commit comments

Comments
 (0)