Skip to content

Commit 89751ce

Browse files
committed
up
1 parent 1e59fce commit 89751ce

File tree

4 files changed

+14
-14
lines changed

4 files changed

+14
-14
lines changed

pydantic_ai_slim/pydantic_ai/builtin_tools.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,7 +222,7 @@ class WebFetchTool(AbstractBuiltinTool):
222222
* Anthropic
223223
"""
224224

225-
kind: str = 'url_context'
225+
kind: str = 'web_fetch'
226226
"""The kind of tool."""
227227

228228

tests/models/test_anthropic.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3648,13 +3648,13 @@ async def test_anthropic_web_fetch_tool(allow_model_requests: None, anthropic_ap
36483648
provider_name='anthropic',
36493649
),
36503650
BuiltinToolCallPart(
3651-
tool_name='url_context',
3651+
tool_name='web_fetch',
36523652
args={'url': 'https://ai.pydantic.dev'},
36533653
tool_call_id=IsStr(),
36543654
provider_name='anthropic',
36553655
),
36563656
BuiltinToolReturnPart(
3657-
tool_name='url_context',
3657+
tool_name='web_fetch',
36583658
content={
36593659
'content': {
36603660
'citations': None,
@@ -3729,13 +3729,13 @@ async def test_anthropic_web_fetch_tool(allow_model_requests: None, anthropic_ap
37293729
provider_name='anthropic',
37303730
),
37313731
BuiltinToolCallPart(
3732-
tool_name='url_context',
3732+
tool_name='web_fetch',
37333733
args={'url': 'https://ai.pydantic.dev'},
37343734
tool_call_id=IsStr(),
37353735
provider_name='anthropic',
37363736
),
37373737
BuiltinToolReturnPart(
3738-
tool_name='url_context',
3738+
tool_name='web_fetch',
37393739
content={
37403740
'content': {
37413741
'citations': None,
@@ -3890,13 +3890,13 @@ async def test_anthropic_web_fetch_tool_stream(
38903890
provider_name='anthropic',
38913891
),
38923892
BuiltinToolCallPart(
3893-
tool_name='url_context',
3893+
tool_name='web_fetch',
38943894
args='{"url": "https://ai.pydantic.dev"}',
38953895
tool_call_id=IsStr(),
38963896
provider_name='anthropic',
38973897
),
38983898
BuiltinToolReturnPart(
3899-
tool_name='url_context',
3899+
tool_name='web_fetch',
39003900
content={
39013901
'content': {
39023902
'citations': None,
@@ -3975,7 +3975,7 @@ async def test_anthropic_web_fetch_tool_stream(
39753975
),
39763976
PartStartEvent(
39773977
index=1,
3978-
part=BuiltinToolCallPart(tool_name='url_context', tool_call_id=IsStr(), provider_name='anthropic'),
3978+
part=BuiltinToolCallPart(tool_name='web_fetch', tool_call_id=IsStr(), provider_name='anthropic'),
39793979
previous_part_kind='thinking',
39803980
),
39813981
PartDeltaEvent(
@@ -4002,7 +4002,7 @@ async def test_anthropic_web_fetch_tool_stream(
40024002
PartStartEvent(
40034003
index=2,
40044004
part=BuiltinToolReturnPart(
4005-
tool_name='url_context',
4005+
tool_name='web_fetch',
40064006
content={
40074007
'content': {
40084008
'citations': None,
@@ -4927,7 +4927,7 @@ async def test_anthropic_mcp_servers_stream(allow_model_requests: None, anthropi
49274927
The framework provides a unified interface for integrating with various LLM providers, including OpenAI, Anthropic, Google, Groq, Cohere, Mistral, Bedrock, and HuggingFace. Each model integration follows a consistent settings pattern with provider-specific prefixes (e.g., `google_*`, `anthropic_*`). \n\
49284928
49294929
Examples of supported models and their capabilities include:
4930-
* `GoogleModel`: Integrates with Google's Gemini API, supporting both Gemini API (`google-gla`) and Vertex AI (`google-vertex`) providers. It supports token counting, streaming, built-in tools like `WebSearchTool`, `WebFetchTool`, `CodeExecutionTool`, and native JSON schema output. \n\
4930+
* `GoogleModel`: Integrates with Google's Gemini API, supporting both Gemini API (`google-gla`) and Vertex AI (`google-vertex`) providers. It supports token counting, streaming, built-in tools like `WebSearchTool`, `UrlContextTool`, `CodeExecutionTool`, and native JSON schema output. \n\
49314931
* `AnthropicModel`: Uses Anthropic's beta API for advanced features like "Thinking Blocks" and built-in tools. \n\
49324932
* `GroqModel`: Offers high-speed inference and specialized reasoning support with configurable reasoning formats. \n\
49334933
* `MistralModel`: Supports customizable JSON schema prompting and thinking support. \n\
@@ -4944,7 +4944,7 @@ async def test_anthropic_mcp_servers_stream(allow_model_requests: None, anthropi
49444944
49454945
Tools can return various types of output, including anything Pydantic can serialize to JSON, as well as multimodal content like `AudioUrl`, `VideoUrl`, `ImageUrl`, or `DocumentUrl`. The `ToolReturn` object allows for separating the `return_value` (for the model), `content` (for additional context), and `metadata` (for application-specific use). \n\
49464946
4947-
Built-in tools like `WebFetchTool` allow agents to pull web content into their context. \n\
4947+
Built-in tools like `UrlContextTool` allow agents to pull web content into their context. \n\
49484948
49494949
### 5. Output Handling
49504950
The framework supports various output types:

tests/models/test_model_request_parameters.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ def test_model_request_parameters_are_serializable():
8181
},
8282
{'kind': 'code_execution'},
8383
{
84-
'kind': 'url_context',
84+
'kind': 'web_fetch',
8585
'max_uses': None,
8686
'allowed_domains': None,
8787
'blocked_domains': None,

tests/test_builtin_tools.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import pytest
44

55
from pydantic_ai.agent import Agent
6-
from pydantic_ai.builtin_tools import ( # pyright: ignore[reportDeprecated]
6+
from pydantic_ai.builtin_tools import (
77
CodeExecutionTool,
8-
UrlContextTool,
8+
UrlContextTool, # pyright: ignore[reportDeprecated]
99
WebSearchTool,
1010
)
1111
from pydantic_ai.exceptions import UserError

0 commit comments

Comments
 (0)