Skip to content

Commit 2521cd8

Browse files
committed
fix(types): add aliases back for web search tool types
1 parent fb152d9 commit 2521cd8

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

src/openai/types/responses/tool.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
from typing import Dict, List, Union, Optional
44
from typing_extensions import Literal, Annotated, TypeAlias
55

6+
from . import web_search_tool
67
from ..._utils import PropertyInfo
78
from ..._models import BaseModel
89
from .custom_tool import CustomTool
@@ -30,6 +31,8 @@
3031
"LocalShell",
3132
]
3233

34+
WebSearchToolFilters = web_search_tool.Filters
35+
WebSearchToolUserLocation = web_search_tool.UserLocation
3336

3437
class McpAllowedToolsMcpToolFilter(BaseModel):
3538
read_only: Optional[bool] = None

src/openai/types/responses/tool_param.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
from typing import Dict, Union, Optional
66
from typing_extensions import Literal, Required, TypeAlias, TypedDict
77

8+
from . import web_search_tool_param
89
from ..chat import ChatCompletionFunctionToolParam
910
from ..._types import SequenceNotStr
1011
from .custom_tool_param import CustomToolParam
@@ -31,6 +32,9 @@
3132
"LocalShell",
3233
]
3334

35+
WebSearchTool = web_search_tool_param.WebSearchToolParam
36+
WebSearchToolFilters = web_search_tool_param.Filters
37+
WebSearchToolUserLocation = web_search_tool_param.UserLocation
3438

3539
class McpAllowedToolsMcpToolFilter(TypedDict, total=False):
3640
read_only: bool

0 commit comments

Comments
 (0)