From 57e568b222695ff116d1828ffc396c59e0ec10d4 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Wed, 14 May 2025 11:00:28 +0200 Subject: [PATCH 01/34] Add `builtin_tools` to `Agent` --- pydantic_ai_slim/pydantic_ai/_agent_graph.py | 3 + pydantic_ai_slim/pydantic_ai/agent.py | 15 ++++ pydantic_ai_slim/pydantic_ai/builtin_tools.py | 74 +++++++++++++++++++ .../pydantic_ai/models/__init__.py | 3 + pydantic_ai_slim/pydantic_ai/models/openai.py | 33 +++++++++ 5 files changed, 128 insertions(+) create mode 100644 pydantic_ai_slim/pydantic_ai/builtin_tools.py diff --git a/pydantic_ai_slim/pydantic_ai/_agent_graph.py b/pydantic_ai_slim/pydantic_ai/_agent_graph.py index 16aedac89..ff15f8db0 100644 --- a/pydantic_ai_slim/pydantic_ai/_agent_graph.py +++ b/pydantic_ai_slim/pydantic_ai/_agent_graph.py @@ -12,6 +12,7 @@ from opentelemetry.trace import Tracer from typing_extensions import TypeGuard, TypeVar, assert_never +from pydantic_ai.builtin_tools import AbstractBuiltinTool from pydantic_graph import BaseNode, Graph, GraphRunContext from pydantic_graph.nodes import End, NodeRunEndT @@ -92,6 +93,7 @@ class GraphAgentDeps(Generic[DepsT, OutputDataT]): output_validators: list[_output.OutputValidator[DepsT, OutputDataT]] function_tools: dict[str, Tool[DepsT]] = dataclasses.field(repr=False) + builtin_tools: list[AbstractBuiltinTool] = dataclasses.field(repr=False) mcp_servers: Sequence[MCPServer] = dataclasses.field(repr=False) default_retries: int @@ -242,6 +244,7 @@ async def add_mcp_server_tools(server: MCPServer) -> None: output_schema = ctx.deps.output_schema return models.ModelRequestParameters( function_tools=function_tool_defs, + builtin_tools=ctx.deps.builtin_tools, allow_text_output=allow_text_output(output_schema), output_tools=output_schema.tool_defs() if output_schema is not None else [], ) diff --git a/pydantic_ai_slim/pydantic_ai/agent.py b/pydantic_ai_slim/pydantic_ai/agent.py index 0d17c04a0..ef55424fb 100644 --- a/pydantic_ai_slim/pydantic_ai/agent.py +++ b/pydantic_ai_slim/pydantic_ai/agent.py @@ -14,6 +14,7 @@ from pydantic.json_schema import GenerateJsonSchema from typing_extensions import Literal, Never, Self, TypeIs, TypeVar, deprecated +from pydantic_ai.builtin_tools import AbstractBuiltinTool, WebSearchTool from pydantic_graph import End, Graph, GraphRun, GraphRunContext from pydantic_graph._utils import get_event_loop @@ -172,6 +173,7 @@ def __init__( retries: int = 1, output_retries: int | None = None, tools: Sequence[Tool[AgentDepsT] | ToolFuncEither[AgentDepsT, ...]] = (), + builtin_tools: Sequence[Literal['web-search'] | AbstractBuiltinTool] = (), mcp_servers: Sequence[MCPServer] = (), defer_model_check: bool = False, end_strategy: EndStrategy = 'early', @@ -200,6 +202,7 @@ def __init__( result_tool_description: str | None = None, result_retries: int | None = None, tools: Sequence[Tool[AgentDepsT] | ToolFuncEither[AgentDepsT, ...]] = (), + builtin_tools: Sequence[Literal['web-search'] | AbstractBuiltinTool] = (), mcp_servers: Sequence[MCPServer] = (), defer_model_check: bool = False, end_strategy: EndStrategy = 'early', @@ -223,6 +226,7 @@ def __init__( retries: int = 1, output_retries: int | None = None, tools: Sequence[Tool[AgentDepsT] | ToolFuncEither[AgentDepsT, ...]] = (), + builtin_tools: Sequence[Literal['web-search'] | AbstractBuiltinTool] = (), mcp_servers: Sequence[MCPServer] = (), defer_model_check: bool = False, end_strategy: EndStrategy = 'early', @@ -251,6 +255,8 @@ def __init__( output_retries: The maximum number of retries to allow for result validation, defaults to `retries`. tools: Tools to register with the agent, you can also register tools via the decorators [`@agent.tool`][pydantic_ai.Agent.tool] and [`@agent.tool_plain`][pydantic_ai.Agent.tool_plain]. + builtin_tools: The builtin tools that the agent will use. This depends on the model, as some models may not + support certain tools. On models that don't support certain tools, the tool will be ignored. mcp_servers: MCP servers to register with the agent. You should register a [`MCPServer`][pydantic_ai.mcp.MCPServer] for each server you want the agent to connect to. defer_model_check: by default, if you provide a [named][pydantic_ai.models.KnownModelName] model, @@ -334,6 +340,14 @@ def __init__( self._default_retries = retries self._max_result_retries = output_retries if output_retries is not None else retries self._mcp_servers = mcp_servers + self._builtin_tools: list[AbstractBuiltinTool] = [] + + for tool in builtin_tools: + if tool == 'web-search': + self._builtin_tools.append(WebSearchTool()) + else: + self._builtin_tools.append(tool) + for tool in tools: if isinstance(tool, Tool): self._register_tool(tool) @@ -688,6 +702,7 @@ async def get_instructions(run_context: RunContext[AgentDepsT]) -> str | None: output_schema=output_schema, output_validators=output_validators, function_tools=self._function_tools, + builtin_tools=self._builtin_tools, mcp_servers=self._mcp_servers, default_retries=self._default_retries, tracer=tracer, diff --git a/pydantic_ai_slim/pydantic_ai/builtin_tools.py b/pydantic_ai_slim/pydantic_ai/builtin_tools.py new file mode 100644 index 000000000..36e2194f0 --- /dev/null +++ b/pydantic_ai_slim/pydantic_ai/builtin_tools.py @@ -0,0 +1,74 @@ +from __future__ import annotations as _annotations + +from abc import ABC +from dataclasses import dataclass, field +from typing import Literal + +from typing_extensions import TypedDict + +__all__ = ('AbstractBuiltinTool', 'WebSearchTool', 'UserLocation') + + +class AbstractBuiltinTool(ABC): + """A builtin tool that can be used by an agent. + + This class is abstract and cannot be instantiated directly. + """ + + +class UserLocation(TypedDict, total=False): + """Allows you to localize search results based on a user's location. + + Supported by: + * Anthropic + * OpenAI + """ + + city: str + country: str + region: str + timezone: str + + +@dataclass +class WebSearchTool(AbstractBuiltinTool): + """A builtin tool that allows your agent to search the web for information. + + The parameters that PydanticAI passes depend on the model, as some parameters may not be supported by certain models. + """ + + search_context_size: Literal['low', 'medium', 'high'] = 'medium' + """The `search_context_size` parameter controls how much context is retrieved from the web to help the tool formulate a response. + + Supported by: + * OpenAI + """ + + user_location: UserLocation = field(default_factory=UserLocation) + """The `user_location` parameter allows you to localize search results based on a user's location. + + Supported by: + * Anthropic + * OpenAI + """ + + blocked_domains: list[str] | None = None + """If provided, these domains will never appear in results. + + With Anthropic, you can only use one of `blocked_domains` or `allowed_domains`, not both. + + Supported by: + * Anthropic (https://docs.anthropic.com/en/docs/build-with-claude/tool-use/web-search-tool#domain-filtering) + * Groq (https://console.groq.com/docs/agentic-tooling#search-settings) + * MistralAI + """ + + allowed_domains: list[str] | None = None + """If provided, only these domains will be included in results. + + With Anthropic, you can only use one of `blocked_domains` or `allowed_domains`, not both. + + Supported by: + * Anthropic (https://docs.anthropic.com/en/docs/build-with-claude/tool-use/web-search-tool#domain-filtering) + * Groq (https://console.groq.com/docs/agentic-tooling#search-settings) + """ diff --git a/pydantic_ai_slim/pydantic_ai/models/__init__.py b/pydantic_ai_slim/pydantic_ai/models/__init__.py index b0b666ed0..f81d03abb 100644 --- a/pydantic_ai_slim/pydantic_ai/models/__init__.py +++ b/pydantic_ai_slim/pydantic_ai/models/__init__.py @@ -16,6 +16,8 @@ import httpx from typing_extensions import Literal, TypeAliasType +from pydantic_ai.builtin_tools import AbstractBuiltinTool + from .._parts_manager import ModelResponsePartsManager from ..exceptions import UserError from ..messages import ModelMessage, ModelRequest, ModelResponse, ModelResponseStreamEvent @@ -261,6 +263,7 @@ class ModelRequestParameters: """Configuration for an agent's request to a model, specifically related to tools and output handling.""" function_tools: list[ToolDefinition] = field(default_factory=list) + builtin_tools: list[AbstractBuiltinTool] = field(default_factory=list) allow_text_output: bool = True output_tools: list[ToolDefinition] = field(default_factory=list) diff --git a/pydantic_ai_slim/pydantic_ai/models/openai.py b/pydantic_ai_slim/pydantic_ai/models/openai.py index 8092226e1..aba46e351 100644 --- a/pydantic_ai_slim/pydantic_ai/models/openai.py +++ b/pydantic_ai_slim/pydantic_ai/models/openai.py @@ -11,6 +11,7 @@ from typing_extensions import assert_never +from pydantic_ai.builtin_tools import WebSearchTool from pydantic_ai.providers import Provider, infer_provider from .. import ModelHTTPError, UnexpectedModelBehavior, _utils, usage @@ -58,6 +59,11 @@ from openai.types.chat.chat_completion_content_part_image_param import ImageURL from openai.types.chat.chat_completion_content_part_input_audio_param import InputAudio from openai.types.chat.chat_completion_content_part_param import File, FileFile + from openai.types.chat.completion_create_params import ( + WebSearchOptions, + WebSearchOptionsUserLocation, + WebSearchOptionsUserLocationApproximate, + ) from openai.types.responses import ComputerToolParam, FileSearchToolParam, WebSearchToolParam from openai.types.responses.response_input_param import FunctionCallOutput, Message from openai.types.shared import ReasoningEffort @@ -254,6 +260,7 @@ async def _completions_create( model_request_parameters: ModelRequestParameters, ) -> chat.ChatCompletion | AsyncStream[ChatCompletionChunk]: tools = self._get_tools(model_request_parameters) + web_search_options = self._get_web_search_options(model_request_parameters) # standalone function to make it easier to override if not tools: @@ -288,6 +295,7 @@ async def _completions_create( logit_bias=model_settings.get('logit_bias', NOT_GIVEN), reasoning_effort=model_settings.get('openai_reasoning_effort', NOT_GIVEN), user=model_settings.get('openai_user', NOT_GIVEN), + web_search_options=web_search_options or NOT_GIVEN, extra_headers=extra_headers, extra_body=model_settings.get('extra_body'), ) @@ -327,6 +335,17 @@ def _get_tools(self, model_request_parameters: ModelRequestParameters) -> list[c tools += [self._map_tool_definition(r) for r in model_request_parameters.output_tools] return tools + def _get_web_search_options(self, model_request_parameters: ModelRequestParameters) -> WebSearchOptions | None: + for tool in model_request_parameters.builtin_tools: + if isinstance(tool, WebSearchTool): + return WebSearchOptions( + search_context_size=tool.search_context_size, + user_location=WebSearchOptionsUserLocation( + type='approximate', + approximate=WebSearchOptionsUserLocationApproximate(**tool.user_location), + ), + ) + async def _map_messages(self, messages: list[ModelMessage]) -> list[chat.ChatCompletionMessageParam]: """Just maps a `pydantic_ai.Message` to a `openai.types.ChatCompletionMessageParam`.""" openai_messages: list[chat.ChatCompletionMessageParam] = [] @@ -601,6 +620,7 @@ async def _responses_create( ) -> responses.Response | AsyncStream[responses.ResponseStreamEvent]: tools = self._get_tools(model_request_parameters) tools = list(model_settings.get('openai_builtin_tools', [])) + tools + tools = self._get_builtin_tools(model_request_parameters) + tools # standalone function to make it easier to override if not tools: @@ -653,6 +673,19 @@ def _get_tools(self, model_request_parameters: ModelRequestParameters) -> list[r tools += [self._map_tool_definition(r) for r in model_request_parameters.output_tools] return tools + def _get_builtin_tools(self, model_request_parameters: ModelRequestParameters) -> list[responses.ToolParam]: + tools: list[responses.ToolParam] = [] + for tool in model_request_parameters.builtin_tools: + if isinstance(tool, WebSearchTool): + tools.append( + responses.WebSearchToolParam( + type='web_search_preview', + search_context_size=tool.search_context_size, + user_location={'type': 'approximate', **tool.user_location}, + ) + ) + return tools + @staticmethod def _map_tool_definition(f: ToolDefinition) -> responses.FunctionToolParam: return { From 97ab44b028edd885da81f433b07feae1c06672b6 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Wed, 14 May 2025 14:06:52 +0200 Subject: [PATCH 02/34] make AbstractBuiltinTool serializable --- pydantic_ai_slim/pydantic_ai/builtin_tools.py | 1 + tests/models/test_model_request_parameters.py | 1 + 2 files changed, 2 insertions(+) diff --git a/pydantic_ai_slim/pydantic_ai/builtin_tools.py b/pydantic_ai_slim/pydantic_ai/builtin_tools.py index 36e2194f0..43062ec48 100644 --- a/pydantic_ai_slim/pydantic_ai/builtin_tools.py +++ b/pydantic_ai_slim/pydantic_ai/builtin_tools.py @@ -9,6 +9,7 @@ __all__ = ('AbstractBuiltinTool', 'WebSearchTool', 'UserLocation') +@dataclass class AbstractBuiltinTool(ABC): """A builtin tool that can be used by an agent. diff --git a/tests/models/test_model_request_parameters.py b/tests/models/test_model_request_parameters.py index 03910db11..abba5ae54 100644 --- a/tests/models/test_model_request_parameters.py +++ b/tests/models/test_model_request_parameters.py @@ -7,6 +7,7 @@ def test_model_request_parameters_are_serializable(): params = ModelRequestParameters(function_tools=[], allow_text_output=False, output_tools=[]) assert TypeAdapter(ModelRequestParameters).dump_python(params) == { 'function_tools': [], + 'builtin_tools': [], 'allow_text_output': False, 'output_tools': [], } From e3dda9d83915f67c313c0547777df4c9715ab1b0 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Wed, 14 May 2025 17:17:59 +0200 Subject: [PATCH 03/34] Add more work on it --- pydantic_ai_slim/pydantic_ai/builtin_tools.py | 9 + .../pydantic_ai/models/anthropic.py | 26 +- pydantic_ai_slim/pydantic_ai/models/gemini.py | 1 + pydantic_ai_slim/pydantic_ai/models/groq.py | 1 + pydantic_ai_slim/pydantic_ai/models/openai.py | 31 +- .../test_anthropic_web_search_tool.yaml | 196 +++++++++++++ .../test_groq_model_web_search_tool.yaml | 273 ++++++++++++++++++ .../test_openai_web_search_tool.yaml | 79 +++++ ...i_web_search_tool_model_not_supported.yaml | 57 ++++ ...ai_web_search_tool_with_user_location.yaml | 91 ++++++ ...penai_responses_model_web_search_tool.yaml | 114 ++++++++ ...el_web_search_tool_with_user_location.yaml | 118 ++++++++ tests/models/test_anthropic.py | 12 + tests/models/test_groq.py | 14 + tests/models/test_openai.py | 51 ++++ tests/models/test_openai_responses.py | 53 ++++ 16 files changed, 1111 insertions(+), 15 deletions(-) create mode 100644 tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml create mode 100644 tests/models/cassettes/test_groq/test_groq_model_web_search_tool.yaml create mode 100644 tests/models/cassettes/test_openai/test_openai_web_search_tool.yaml create mode 100644 tests/models/cassettes/test_openai/test_openai_web_search_tool_model_not_supported.yaml create mode 100644 tests/models/cassettes/test_openai/test_openai_web_search_tool_with_user_location.yaml create mode 100644 tests/models/cassettes/test_openai_responses/test_openai_responses_model_web_search_tool.yaml create mode 100644 tests/models/cassettes/test_openai_responses/test_openai_responses_model_web_search_tool_with_user_location.yaml diff --git a/pydantic_ai_slim/pydantic_ai/builtin_tools.py b/pydantic_ai_slim/pydantic_ai/builtin_tools.py index 43062ec48..6c22fbcff 100644 --- a/pydantic_ai_slim/pydantic_ai/builtin_tools.py +++ b/pydantic_ai_slim/pydantic_ai/builtin_tools.py @@ -14,6 +14,8 @@ class AbstractBuiltinTool(ABC): """A builtin tool that can be used by an agent. This class is abstract and cannot be instantiated directly. + + The builtin tools are are passed to the model as part of the `ModelRequestParameters`. """ @@ -73,3 +75,10 @@ class WebSearchTool(AbstractBuiltinTool): * Anthropic (https://docs.anthropic.com/en/docs/build-with-claude/tool-use/web-search-tool#domain-filtering) * Groq (https://console.groq.com/docs/agentic-tooling#search-settings) """ + + max_uses: int | None = None + """If provided, the tool will stop searching the web after the given number of uses. + + Supported by: + * Anthropic + """ diff --git a/pydantic_ai_slim/pydantic_ai/models/anthropic.py b/pydantic_ai_slim/pydantic_ai/models/anthropic.py index 30c5fe7eb..481168cd2 100644 --- a/pydantic_ai_slim/pydantic_ai/models/anthropic.py +++ b/pydantic_ai_slim/pydantic_ai/models/anthropic.py @@ -8,8 +8,12 @@ from json import JSONDecodeError, loads as json_loads from typing import Any, Literal, Union, cast, overload +from anthropic.types import ServerToolUseBlock, ToolUnionParam, WebSearchTool20250305Param, WebSearchToolResultBlock +from anthropic.types.web_search_tool_20250305_param import UserLocation from typing_extensions import assert_never +from pydantic_ai.builtin_tools import WebSearchTool + from .. import ModelHTTPError, UnexpectedModelBehavior, _utils, usage from .._utils import guard_tool_call_id as _guard_tool_call_id from ..messages import ( @@ -207,6 +211,7 @@ async def _messages_create( ) -> AnthropicMessage | AsyncStream[RawMessageStreamEvent]: # standalone function to make it easier to override tools = self._get_tools(model_request_parameters) + tools += self._get_builtin_tools(model_request_parameters) tool_choice: ToolChoiceParam | None if not tools: @@ -252,8 +257,11 @@ def _process_response(self, response: AnthropicMessage) -> ModelResponse: for item in response.content: if isinstance(item, TextBlock): items.append(TextPart(content=item.text)) + if isinstance(item, WebSearchToolResultBlock): + # TODO(Marcelo): We should send something back to the user, because we need to send it back on the next request. + ... else: - assert isinstance(item, ToolUseBlock), 'unexpected item type' + assert isinstance(item, (ToolUseBlock, ServerToolUseBlock)), f'unexpected item type {type(item)}' items.append( ToolCallPart( tool_name=item.name, @@ -282,6 +290,22 @@ def _get_tools(self, model_request_parameters: ModelRequestParameters) -> list[T tools += [self._map_tool_definition(r) for r in model_request_parameters.output_tools] return tools + def _get_builtin_tools(self, model_request_parameters: ModelRequestParameters) -> list[ToolUnionParam]: + tools: list[ToolUnionParam] = [] + for tool in model_request_parameters.builtin_tools: + if isinstance(tool, WebSearchTool): + user_location = UserLocation(type='approximate', **tool.user_location) if tool.user_location else None + tools.append( + WebSearchTool20250305Param( + name='web_search', + type='web_search_20250305', + allowed_domains=tool.allowed_domains, + blocked_domains=tool.blocked_domains, + user_location=user_location, + ) + ) + return tools + async def _map_message(self, messages: list[ModelMessage]) -> tuple[str, list[MessageParam]]: """Just maps a `pydantic_ai.Message` to a `anthropic.types.MessageParam`.""" system_prompt_parts: list[str] = [] diff --git a/pydantic_ai_slim/pydantic_ai/models/gemini.py b/pydantic_ai_slim/pydantic_ai/models/gemini.py index 314757967..7fee3a5ed 100644 --- a/pydantic_ai_slim/pydantic_ai/models/gemini.py +++ b/pydantic_ai_slim/pydantic_ai/models/gemini.py @@ -173,6 +173,7 @@ def _customize_tool_def(t: ToolDefinition): return ModelRequestParameters( function_tools=[_customize_tool_def(tool) for tool in model_request_parameters.function_tools], + builtin_tools=model_request_parameters.builtin_tools, allow_text_output=model_request_parameters.allow_text_output, output_tools=[_customize_tool_def(tool) for tool in model_request_parameters.output_tools], ) diff --git a/pydantic_ai_slim/pydantic_ai/models/groq.py b/pydantic_ai_slim/pydantic_ai/models/groq.py index 2cf6b78b6..169fb06dc 100644 --- a/pydantic_ai_slim/pydantic_ai/models/groq.py +++ b/pydantic_ai_slim/pydantic_ai/models/groq.py @@ -234,6 +234,7 @@ def _process_response(self, response: chat.ChatCompletion) -> ModelResponse: timestamp = datetime.fromtimestamp(response.created, tz=timezone.utc) choice = response.choices[0] items: list[ModelResponsePart] = [] + # TODO(Marcelo): The `choice.message.executed_tools` has the server tools executed by Groq. if choice.message.content is not None: items.append(TextPart(content=choice.message.content)) if choice.message.tool_calls is not None: diff --git a/pydantic_ai_slim/pydantic_ai/models/openai.py b/pydantic_ai_slim/pydantic_ai/models/openai.py index aba46e351..bd2ed8ad2 100644 --- a/pydantic_ai_slim/pydantic_ai/models/openai.py +++ b/pydantic_ai_slim/pydantic_ai/models/openai.py @@ -278,7 +278,6 @@ async def _completions_create( return await self.client.chat.completions.create( model=self._model_name, messages=openai_messages, - n=1, parallel_tool_calls=model_settings.get('parallel_tool_calls', NOT_GIVEN), tools=tools or NOT_GIVEN, tool_choice=tool_choice or NOT_GIVEN, @@ -338,13 +337,15 @@ def _get_tools(self, model_request_parameters: ModelRequestParameters) -> list[c def _get_web_search_options(self, model_request_parameters: ModelRequestParameters) -> WebSearchOptions | None: for tool in model_request_parameters.builtin_tools: if isinstance(tool, WebSearchTool): - return WebSearchOptions( - search_context_size=tool.search_context_size, - user_location=WebSearchOptionsUserLocation( - type='approximate', - approximate=WebSearchOptionsUserLocationApproximate(**tool.user_location), - ), - ) + if tool.user_location: + return WebSearchOptions( + search_context_size=tool.search_context_size, + user_location=WebSearchOptionsUserLocation( + type='approximate', + approximate=WebSearchOptionsUserLocationApproximate(**tool.user_location), + ), + ) + return WebSearchOptions(search_context_size=tool.search_context_size) async def _map_messages(self, messages: list[ModelMessage]) -> list[chat.ChatCompletionMessageParam]: """Just maps a `pydantic_ai.Message` to a `openai.types.ChatCompletionMessageParam`.""" @@ -677,13 +678,14 @@ def _get_builtin_tools(self, model_request_parameters: ModelRequestParameters) - tools: list[responses.ToolParam] = [] for tool in model_request_parameters.builtin_tools: if isinstance(tool, WebSearchTool): - tools.append( - responses.WebSearchToolParam( - type='web_search_preview', - search_context_size=tool.search_context_size, - user_location={'type': 'approximate', **tool.user_location}, - ) + web_search_tool = responses.WebSearchToolParam( + type='web_search_preview', search_context_size=tool.search_context_size ) + if tool.user_location: + web_search_tool['user_location'] = responses.web_search_tool_param.UserLocation( + type='approximate', **tool.user_location + ) + tools.append(web_search_tool) return tools @staticmethod @@ -1112,6 +1114,7 @@ def _customize_tool_def(t: ToolDefinition): return ModelRequestParameters( function_tools=[_customize_tool_def(tool) for tool in model_request_parameters.function_tools], + builtin_tools=model_request_parameters.builtin_tools, allow_text_output=model_request_parameters.allow_text_output, output_tools=[_customize_tool_def(tool) for tool in model_request_parameters.output_tools], ) diff --git a/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml b/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml new file mode 100644 index 000000000..6aa1e7519 --- /dev/null +++ b/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml @@ -0,0 +1,196 @@ +interactions: +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '312' + content-type: + - application/json + host: + - api.anthropic.com + method: POST + parsed_body: + max_tokens: 1024 + messages: + - content: + - text: What day is today? + type: text + role: user + model: claude-3-5-sonnet-latest + stream: false + tool_choice: + type: auto + tools: + - allowed_domains: null + blocked_domains: null + name: web_search + type: web_search_20250305 + user_location: null + uri: https://api.anthropic.com/v1/messages + response: + headers: + connection: + - keep-alive + content-length: + - '25705' + content-type: + - application/json + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + parsed_body: + content: + - text: Let me search for today's date and any significant events. + type: text + - id: srvtoolu_01RhAr4gUKVGNh2F9DLT4WNY + input: + query: current date today May 14 2025 notable events + name: web_search + type: server_tool_use + - content: + - encrypted_content: EuwCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDENTQOMiruuPOENZYxoMwVvlhptGQ/WfhkJKIjDA0aujpCVZ7CzE9fpfZ8vEfn2pfxg384zlVeCpdeU2njTaFx6shdbgS/Wvm/JH00Aq7wFjNSSAjwRFMBTp5zqyULRPar0riRk0kNRf7HUi+hIwTpvSJ4sLgFzMeeVHo/0BRBy1355ugtI/auSOnlXmPVgXp6wTaL35BJwJ+8AMRoF9hf2NAwBhPEmPmtomsxJPv5z+MHEzEhc3VlE3xaSZvdcMRaBaV4UYFv+iEjbtUnOX93j/WkyuaJdiC8JhQz05FRzYr06NHHIt0s4nZ8mV1DhLJcHT629gMTYcQ1WohEQR/k0IlOim2EcOlnOdQ9jydrrBqSZcXiFj1md/+araQ5qN7vCSBK8wt7eV0yiWaMNcnY1+1ID7eTerKQaZOdAoMhgD + page_age: null + title: May 14, 2025 Calendar with Holidays & Count Down - USA + type: web_search_result + url: https://www.wincalendar.com/Calendar/Date/May-14-2025 + - encrypted_content: ErgLCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDJHVFtPE/ya+huasEhoMQSPb1dSwMrdh7YSIIjBNbA8bqpJm6SgBalw8iygcItghQyZny2MHi+KtOw6tATA27DwMSauaMAT8iyfL6FUquwoLofO1XezkCrC5RA8451ydQK1ehbA1eOiirPdywVtfH2WQ017pbT9+fNZCELd/Caxxuvu0yIgQs1X7/m2O/ijHxUUSW9PyszCz35KTGqlXXwTKlUxrp0tNApdrRu81bETresUb05CKQimiwN/9Jf4DgDUmIo5NiP9angpV1KiCv0oaepSWJ0BHmGAuASFfEoI7Dj7epTKSH/ieEn7/XzAjaXvQBK4ZU2lVbx+CTltGbnu9bi9tCfdPlyDSkGCYkkPezUvsA9MJhdS7dhO1lNN4Hb/8vd5O7itT5DgkBSwrV9KNNpvWNdojTDayc/ocf+tCp7lgf4dFkyLSkukCejxCJNeVc6XZIHitq2vpkjVoBbdwpa6ro7bJA5Fsib5u5oyD9s0G7hs40vRpz8q5CEnYLQpZmsxBCuQ3rt3M+7Y/kM29gY7tl0dG08v1gRtdc7XsrYxgLkVf04mjmoHCE8CK8Bh8X5oCrMs5KOTHIQoPh307AyPTo/t40MDjVwhmH1HmrraAQDD748dRqWCI8GWYwoYCFd9LCYrA+aMS1l9rbfI0bXso64OZxGu4mZLoci7s2DZF7xT4O2iVQD+kEEcxUCgkh6SnRljNlFsLq0i+JAnEoz2b5ryX12RgxMeIiSnntLZtikIOWED29tG6UaKxwT0vehfMSSb6U8bYWs3RvknRCMAxTC9xAvd1sC8JlBVaB/QUVhn+JsjVqleWG9o0d81gMO8JbKoTBoN8efbXNgFnAEhnAyrJxM9ighQct7EV3vDZvmKwkUZp4QW1qR2rJTZjWKScLms79U62WJLefB9LsDM87hb7aKWdGyO42vcy1TOWsa62EEIYO/2LYRvv9oXvKVTaq9HINybGXDaa2sOcw5uUsgnsdX80km7my44YsK/AK+NVXlsZyBEY7r6wRsosY0ThMO3w/RswV9mSzAV9wbZydVFZKsJGPcUYJGez8szdSkjec22gfqIrkSs9rxXej8rpjFF7qJZorWz9eLgQJHXbZGD+VvWfA5xOIehc0drEyKq1tv6+Xp7zMtK0I6my628dzj659W87kEyHtybQShffk8ot0skcqP4EVDdLfIJoe5pdmoCshJqkvsedbhZJRK77w5psP+V1i/ukLmiIwU/H7zY4gslfEqvgLU9maf+lagy48d7bCVAJqQbSkWl1i+M+/wS+74gTvkG2PTvqlCg9X5WKcyz78uejua/Cma6YE6aGdfZuNpUq7UFulyAWGX1hSi8+10rfxElABi/j6EC2eWeC8ohgZ8K+q3wy2jnQu0/tiGBcbhAn6qrd4E3mx0KKvv8JZ8T+4NPIoTq5gSXGU0BJElQHHe5u9jKC1CJyw1QFPCoLpFgRA1cfjyE/DsAIrplAd+krSQMrRaRA6mOkqa4t4ugYidqRipVrP5jfRgjuhyERU/v6qbCOsiFYpx3qL5Q9v4APZa1wLNC1eAZnQUXYXizJvfY4ZKXNZ3YXawzJwweGPZQUHIVnHD4mDKjUP7TY2rPONPTmI4CXhMLeCVOofGagXssAraRJOtLSTLHHReGqRTtyPgqvGKwgnM3rzFMGC9on4YoAdsmI4qQCXf28rURZLZPL4qMbEv4I6mLcPTN3tIuvZ/nWq7L7Auh2/tHshawDC51AGfDsTPaqAd+RNWCvIDlMUpz+ibhvyD1tvfi27vId6OakaBIztcHrQJAIkfndrkE6ExQzRAtWKpetHRU/YTEm1JqAEcBQpXzLfiFGAXKhd6kac6bx736BWgUpGGdrcR8IG+aIhio85P8jlVJSGAM= + page_age: null + title: How long ago was May 14th 2025? | howlongagogo.com + type: web_search_result + url: https://howlongagogo.com/date/2025/may/14 + - encrypted_content: Eq4MCioIAxgCIiQ0NGFlNjc2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XiCjXzuZtHJQ6No64gr3yKyiw2VHoWpnwSa/lpTivbtetEXTv9g6GBjHiJxTo5pOcj/PyetaX1Z1PTqOm4f5AMECw0w2cssqMrzr3YJexl1xCkd136NjVUBIqFw1AOxNt4ZFDggGR/cIfseywIwTtgf5NKFRMC8q6pVUrVQpoB7AcWYamQaq7NnRXOeWWctgHgg2PJM1w3iQy+0j4Tel9k0U58MR0T3ZOaXXjNq7hriwIghAW4qbq6sh2SPoXDuIrVZPHeqlwr1aDFvVmS+82rfW7YRhExHg7e0RKbCJFGgO4GtcLJSHY7eimxEpnEEmbINTqqXjJmqobivGhJisqs6ofLruPpsPlNIbQb0v+zKZXafF9pMol3urWzR3v+PD5nO2LpPWc9Ltvya7BcyYCKJqGVONrYKuayiBybanK7GuzeHkFiFRIJsH4bXRy1auBwH0TdFD+3gVFZBNnle8XXXwP+vRx8J1RngnBZbZ1zhO9POb4ryJWvqBvzl3sFadT46pWiX61p+avtRyIuYd3xqNU2FafmCva3opcDF/G5tCBBZ2x2BbYP/Bs/ZB5OGls3o3ta5iw87z8Zt44W7UmRHg7vQHiEjWNOWGgjIdLGrgOU6zNXLjcWCnHhyV5Fjbk/owDPWLEVpVkSC4l8BoyxHcmDgVtrrKsTWiGYBPCr0aRw31PS2CfmHfpMQGGV+Z157dVEAdGrkIzXXFSTcBCxyjzs6U8Mv08eQ2jlLCV+N8mf6b+AZcbYGNPerHNRPQ3TslwPn2DUkZNl8AnW6FRchEMDU8s1p99PL39kbFcY81iICHQks61uqK4vzeKoeWAOjD9j6aHpY9yaiAAakTv7Cyxet2qWRr8VVkz79JzDJMswzi8ePvd1u67kQScnLq+uEKd8P2xQ4mYhQvt5FbFX1Kp6bX++MCVFHApXecCGDdfULzpdD+KU6QwyuwctlnEFx+sS3XQ2u8SM4HqXLyZ9fe1pIpt/jpD5O9q1FM+iAHDLnlQ5xgD + page_age: null + title: What Happened On May 14, 2025 This Day In History + type: web_search_result + url: https://www.whathappenedtodayinhistory.com/?m=May&d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ruOwPQwIxNbVIjzDbQuMRxq4IgFhsRP5cd3XQl6UkAtQLj+mtMbHWezLg8CLBRj0K5gBYW61EM/DypbPaBerhXSloBVgxKZqgUdMcGuWlDQnVZmVvPFFAbrP2zPKmGY9mDHGan9WxvMWnRA71tu8LuPT+jTQwFMPMbeWCYh971VbBvSk+R14Q2dpl1XIqsACDUjaGVjYFx9qEIt+WsNtzclmTxDvK2Swy3spI37xyXU50IHZOEfBGL+RI77DyZFxYCzXXYZTYj7UKdqzupwYEtfKlAogOtwGcCZ3C1FOZ6nVlHuQgbLqPQk6J+nNlO9zYMywWVmlIYpU7xE5wh1emhjzUeIdkLQ6o+7Pc7C/DrQ+G0kSzG3dX8Sil7p6Ct140Cwoeu7kSD2uTcmoqkBF9UqxigtVWMhb4EZ1yzLAxyt+T7WMMG0hURKNytTLfxb3o4JyZ7vC2hEP/iqWEwrznV8m7l/stS9czZM18p7WYifHfTNq4XBsmV8EqFGBQn8MkaAkRT5v7L9Qi3TZabSrbld7Py6UF8xAiper68HbVXr9jqk641c4Wu6yNhcYAw== + page_age: January 1, 2019 + title: Wednesday 14th May 2025 | There is a Day for that! + type: web_search_result + url: https://www.thereisadayforthat.com/calendars/2025/5/14 + - encrypted_content: ErADCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDMhOMyVwq2J/zkOd/hoMcqpamRXHCa4nWgbsIjA49SZ++sNY8IPe8sobpikWZQdV+rOyNYls+kUzAyRmS0d4lEa0PGCnrfmTl2WRZe8qswIWhFzP/ARu4qJSB4qRF73+r+0VI5X4gKHBoSSTJXF+1SpI7kzi1qu42Fmhp7rivBR5d2JJxd+GlRaSei+leN3gD5Ab51F3WTf9FWbFkS1UzUU14Ra52u87S7rVivBAjWFAA+Of9ShMY5Aiqt4AX/ka957jgvATMekL8qd0BVtGB12egrN94YVo8CEtb5Tn2Z4tazwziZ29uuSKKe0xnKwuHXIJeK3Gdc+SH5f+ig22ez2L1pumumJZkEuFodYH5WfOnyZqPaa6++35pXGUwNtv+XQB8OFbmMymmsDQnDJOZ+gex6gqoP2uafzoEqqkSqVSAR8pznVs8mWkDJMl5DBE8KylSAB1vKVyNHytUzYN+8aMWTfxtjUrl6gfuHarNc+l+Ta0zTR2ESjyOnkAs3YbHyXtGAM= + page_age: null + title: How many days until the end of 14th May 2025? + type: web_search_result + url: https://days.to/14-may/2025 + - encrypted_content: ErwJCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDHslw9mNBIPhRDVdexoMfUzHqm0JhuxmTdSAIjCoew9gbwGPEz82g5AtA/ijcUGExYiRt64rH3n7weaW8VVW17pIwW0RV/gf2bQcJk4qvwhVUZWohvyyThYcpCvmHAFfwPVqrGIHMlMLHvgXRUIyOjYsu0836KECfhCLsJ/wspWAfVi5YYKkePYUAo3MUH5biPCW3I2BAUFTYkTYb3qD5I1OTQ/nbBwkTP3ZfjdLZyWA3ADTbUuDQ+LdipaqJr2eKJsqNjIhMLeRldbO1dvXMXDydBTvYnnN+Dqn2z0maYy5+M7stO4qPXy9yNUUBkJjkHreKrdcJpF8ps9ORVpwyfUkjIVY8+sm8BV3uX28DurFC1zAg3oKyChD6AJy6TG9yKlY24NGIHDtSgVe+D1ER0IUYl2zvm8NEIYmVdeelEV6lqncn4pdCD4YRkcCylcRxHYuuaw2egPsT1C3Jnu2t0g0CbLhVxVOe+aizoK83X6rvHNcOk3Vt6bhMSiawfaWfd/eB78+62lDPhBV0A34XrkTpTpTstV/2TMuvPTHwZ+yQo1MasdjABtEj385pbe4N6ecm8FwA0AgnzeCILmSJdNjERwWHbvf2gS8pNhKR5R/HjNVvxsuH3hsZ0nDZgtENVxR55k8h8hjTQsjjcHVb0aiJkjPS//iGeBD6nBhAvADlyGAnEi8Kndlg4eU1kHC+EDbD+L8rVg5SlR3Pj9VIzhKGey8rVg/kt1Dd9DFpltSZsWFx3wqeTve/MdAlM314Qit8nQxzm3CaEIIjPc7EyKWPkm3lJqpArBr0KcO5BhCPvXdpoe4hv5JSPPBFu7da2bxsfOHjeDiXYyWooZihXdF0RZJ8YCKOe1Z6v3r2pedgF3Ij+KWP6ZvaxeDOs2K/kxJqiAwygB0t2lmRiolNDSdGfy23rOtSpNfd3GMLruFEER+uNL1MHT8GKPAfZc45PL93HiTUYcghO4e4TObpHToTCd5tSKTvUZp0E/dpsRh8SzkclGFSbWNQg0DFaKEMgniF+jIH+C1NzM3Oafd6MThakeI1cnxNJDMR9n8qO/C84pPbDy1Nuca6lCIS/v1JUzpsVgm/07LgsKvjyu/yYUbLLQKLsM8JjmnZ8VFc1m05UrUBHZMX8bjKFQjwNAq8505GY1+z/HgoPw+LJuLGlIWRM/xiXVwlrYWnKLqYldABPoTNCgz7vOFnFkRpEvQ3A8r5roWNjwYUmvA3gBOfGJxGpgvEXyYcfyUcf4xk2vsF87zxKm8KSwM4kRYfN6OxwM97M2pr1xOlLNMQiHskECjpd1cXVoidvzRIveJfa37fNgEI3srPiTeoNxUM6YKoFOrlXQmOMZ10y1b8DiyXnDyxyoYr6Izs5gqHelN99y057qDtYFKx4K3VFXGZdKZC4hoCmsaAOmV43SZfLUol+wW8pTUxKNmWJps76ladybLH6Bi2FTlz7L6VcqrWdj3mNFzRRwNiLM7JpRL1xacCMQo9aVeOvEJozsIDpgd4QHQqWN7fUSScFrCubQ1bVbAegBPZBtqcGjIfjsm3pWqGAM= + page_age: null + title: What Day of the Week Is May 14, 2025? + type: web_search_result + url: https://www.dayoftheweek.org/?m=May&d=14&y=2025&go=Go + - encrypted_content: EosXCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDEOuUR/sMbSMSI4vIhoM76Tnlqwa0FRDdPSZIjDTATrEKH3Dky9TR9ixVwrQU75xxZwC8RdR/gLNcJIks0Spurm+cj1BpexrJvgdB9gqjhZ57zNnDUGk8S8ByO11j0QBHrWBmHQ8hIoz8CMilKQlvF0QQa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JAGnKZJmcAP9AtK2Gxmdz/PYI3okLD2WJHMKZ8L/TJyjLPK7ryHrWLwRvhCcpvXGHqVJ7VJ68JqbzSF+3sBaIv+w79Xc67XM6xmLCqYfG/modDuAmDlIdBVhI0SUdTQIOTikumfQvtfe3N5ELgwI7ntv3l9memSW55Dqcf/qZ1mlfl0iupz/MZcl+cd55tG98s3UEzQH306qMdNTmNMobV9YWbxxCyHz7sjUzC7GCq4uJ4bedXk4Aod6SWaDs9p6fqde6FRT74k9UkAFPtiYqSS+FitTDRpd6myTYToio3Knmb+rg8P44BlEx3SDVKEPazyqs33LArlSajm4P0fM7W8Xo65QcClpe7DdwWrUdWwWYtU4lGRDHH0KEgKx2sLCvKTZZVg7p/uXfvKhMn1x12ugL6NivGdFuEoieKIcGI9BKzkbAG61oPIs7PQqi8uu3aoAIPkjir6mLygfWmbUtxA99vxgyqCVTNqkHYKqR0GAM= + page_age: null + title: National Holidays on May 14th, 2025 | Days Of The Year + type: web_search_result + url: https://www.daysoftheyear.com/days/may/14/ + - encrypted_content: EuUCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDNTGqHhqgzMPPSfyvBoMlhz5M3Ag/qfWByZBIjAAaAB9xG6an3G9giGryVpVMQDJaVa0FvfywWIEQySIsaqFTYAIANQ5YnZyHv31vacq6AGb7K7zfFKak7CUQabYzwTXl8wIjnr4m+ChcForX+8+TlXvY/7X8+/3xC3TSEqodRMkJKgowcMQ3J+JCGdFhhA3WMkjwvwbvXiMrv1SOM1n+JNvCUiB6FG4ZrocyFPl4Xf6zF0tccngrsUnGU8bX6i+o2VlVPr9zFrm/BfF4ELra/p8s0RCWS7v/w7V8dB2+omT8EI0VkP6YTGFDeRYPnw+xKZuOoKNMOUTua14HhM2I5GItR/R4lQKiQVhe21ChXR7QUIvOPFnIDSW+GuIt/wIRES60FCN3+2DosmqEZubMKd9EyYFXdtVGAM= + page_age: null + title: 'April 14, 2025: History, News, Top Tweets, Social Media & Day Info' + type: web_search_result + url: https://www.wincalendar.com/Calendar/Date/April-14-2025 + - encrypted_content: EosJCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDOHn1SNXW0sKnFgkDhoMXq6vuYB1w8eBtpaGIjAaSotCwI5hjkfcfWHdx2W1e2kY1KCzHO3pyH7PybE33Pzc36Zb82RShey8/ZQjVnIqjggCAYlJO2LKETgzXHx5fS7x3Yq7OkVa0HQRpk4HhRt5lnh6NStD9XCOfEsgq/dk+fO5MvTAa16YqFBjG3+PehAxQBpXbfBlX3IkXTJ3nKLGuw15BJnnfs/O5iT+WzPjE7Ym8TI7AvsfenL66YcF+H7XA4ZLg4d1e6/W3pcbzEYmsOk/jsScXhI0ZGkijM92e6pSFinWsPkRPVhmORe38UBoBvEIkDS+EP8RiEeMsCWaji1y/xJIbV2ImWWorVdycD0b2yO7wZbqKtJ5mOmgLkvaYn2JOtUszCEiVfK9QIj8tikkXLJhbzU4g2iJIh29PVg12o0vn7YBDuOZ6yM+Fb1LL6C1Ml359TlzM3bIPfZf5DF154gSxPN8xG6S6KPWo2WLAFkalW4z10iaaq2Zz5vXUgJO6oVUtEWhnZEbEk6jkjHN3JQAPjAYHNgcPlI50cLMYq9QeovqfqC14EtwIcDsr9CZ7wNhhAo6+eM7H8f1ai99OBgMKVwGuDy9Ia5UocEPFEDFlMsUfhtVnYcyOrs4XxKnU1SoZCr7X7Jq348SWIJ8YmqTtTdEtVvhTRHOnUtwAJz8pxn6cL+eXaswEPKZHjdkjRkj0rXuh7btByM7LFPV4zKCAden8aNzOFbrSX4l+3KCHOLTynWpzbS4iizY7OQqWTq0e5onmGOMVvns73kOBZKVYXbPiko+FnOF3tnAS8ccTeV7XJjw/IrLMNG4KPDuNJ6dVGl73frumfpFrnkevsXZhQzJO8TnDIB1Gn7iqaCXTy4SXWfBXD0W7tEso0ElK/4RflVpy9evR1gwxl+8XU4ihy2f3km9ElxoAxZlmfBWDsvRMNYEkXckondcqkbD2+ifo3r/Adgc8+2VOpOaDf+KehQyIGEBRAodm3Ly3Re64VuoyakiSQUDrpIMlkr7aR9eMiLSbsCsxRsdq/zDUtPbIeZs8Cfr67wmUndSuGyhW6eqpBntWz/uJDFn+ncoOZWBiapmlV1CH31FxaKDf2Vie9OIcb3OWBV+safGxeoYbXVt8OovponMIIvtLRuiyAeqjXHqbuBfcmXFwRU5LzoTdcMm/Zw0+rRfA+6rznk5cqK0Z3DyzPvkBnP9qNlK1z1k7OX/gDckJtD02zsEmKYGc4Ya12k0pLRdbnXm6BNjMY3riJzaUYa8/iJ4iTK077+aK9JjgpfDfr/zpHl9J/qcUYm7UzXtNF5WXxqmJXX2OkkisOMHqCpbOBRINDHZvGUAGibgXPZ7muYNwxzUPVqsIplKKOZiZWUeOOa/vryd0g5Nj7UwvQ4sruQKQRgHXlwffNAM05COz5frXSi9T+HAu2DNqcxojI3WGEi9SRj79/qELxXrX69j2TcaC/sJs1aqlTD8CbSNQxgYAw== + page_age: null + title: Daily Calendar for Wednesday, May 14, 2025 | Almanac.com + type: web_search_result + url: https://www.almanac.com/calendar/date/2025-05-14 + - encrypted_content: EogeCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDEgd6EnaP2kwRbf1XhoM9QRhUCdWF29ZqVEZIjBGs8T/tP2g+mNlS0Yy8FrT9kTecy/rYYZ74okw3Rwu2tgSMWBsH+AloPO4i2j8ty0qix1zCk/+cSIpd2mgOp+OEf44b1zwYrxhuIGnZudCSaHSAG+1ZKz+/q/9aqBzj809jJWwwrerrJkYV6Z3ij+RiMPdbbM+Jtoq8Hew50DOlcfEm5tPbAP/LWAKLk3Kc0psx/mpbOb4jYXdI5mI1lluuxrWD+Ay1eZrLL+xe2UUcP2tNQYJaRs9DKh/+40uEstgfoZRJzTMAyxdwxSO5KkdDsT9EE8+DFTf2IpXXnobKtGo1C57ESvRwX3WQR2XZfnHQWhp5sP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ViW5bk6qu4VTwpH+jJQQM9qwtkfZkPtB860eGfoU9NCr8VPmyG6WlGsu7w7v5Vr8LN5WwRNaHYQaKu3IiKVl6D5I+P35ohyshQ4h+gfwBSaQg/JgSIwNvINx3kL4qKIXn6TZaDMtvrh7bkmebIPoNbPLdqxb5nJdmEYfO9lDB9XLRZVrDPHB6Y8Ok4AUzf0It6YzaWiDVzNdiochap461v4C+SKSl5ecwlJrwqG2RIFols63xigLqbqX6HgGTOoqX1A4ijUldXyykiTL/TlHZyqeCg7kpxedowmuNyMwnlBNFYThRiQyN3HVHv1B/xfYrFjR6YVOGVkRcEA8P6kq112fS5l7Gg2gBSiLkmBAtT8+ZmHPUlfLmAYAw== + page_age: null + title: National Holidays in May, 2025 | Days Of The Year + type: web_search_result + url: https://www.daysoftheyear.com/days/may/ + tool_use_id: srvtoolu_01RhAr4gUKVGNh2F9DLT4WNY + type: web_search_tool_result + - text: |2+ + + + Based on the search results, today is Wednesday, May 14, 2025. Here are some additional details about today: + + type: text + - citations: + - cited_text: 'May 14, 2025 is the 134th day of the year 2025 in the Gregorian calendar. There are 231 days remaining + until the end of this year. ' + encrypted_index: EpEBCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDFtlKgZiJHR7JqBGIxoMKc9D5YSjIiXWrHPcIjCeRjLh04EnS3ZV+Cqopq7+2L6vSuhhGiXQyDRrVp7bSGZl33mBKnMs2CFI/yKAtaIqFbeul9oFO6HH3nrS/DIQ9BH3LXNfxBgE + title: What Happened On May 14, 2025 This Day In History + type: web_search_result_location + url: https://www.whathappenedtodayinhistory.com/?m=May&d=14&y=2025&go=Go + text: It is the 134th day of the year 2025, with 231 days remaining until the end of this year + type: text + - text: | + . + + Today features several notable observances: + type: text + - citations: + - cited_text: Wed May 14th, 2025 is National Dance Like a Chicken Day, National Buttermilk Biscuit Day, International + Chihuahua Appreciation Day, National Reception... + encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDLWX8EyXcC5ge8DRWxoM8lDf2uygSSqbW8j1IjBvdWpC46PsxGw4yepQbRMFqKKa7KTSB0my4Xt221VnaWGMlvQbqnxbYTmJfxClVHQqE+6d4Q9ir0YnAMvc5rGyJNekPpAYBA== + title: National Holidays on May 14th, 2025 | Days Of The Year + type: web_search_result_location + url: https://www.daysoftheyear.com/days/may/14/ + - cited_text: It's National Dance Like a Chicken Day, National Buttermilk Biscuit Day, International Chihuahua Appreciation + Day, National Receptionists Day, Online ... + encrypted_index: EpABCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDEyAxsHBYMXEU1jUwhoMOUjcAhl5PdDDirbHIjDsmTGOPT74M31dJUWmwUrxrA07YdZ9jUlYFHTSsjz8JE/NcCBOStLRPjzkXSRLaoAqFKK9AWMsL0XBkQj/ihJ6JnMdYDBEGAQ= + title: National Holidays on May 14th, 2025 | Days Of The Year + type: web_search_result_location + url: https://www.daysoftheyear.com/days/may/14/ + text: |- + It's being celebrated as: + - National Dance Like a Chicken Day + - National Buttermilk Biscuit Day + - International Chihuahua Appreciation Day + - National Receptionists Day + - Online Romance Day + type: text + - text: |2+ + + + type: text + - citations: + - cited_text: Get familiar with the history of Asian Americans and Pacific Islanders in the US, or join an event to + celebrate your heritage during Asian/Pacific Her... + encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDBJIi8ErVI8SPvtXnRoMVM/kY+jExGcrakWkIjDdfUL7xDZm/uDkIO+UnyN+W69tqzTjRl0ta+Yk4dSlPI7LRztzJSOkeOnoNZlYcCAqE9HebEam/25CyIeRbDXfuOI79xEYBA== + title: National Holidays on May 14th, 2025 | Days Of The Year + type: web_search_result_location + url: https://www.daysoftheyear.com/days/may/14/ + text: It's also part of Asian/Pacific Heritage Month + type: text + - text: |+ + . + + type: text + - citations: + - cited_text: (Sponsored by MyBirthday.Ninja) Taurus is the zodiac sign of a person born on this day. Emerald is the + modern birthstone for this month. Sapphire is t... + encrypted_index: EpMBCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDFJ5RUG1bQ1eEQ6q6BoMtBY580wgcdWItBUWIjBoMOm5r/PhUZFtiDNn8DZ+92GZDbgmK/Aco4q4a3V5WPCXfmv9JE96Tc6Vto5vh8YqF//2ULrAGRJFo/qvgaWyYjrk8f4lYcJtGAQ= + title: What Day of the Week Is May 14, 2025? + type: web_search_result_location + url: https://www.dayoftheweek.org/?m=May&d=14&y=2025&go=Go + text: |- + For those interested in astrology: + - The zodiac sign for today is Taurus + - The modern birthstone is Emerald + - The mystical birthstone is Sapphire + type: text + id: msg_015ivxZjWnb186VBacQBDCSr + model: claude-3-5-sonnet-latest + role: assistant + stop_reason: end_turn + stop_sequence: null + type: message + usage: + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + input_tokens: 12360 + output_tokens: 332 + server_tool_use: + web_search_requests: 1 + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/cassettes/test_groq/test_groq_model_web_search_tool.yaml b/tests/models/cassettes/test_groq/test_groq_model_web_search_tool.yaml new file mode 100644 index 000000000..73e9b042c --- /dev/null +++ b/tests/models/cassettes/test_groq/test_groq_model_web_search_tool.yaml @@ -0,0 +1,273 @@ +interactions: +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '106' + content-type: + - application/json + host: + - api.groq.com + method: POST + parsed_body: + messages: + - content: What day is today? + role: user + model: compound-beta + n: 1 + stream: false + uri: https://api.groq.com/openai/v1/chat/completions + response: + headers: + alt-svc: + - h3=":443"; ma=86400 + cache-control: + - private, max-age=0, no-store, no-cache, must-revalidate + connection: + - keep-alive + content-length: + - '13044' + content-type: + - application/json + transfer-encoding: + - chunked + vary: + - Origin + parsed_body: + choices: + - finish_reason: stop + index: 0 + logprobs: null + message: + content: The current day is Tuesday. + executed_tools: + - arguments: '{"query": "What is the current date?"}' + index: 0 + output: |+ + Title: Today's Date - Find Out Quickly What's The Date Today ️ + URL: https://calendarhours.com/todays-date/ + Content: The current date in RFC 2822 Format with shortened day of week, numerical date, three-letter month abbreviation, year, time, and time zone is: Tue, 13 May 2025 06:07:56 -0400; The current date in Unix Epoch Format with number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT) is: + Score: 0.8299 + + Title: Today's Date | Current date now - MaxTables + URL: https://maxtables.com/tools/todays-date.html + Content: The current date, including day of the week, month, day, and year. The exact time, down to seconds. Details on the time zone, its location, and its GMT difference. A tool to select the present date. A visual calendar chart. Why would I need to check Today's Date on this platform instead of my device? + Score: 0.7223 + + Title: Current Time and Date - Exact Time! + URL: https://time-and-calendar.com/ + Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchonizing in real time with our server clock. + Score: 0.6799 + + Title: Today's Date - CalendarDate.com + URL: https://www.calendardate.com/todays.htm + Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemishpere flip seasons - i.e. Winter is Summer. + Score: 0.6416 + + Title: What is the date today | Today's Date + URL: https://www.datetoday.info/ + Content: Master time tracking with Today's Date. Stay updated with real-time information on current date, time, day of the week, days left in the week, current day and remaining days of the year. Explore time in globally accepted formats. Keep up with the current week and month, along with the remaining weeks and months for the year. Embrace efficient time tracking with Today's Date. + Score: 0.6282 + + Title: Explore Today's Date, Time Zones, Holidays & More + URL: https://whatdateis.today/ + Content: Check what date and time it is today (May 8, 2025). View current time across different time zones, upcoming holidays, and use our date calculator. Your one-stop destination for all date and time information. + Score: 0.6181 + + Title: Today's Date and Time - Date and Time Tools + URL: https://todaysdatetime.com/ + Content: Discover today's exact date and time, learn about time zones, date formats, and explore our comprehensive collection of date and time tools including calculators, converters, and calendars. ... Get the exact current date and time, along with powerful calculation tools for all your scheduling needs. 12h. Today. Day 76 of year (366) Yesterday + Score: 0.5456 + + Title: Current Time Now - What time is it? - RapidTables.com + URL: https://www.rapidtables.com/tools/current-time.html + Content: This page includes the following information: Current time: hours, minutes, seconds. Today's date: day of week, month, day, year. Time zone with location and GMT offset. + Score: 0.4255 + + Title: Current Time + URL: https://www.timeanddate.com/ + Content: Welcome to the world's top site for time, time zones, and astronomy. Organize your life with free online info and tools you can rely on. No sign-up needed. Sign in. News. News Home; Astronomy News; ... Current Time. Monday May 12, 2025 Roanoke Rapids, North Carolina, USA. Set home location. 11:27: 03 pm. World Clock. + Score: 0.3876 + + Title: Current local time in the United States - World clock + URL: https://dateandtime.info/country.php?code=US + Content: Time and Date of DST Change Time Change; DST started: Sunday, March 9, 2025 at 2:00 AM: The clocks were put forward an hour to 3:00 AM. DST ends: Sunday, November 2, 2025 at 2:00 AM: The clocks will be put back an hour to 1:00 AM. DST starts: Sunday, March 8, 2026 at 2:00 AM: The clocks will be put forward an hour to 3:00 AM. + Score: 0.3042 + + Title: Time.is - exact time, any time zone + URL: https://time.is/ + Content: 7 million locations, 58 languages, synchronized with atomic clock time. Time.is. Get Time.is Ad-free! Exact time now: 05:08:45. Tuesday, 13 May, 2025, week 20. Sun: ↑ 05:09 ↓ 20:45 (15h 36m) - More info - Make London time default - Remove from favorite locations + Score: 0.2796 + + Title: Time in United States now + URL: https://time.is/United_States + Content: Exact time now, time zone, time difference, sunrise/sunset time and key facts for United States. Time.is. Get Time.is Ad-free! Time in United States now . 11:17:42 PM. Monday, May 12, 2025. United States (incl. dependent territories) has 11 time zones. The time zone for the capital Washington, D.C. is used here. + Score: 0.2726 + + Title: Current Local Time in the United States - timeanddate.com + URL: https://www.timeanddate.com/worldclock/usa + Content: United States time now. USA time zones and time zone map with current time in each state. + Score: 0.2519 + + Title: Current local time in United States - World Time Clock & Map + URL: https://24timezones.com/United-States/time + Content: Check the current time in United States and time zone information, the UTC offset and daylight saving time dates in 2025. + Score: 0.2221 + + Title: The World Clock — Worldwide - timeanddate.com + URL: https://www.timeanddate.com/worldclock/ + Content: World time and date for cities in all time zones. International time right now. Takes into account all DST clock changes. + Score: 0.2134 + + type: search + reasoning: |2- + + To determine the current day, I need to access real-time information. I will use the search tool to find out the current date. + + + search(What is the current date?) + + Title: Today's Date - Find Out Quickly What's The Date Today ️ + URL: https://calendarhours.com/todays-date/ + Content: The current date in RFC 2822 Format with shortened day of week, numerical date, three-letter month abbreviation, year, time, and time zone is: Tue, 13 May 2025 06:07:56 -0400; The current date in Unix Epoch Format with number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT) is: + Score: 0.8299 + + Title: Today's Date | Current date now - MaxTables + URL: https://maxtables.com/tools/todays-date.html + Content: The current date, including day of the week, month, day, and year. The exact time, down to seconds. Details on the time zone, its location, and its GMT difference. A tool to select the present date. A visual calendar chart. Why would I need to check Today's Date on this platform instead of my device? + Score: 0.7223 + + Title: Current Time and Date - Exact Time! + URL: https://time-and-calendar.com/ + Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchonizing in real time with our server clock. + Score: 0.6799 + + Title: Today's Date - CalendarDate.com + URL: https://www.calendardate.com/todays.htm + Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemishpere flip seasons - i.e. Winter is Summer. + Score: 0.6416 + + Title: What is the date today | Today's Date + URL: https://www.datetoday.info/ + Content: Master time tracking with Today's Date. Stay updated with real-time information on current date, time, day of the week, days left in the week, current day and remaining days of the year. Explore time in globally accepted formats. Keep up with the current week and month, along with the remaining weeks and months for the year. Embrace efficient time tracking with Today's Date. + Score: 0.6282 + + Title: Explore Today's Date, Time Zones, Holidays & More + URL: https://whatdateis.today/ + Content: Check what date and time it is today (May 8, 2025). View current time across different time zones, upcoming holidays, and use our date calculator. Your one-stop destination for all date and time information. + Score: 0.6181 + + Title: Today's Date and Time - Date and Time Tools + URL: https://todaysdatetime.com/ + Content: Discover today's exact date and time, learn about time zones, date formats, and explore our comprehensive collection of date and time tools including calculators, converters, and calendars. ... Get the exact current date and time, along with powerful calculation tools for all your scheduling needs. 12h. Today. Day 76 of year (366) Yesterday + Score: 0.5456 + + Title: Current Time Now - What time is it? - RapidTables.com + URL: https://www.rapidtables.com/tools/current-time.html + Content: This page includes the following information: Current time: hours, minutes, seconds. Today's date: day of week, month, day, year. Time zone with location and GMT offset. + Score: 0.4255 + + Title: Current Time + URL: https://www.timeanddate.com/ + Content: Welcome to the world's top site for time, time zones, and astronomy. Organize your life with free online info and tools you can rely on. No sign-up needed. Sign in. News. News Home; Astronomy News; ... Current Time. Monday May 12, 2025 Roanoke Rapids, North Carolina, USA. Set home location. 11:27: 03 pm. World Clock. + Score: 0.3876 + + Title: Current local time in the United States - World clock + URL: https://dateandtime.info/country.php?code=US + Content: Time and Date of DST Change Time Change; DST started: Sunday, March 9, 2025 at 2:00 AM: The clocks were put forward an hour to 3:00 AM. DST ends: Sunday, November 2, 2025 at 2:00 AM: The clocks will be put back an hour to 1:00 AM. DST starts: Sunday, March 8, 2026 at 2:00 AM: The clocks will be put forward an hour to 3:00 AM. + Score: 0.3042 + + Title: Time.is - exact time, any time zone + URL: https://time.is/ + Content: 7 million locations, 58 languages, synchronized with atomic clock time. Time.is. Get Time.is Ad-free! Exact time now: 05:08:45. Tuesday, 13 May, 2025, week 20. Sun: ↑ 05:09 ↓ 20:45 (15h 36m) - More info - Make London time default - Remove from favorite locations + Score: 0.2796 + + Title: Time in United States now + URL: https://time.is/United_States + Content: Exact time now, time zone, time difference, sunrise/sunset time and key facts for United States. Time.is. Get Time.is Ad-free! Time in United States now . 11:17:42 PM. Monday, May 12, 2025. United States (incl. dependent territories) has 11 time zones. The time zone for the capital Washington, D.C. is used here. + Score: 0.2726 + + Title: Current Local Time in the United States - timeanddate.com + URL: https://www.timeanddate.com/worldclock/usa + Content: United States time now. USA time zones and time zone map with current time in each state. + Score: 0.2519 + + Title: Current local time in United States - World Time Clock & Map + URL: https://24timezones.com/United-States/time + Content: Check the current time in United States and time zone information, the UTC offset and daylight saving time dates in 2025. + Score: 0.2221 + + Title: The World Clock — Worldwide - timeanddate.com + URL: https://www.timeanddate.com/worldclock/ + Content: World time and date for cities in all time zones. International time right now. Takes into account all DST clock changes. + Score: 0.2134 + + + The current date is Tuesday, May 13, 2025. + + + + The current day is Tuesday. + role: assistant + created: 1747232793 + id: stub + model: compound-beta + object: chat.completion + system_fingerprint: null + usage: + completion_time: 0.312814 + completion_tokens: 117 + prompt_time: 0.737839 + prompt_tokens: 4287 + queue_time: 1.687734 + total_time: 1.050655 + total_tokens: 4404 + usage_breakdown: + models: + - model: llama-3.3-70b-versatile + usage: + completion_time: 0.033092212 + completion_tokens: 4 + prompt_time: 0.008749282 + prompt_tokens: 134 + queue_time: 0.251916212 + total_time: 0.041841494 + total_tokens: 138 + - model: meta-llama/llama-4-scout-17b-16e-instruct + usage: + completion_time: 0.198660413 + completion_tokens: 82 + prompt_time: 0.026323206 + prompt_tokens: 491 + queue_time: 0.556546565 + total_time: 0.224983619 + total_tokens: 573 + - model: meta-llama/llama-4-scout-17b-16e-instruct + usage: + completion_time: 0.047136438 + completion_tokens: 24 + prompt_time: 0.077990192 + prompt_tokens: 1926 + queue_time: 0.619169638 + total_time: 0.12512663 + total_tokens: 1950 + - model: llama-3.3-70b-versatile + usage: + completion_time: 0.033926045 + completion_tokens: 7 + prompt_time: 0.624777225 + prompt_tokens: 1736 + queue_time: 0.26010064499999996 + total_time: 0.65870327 + total_tokens: 1743 + x_groq: + id: stub + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/cassettes/test_openai/test_openai_web_search_tool.yaml b/tests/models/cassettes/test_openai/test_openai_web_search_tool.yaml new file mode 100644 index 000000000..cd48b3ea9 --- /dev/null +++ b/tests/models/cassettes/test_openai/test_openai_web_search_tool.yaml @@ -0,0 +1,79 @@ +interactions: +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '218' + content-type: + - application/json + host: + - api.openai.com + method: POST + parsed_body: + messages: + - content: You are a helpful assistant. + role: system + - content: What day is today? + role: user + model: gpt-4o-search-preview + stream: false + web_search_options: + search_context_size: low + uri: https://api.openai.com/v1/chat/completions + response: + headers: + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + connection: + - keep-alive + content-length: + - '785' + content-type: + - application/json + openai-organization: + - pydantic-28gund + openai-processing-ms: + - '2051' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + parsed_body: + choices: + - finish_reason: stop + index: 0 + message: + annotations: [] + content: 'May 14, 2025, 8:51:29 AM ' + refusal: null + role: assistant + created: 1747227087 + id: chatcmpl-e05fbf7b-44c0-406d-8662-bc7a9a518747 + model: gpt-4o-search-preview-2025-03-11 + object: chat.completion + system_fingerprint: '' + usage: + completion_tokens: 17 + completion_tokens_details: + accepted_prediction_tokens: 0 + audio_tokens: 0 + reasoning_tokens: 0 + rejected_prediction_tokens: 0 + prompt_tokens: 11 + prompt_tokens_details: + audio_tokens: 0 + cached_tokens: 0 + total_tokens: 28 + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/cassettes/test_openai/test_openai_web_search_tool_model_not_supported.yaml b/tests/models/cassettes/test_openai/test_openai_web_search_tool_model_not_supported.yaml new file mode 100644 index 000000000..0a102fa79 --- /dev/null +++ b/tests/models/cassettes/test_openai/test_openai_web_search_tool_model_not_supported.yaml @@ -0,0 +1,57 @@ +interactions: +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '203' + content-type: + - application/json + host: + - api.openai.com + method: POST + parsed_body: + messages: + - content: You are a helpful assistant. + role: system + - content: What day is today? + role: user + model: gpt-4o + stream: false + web_search_options: + search_context_size: low + uri: https://api.openai.com/v1/chat/completions + response: + headers: + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + connection: + - keep-alive + content-length: + - '177' + content-type: + - application/json + openai-organization: + - pydantic-28gund + openai-processing-ms: + - '23' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + parsed_body: + error: + code: null + message: Web search options not supported with this model. + param: web_search_options + type: invalid_request_error + status: + code: 400 + message: Bad Request +version: 1 diff --git a/tests/models/cassettes/test_openai/test_openai_web_search_tool_with_user_location.yaml b/tests/models/cassettes/test_openai/test_openai_web_search_tool_with_user_location.yaml new file mode 100644 index 000000000..30a557451 --- /dev/null +++ b/tests/models/cassettes/test_openai/test_openai_web_search_tool_with_user_location.yaml @@ -0,0 +1,91 @@ +interactions: +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '322' + content-type: + - application/json + host: + - api.openai.com + method: POST + parsed_body: + messages: + - content: You are a helpful assistant. + role: system + - content: What is the current temperature? + role: user + model: gpt-4o-search-preview + stream: false + web_search_options: + search_context_size: medium + user_location: + approximate: + city: Utrecht + country: NL + type: approximate + uri: https://api.openai.com/v1/chat/completions + response: + headers: + access-control-expose-headers: + - X-Request-ID + alt-svc: + - h3=":443"; ma=86400 + connection: + - keep-alive + content-length: + - '1656' + content-type: + - application/json + openai-organization: + - pydantic-28gund + openai-processing-ms: + - '3979' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + parsed_body: + choices: + - finish_reason: stop + index: 0 + message: + annotations: [] + content: "Het is momenteel zonnig in Utrecht met een temperatuur van 22°C.\n\n## Weer voor Utrecht, Nederland:\nHuidige + omstandigheden: Zonnig, 72°F (22°C)\n\nDagvoorspelling:\n* woensdag, mei 14: minimum: 48°F (9°C), maximum: 71°F + (22°C), beschrijving: Afnemende bewolking\n* donderdag, mei 15: minimum: 43°F (6°C), maximum: 67°F (20°C), beschrijving: + Na een bewolkt begin keert de zon terug\n* vrijdag, mei 16: minimum: 45°F (7°C), maximum: 64°F (18°C), beschrijving: + Overwegend zonnig\n* zaterdag, mei 17: minimum: 47°F (9°C), maximum: 68°F (20°C), beschrijving: Overwegend zonnig\n* + zondag, mei 18: minimum: 47°F (8°C), maximum: 68°F (20°C), beschrijving: Deels zonnig\n* maandag, mei 19: minimum: + 49°F (9°C), maximum: 70°F (21°C), beschrijving: Deels zonnig\n* dinsdag, mei 20: minimum: 49°F (10°C), maximum: + 72°F (22°C), beschrijving: Zonnig tot gedeeltelijk bewolkt\n " + refusal: null + role: assistant + created: 1747227540 + id: chatcmpl-da029146-a630-4224-9d12-7d808b031fbc + model: gpt-4o-search-preview-2025-03-11 + object: chat.completion + system_fingerprint: '' + usage: + completion_tokens: 293 + completion_tokens_details: + accepted_prediction_tokens: 0 + audio_tokens: 0 + reasoning_tokens: 0 + rejected_prediction_tokens: 0 + prompt_tokens: 12 + prompt_tokens_details: + audio_tokens: 0 + cached_tokens: 0 + total_tokens: 305 + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/cassettes/test_openai_responses/test_openai_responses_model_web_search_tool.yaml b/tests/models/cassettes/test_openai_responses/test_openai_responses_model_web_search_tool.yaml new file mode 100644 index 000000000..5996ed6c4 --- /dev/null +++ b/tests/models/cassettes/test_openai_responses/test_openai_responses_model_web_search_tool.yaml @@ -0,0 +1,114 @@ +interactions: +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '231' + content-type: + - application/json + host: + - api.openai.com + method: POST + parsed_body: + input: + - content: What day is it today? + role: user + instructions: You are a helpful assistant. + model: gpt-4o + stream: false + tool_choice: auto + tools: + - search_context_size: medium + type: web_search_preview + uri: https://api.openai.com/v1/responses + response: + headers: + alt-svc: + - h3=":443"; ma=86400 + connection: + - keep-alive + content-length: + - '2569' + content-type: + - application/json + openai-organization: + - pydantic-28gund + openai-processing-ms: + - '3632' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + parsed_body: + created_at: 1747227360 + error: null + id: resp_682492e0aab88191afcadcbbb85e1a490e7f27fcb18d04ed + incomplete_details: null + instructions: You are a helpful assistant. + max_output_tokens: null + metadata: {} + model: gpt-4o-2024-08-06 + object: response + output: + - id: ws_682492e1b7a08191b30170317ea7ee570e7f27fcb18d04ed + status: completed + type: web_search_call + - content: + - annotations: [] + text: "Today is Wednesday, May 14, 2025.\n\n## Weather for San Francisco, CA:\nCurrent Conditions: Mostly clear, + 50°F (10°C)\n\nDaily Forecast:\n* Wednesday, May 14: Low: 51°F (10°C), High: 65°F (18°C), Description: Areas of + low clouds early; otherwise, mostly sunny\n* Thursday, May 15: Low: 53°F (12°C), High: 66°F (19°C), Description: + Areas of low clouds, then sun\n* Friday, May 16: Low: 53°F (12°C), High: 64°F (18°C), Description: Partly sunny\n* + Saturday, May 17: Low: 52°F (11°C), High: 63°F (17°C), Description: Low clouds breaking for some sun; breezy in + the afternoon\n* Sunday, May 18: Low: 51°F (10°C), High: 68°F (20°C), Description: Clouds yielding to sun\n* Monday, + May 19: Low: 53°F (12°C), High: 68°F (20°C), Description: Sunny\n* Tuesday, May 20: Low: 52°F (11°C), High: 70°F + (21°C), Description: Mostly sunny\n " + type: output_text + id: msg_682492e36ab08191813ec707a61c272f0e7f27fcb18d04ed + role: assistant + status: completed + type: message + parallel_tool_calls: true + previous_response_id: null + reasoning: + effort: null + summary: null + service_tier: default + status: completed + store: true + temperature: 1.0 + text: + format: + type: text + tool_choice: auto + tools: + - search_context_size: medium + type: web_search_preview + user_location: + city: null + country: US + region: null + timezone: null + type: approximate + top_p: 1.0 + truncation: disabled + usage: + input_tokens: 317 + input_tokens_details: + cached_tokens: 0 + output_tokens: 286 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 603 + user: null + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/cassettes/test_openai_responses/test_openai_responses_model_web_search_tool_with_user_location.yaml b/tests/models/cassettes/test_openai_responses/test_openai_responses_model_web_search_tool_with_user_location.yaml new file mode 100644 index 000000000..6ad0ff843 --- /dev/null +++ b/tests/models/cassettes/test_openai_responses/test_openai_responses_model_web_search_tool_with_user_location.yaml @@ -0,0 +1,118 @@ +interactions: +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '313' + content-type: + - application/json + host: + - api.openai.com + method: POST + parsed_body: + input: + - content: What is the current temperature? + role: user + instructions: You are a helpful assistant. + model: gpt-4o + stream: false + tool_choice: auto + tools: + - search_context_size: medium + type: web_search_preview + user_location: + city: Utrecht + country: NL + type: approximate + uri: https://api.openai.com/v1/responses + response: + headers: + alt-svc: + - h3=":443"; ma=86400 + connection: + - keep-alive + content-length: + - '2631' + content-type: + - application/json + openai-organization: + - pydantic-28gund + openai-processing-ms: + - '3405' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + parsed_body: + created_at: 1747227481 + error: null + id: resp_682493599ce08191a7d279acb969c28b05f032fc13ed3d8b + incomplete_details: null + instructions: You are a helpful assistant. + max_output_tokens: null + metadata: {} + model: gpt-4o-2024-08-06 + object: response + output: + - id: ws_6824935a6ca481918cae37433d3e2f8005f032fc13ed3d8b + status: completed + type: web_search_call + - content: + - annotations: [] + text: "As of 12:58 PM on Wednesday, May 14, 2025, in Utrecht, Netherlands, the weather is sunny with a temperature + of 22°C (71°F).\n\n## Weather for Utrecht, Netherlands:\nCurrent Conditions: Sunny, 71°F (22°C)\n\nDaily Forecast:\n* + Wednesday, May 14: Low: 48°F (9°C), High: 71°F (22°C), Description: Clouds yielding to sun\n* Thursday, May 15: + Low: 43°F (6°C), High: 67°F (20°C), Description: After a cloudy start, sun returns\n* Friday, May 16: Low: 45°F + (7°C), High: 64°F (18°C), Description: Mostly sunny\n* Saturday, May 17: Low: 47°F (9°C), High: 68°F (20°C), Description: + Mostly sunny\n* Sunday, May 18: Low: 47°F (8°C), High: 68°F (20°C), Description: Some sun\n* Monday, May 19: Low: + 49°F (9°C), High: 70°F (21°C), Description: Delightful with partial sunshine\n* Tuesday, May 20: Low: 49°F (10°C), + High: 72°F (22°C), Description: Warm with sunshine and a few clouds\n " + type: output_text + id: msg_6824935c4dfc8191b0abacb1c0fd0a7805f032fc13ed3d8b + role: assistant + status: completed + type: message + parallel_tool_calls: true + previous_response_id: null + reasoning: + effort: null + summary: null + service_tier: default + status: completed + store: true + temperature: 1.0 + text: + format: + type: text + tool_choice: auto + tools: + - search_context_size: medium + type: web_search_preview + user_location: + city: Utrecht + country: NL + region: null + timezone: null + type: approximate + top_p: 1.0 + truncation: disabled + usage: + input_tokens: 317 + input_tokens_details: + cached_tokens: 0 + output_tokens: 300 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 617 + user: null + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index 4dbdddab2..00082ae6d 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -13,6 +13,7 @@ from inline_snapshot import snapshot from pydantic_ai import Agent, ModelHTTPError, ModelRetry +from pydantic_ai.builtin_tools import WebSearchTool from pydantic_ai.messages import ( BinaryContent, DocumentUrl, @@ -1012,3 +1013,14 @@ def anth_msg(usage: AnthropicUsage) -> AnthropicMessage: ) def test_usage(message_callback: Callable[[], AnthropicMessage | RawMessageStreamEvent], usage: Usage): assert _map_usage(message_callback()) == usage + + +@pytest.mark.vcr() +async def test_anthropic_web_search_tool(allow_model_requests: None, anthropic_api_key: str): + m = AnthropicModel('claude-3-5-sonnet-latest', provider=AnthropicProvider(api_key=anthropic_api_key)) + agent = Agent(m, builtin_tools=[WebSearchTool()]) + + result = await agent.run('What day is today?') + assert result.output == snapshot( + "I can't tell you what day it is today, as I don't have access to real-time information. However, you can easily check the current date on your device or calendar." + ) diff --git a/tests/models/test_groq.py b/tests/models/test_groq.py index 513e31c7c..a1ccbced6 100644 --- a/tests/models/test_groq.py +++ b/tests/models/test_groq.py @@ -15,6 +15,7 @@ from typing_extensions import TypedDict from pydantic_ai import Agent, ModelHTTPError, ModelRetry, UnexpectedModelBehavior +from pydantic_ai.builtin_tools import WebSearchTool from pydantic_ai.messages import ( BinaryContent, ImageUrl, @@ -670,3 +671,16 @@ async def test_groq_model_instructions(allow_model_requests: None, groq_api_key: ), ] ) + + +@pytest.mark.vcr() +async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_key: str): + m = GroqModel('compound-beta', provider=GroqProvider(api_key=groq_api_key)) + agent = Agent(m, builtin_tools=[WebSearchTool()]) + + result = await agent.run('What day is today?') + assert result.output == snapshot("""\ +To determine the current day, I would need to know the current date. However, I don't have have access to real-time information. But I can guide you on how to find out. + +You can use a calendar or a digital tool that displays the current date to find out what day it is today. Alternatively, if you provide me with the current date, I can tell you what day it is.\ +""") diff --git a/tests/models/test_openai.py b/tests/models/test_openai.py index 75a0160b3..e461acfa6 100644 --- a/tests/models/test_openai.py +++ b/tests/models/test_openai.py @@ -15,6 +15,7 @@ from typing_extensions import TypedDict from pydantic_ai import Agent, ModelHTTPError, ModelRetry, UnexpectedModelBehavior +from pydantic_ai.builtin_tools import WebSearchTool from pydantic_ai.messages import ( AudioUrl, BinaryContent, @@ -1543,3 +1544,53 @@ async def get_temperature(city: str) -> float: ), ] ) + + +@pytest.mark.vcr() +async def test_openai_web_search_tool_model_not_supported(allow_model_requests: None, openai_api_key: str): + m = OpenAIModel('gpt-4o', provider=OpenAIProvider(api_key=openai_api_key)) + agent = Agent( + m, instructions='You are a helpful assistant.', builtin_tools=[WebSearchTool(search_context_size='low')] + ) + + with pytest.raises(ModelHTTPError, match='.*Web search options not supported with this model.*'): + await agent.run('What day is today?') + + +@pytest.mark.vcr() +async def test_openai_web_search_tool(allow_model_requests: None, openai_api_key: str): + m = OpenAIModel('gpt-4o-search-preview', provider=OpenAIProvider(api_key=openai_api_key)) + agent = Agent( + m, instructions='You are a helpful assistant.', builtin_tools=[WebSearchTool(search_context_size='low')] + ) + + result = await agent.run('What day is today?') + assert result.output == snapshot('May 14, 2025, 8:51:29\u202fAM ') + + +@pytest.mark.vcr() +async def test_openai_web_search_tool_with_user_location(allow_model_requests: None, openai_api_key: str): + m = OpenAIModel('gpt-4o-search-preview', provider=OpenAIProvider(api_key=openai_api_key)) + agent = Agent( + m, + instructions='You are a helpful assistant.', + builtin_tools=[WebSearchTool(user_location={'city': 'Utrecht', 'country': 'NL'})], + ) + + result = await agent.run('What is the current temperature?') + assert result.output == snapshot("""\ +Het is momenteel zonnig in Utrecht met een temperatuur van 22°C. + +## Weer voor Utrecht, Nederland: +Huidige omstandigheden: Zonnig, 72°F (22°C) + +Dagvoorspelling: +* woensdag, mei 14: minimum: 48°F (9°C), maximum: 71°F (22°C), beschrijving: Afnemende bewolking +* donderdag, mei 15: minimum: 43°F (6°C), maximum: 67°F (20°C), beschrijving: Na een bewolkt begin keert de zon terug +* vrijdag, mei 16: minimum: 45°F (7°C), maximum: 64°F (18°C), beschrijving: Overwegend zonnig +* zaterdag, mei 17: minimum: 47°F (9°C), maximum: 68°F (20°C), beschrijving: Overwegend zonnig +* zondag, mei 18: minimum: 47°F (8°C), maximum: 68°F (20°C), beschrijving: Deels zonnig +* maandag, mei 19: minimum: 49°F (9°C), maximum: 70°F (21°C), beschrijving: Deels zonnig +* dinsdag, mei 20: minimum: 49°F (10°C), maximum: 72°F (22°C), beschrijving: Zonnig tot gedeeltelijk bewolkt + \ +""") diff --git a/tests/models/test_openai_responses.py b/tests/models/test_openai_responses.py index 8be466e26..a0f54a230 100644 --- a/tests/models/test_openai_responses.py +++ b/tests/models/test_openai_responses.py @@ -5,6 +5,7 @@ from typing_extensions import TypedDict from pydantic_ai.agent import Agent +from pydantic_ai.builtin_tools import WebSearchTool from pydantic_ai.exceptions import ModelHTTPError, ModelRetry from pydantic_ai.messages import ( BinaryContent, @@ -462,3 +463,55 @@ async def test_openai_responses_model_instructions(allow_model_requests: None, o ), ] ) + + +async def test_openai_responses_model_web_search_tool(allow_model_requests: None, openai_api_key: str): + m = OpenAIResponsesModel('gpt-4o', provider=OpenAIProvider(api_key=openai_api_key)) + agent = Agent(m, instructions='You are a helpful assistant.', builtin_tools=['web-search']) + + result = await agent.run('What day is it today?') + assert result.output == snapshot("""\ +Today is Wednesday, May 14, 2025. + +## Weather for San Francisco, CA: +Current Conditions: Mostly clear, 50°F (10°C) + +Daily Forecast: +* Wednesday, May 14: Low: 51°F (10°C), High: 65°F (18°C), Description: Areas of low clouds early; otherwise, mostly sunny +* Thursday, May 15: Low: 53°F (12°C), High: 66°F (19°C), Description: Areas of low clouds, then sun +* Friday, May 16: Low: 53°F (12°C), High: 64°F (18°C), Description: Partly sunny +* Saturday, May 17: Low: 52°F (11°C), High: 63°F (17°C), Description: Low clouds breaking for some sun; breezy in the afternoon +* Sunday, May 18: Low: 51°F (10°C), High: 68°F (20°C), Description: Clouds yielding to sun +* Monday, May 19: Low: 53°F (12°C), High: 68°F (20°C), Description: Sunny +* Tuesday, May 20: Low: 52°F (11°C), High: 70°F (21°C), Description: Mostly sunny + \ +""") + + +async def test_openai_responses_model_web_search_tool_with_user_location( + allow_model_requests: None, openai_api_key: str +): + m = OpenAIResponsesModel('gpt-4o', provider=OpenAIProvider(api_key=openai_api_key)) + agent = Agent( + m, + instructions='You are a helpful assistant.', + builtin_tools=[WebSearchTool(user_location={'city': 'Utrecht', 'country': 'NL'})], + ) + + result = await agent.run('What is the current temperature?') + assert result.output == snapshot("""\ +As of 12:58 PM on Wednesday, May 14, 2025, in Utrecht, Netherlands, the weather is sunny with a temperature of 22°C (71°F). + +## Weather for Utrecht, Netherlands: +Current Conditions: Sunny, 71°F (22°C) + +Daily Forecast: +* Wednesday, May 14: Low: 48°F (9°C), High: 71°F (22°C), Description: Clouds yielding to sun +* Thursday, May 15: Low: 43°F (6°C), High: 67°F (20°C), Description: After a cloudy start, sun returns +* Friday, May 16: Low: 45°F (7°C), High: 64°F (18°C), Description: Mostly sunny +* Saturday, May 17: Low: 47°F (9°C), High: 68°F (20°C), Description: Mostly sunny +* Sunday, May 18: Low: 47°F (8°C), High: 68°F (20°C), Description: Some sun +* Monday, May 19: Low: 49°F (9°C), High: 70°F (21°C), Description: Delightful with partial sunshine +* Tuesday, May 20: Low: 49°F (10°C), High: 72°F (22°C), Description: Warm with sunshine and a few clouds + \ +""") From 0b43f6544c228d5589eda1cf1e4a44052dc517f5 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Fri, 23 May 2025 14:14:50 +0200 Subject: [PATCH 04/34] Add builtin tools --- pydantic_ai_slim/pydantic_ai/builtin_tools.py | 41 ++- pydantic_ai_slim/pydantic_ai/messages.py | 51 ++- .../pydantic_ai/models/anthropic.py | 45 ++- pydantic_ai_slim/pyproject.toml | 2 +- .../test_anthropic_code_execution_tool.yaml | 60 ++++ .../test_anthropic_web_search_tool.yaml | 296 ++++++++++++------ tests/models/test_anthropic.py | 12 +- tests/models/test_fallback.py | 6 +- tests/models/test_groq.py | 6 +- tests/models/test_instrumented.py | 8 +- tests/models/test_openai.py | 2 +- tests/test_logfire.py | 30 +- uv.lock | 8 +- 13 files changed, 407 insertions(+), 160 deletions(-) create mode 100644 tests/models/cassettes/test_anthropic/test_anthropic_code_execution_tool.yaml diff --git a/pydantic_ai_slim/pydantic_ai/builtin_tools.py b/pydantic_ai_slim/pydantic_ai/builtin_tools.py index 6c22fbcff..82bb33e5f 100644 --- a/pydantic_ai_slim/pydantic_ai/builtin_tools.py +++ b/pydantic_ai_slim/pydantic_ai/builtin_tools.py @@ -1,7 +1,7 @@ from __future__ import annotations as _annotations from abc import ABC -from dataclasses import dataclass, field +from dataclasses import dataclass from typing import Literal from typing_extensions import TypedDict @@ -19,20 +19,6 @@ class AbstractBuiltinTool(ABC): """ -class UserLocation(TypedDict, total=False): - """Allows you to localize search results based on a user's location. - - Supported by: - * Anthropic - * OpenAI - """ - - city: str - country: str - region: str - timezone: str - - @dataclass class WebSearchTool(AbstractBuiltinTool): """A builtin tool that allows your agent to search the web for information. @@ -47,7 +33,7 @@ class WebSearchTool(AbstractBuiltinTool): * OpenAI """ - user_location: UserLocation = field(default_factory=UserLocation) + user_location: UserLocation | None = None """The `user_location` parameter allows you to localize search results based on a user's location. Supported by: @@ -82,3 +68,26 @@ class WebSearchTool(AbstractBuiltinTool): Supported by: * Anthropic """ + + +class UserLocation(TypedDict, total=False): + """Allows you to localize search results based on a user's location. + + Supported by: + * Anthropic + * OpenAI + """ + + city: str + country: str + region: str + timezone: str + + +class CodeExecutionTool(AbstractBuiltinTool): + """A builtin tool that allows your agent to execute code. + + Supported by: + * Anthropic + * OpenAI + """ diff --git a/pydantic_ai_slim/pydantic_ai/messages.py b/pydantic_ai_slim/pydantic_ai/messages.py index a0ffe38ff..458ea1fc6 100644 --- a/pydantic_ai_slim/pydantic_ai/messages.py +++ b/pydantic_ai_slim/pydantic_ai/messages.py @@ -349,8 +349,8 @@ def otel_event(self, settings: InstrumentationSettings) -> Event: @dataclass(repr=False) -class ToolReturnPart: - """A tool return message, this encodes the result of running a tool.""" +class BaseToolReturnPart: + """Base class for tool return parts.""" tool_name: str """The name of the "tool" was called.""" @@ -364,9 +364,6 @@ class ToolReturnPart: timestamp: datetime = field(default_factory=_now_utc) """The timestamp, when the tool returned.""" - part_kind: Literal['tool-return'] = 'tool-return' - """Part type identifier, this is available on all parts as a discriminator.""" - def model_response_str(self) -> str: """Return a string representation of the content for the model.""" if isinstance(self.content, str): @@ -391,6 +388,22 @@ def otel_event(self, _settings: InstrumentationSettings) -> Event: __repr__ = _utils.dataclasses_no_defaults_repr +@dataclass(repr=False) +class ToolReturnPart(BaseToolReturnPart): + """A tool return message, this encodes the result of running a tool.""" + + part_kind: Literal['tool-return'] = 'tool-return' + """Part type identifier, this is available on all parts as a discriminator.""" + + +@dataclass(repr=False) +class ServerToolReturnPart(BaseToolReturnPart): + """A tool return message from a server tool.""" + + part_kind: Literal['server-tool-return'] = 'server-tool-return' + """Part type identifier, this is available on all parts as a discriminator.""" + + error_details_ta = pydantic.TypeAdapter(list[pydantic_core.ErrorDetails], config=pydantic.ConfigDict(defer_build=True)) @@ -503,7 +516,7 @@ def has_content(self) -> bool: @dataclass(repr=False) -class ToolCallPart: +class BaseToolCallPart: """A tool call from a model.""" tool_name: str @@ -521,9 +534,6 @@ class ToolCallPart: In case the tool call id is not provided by the model, PydanticAI will generate a random one. """ - part_kind: Literal['tool-call'] = 'tool-call' - """Part type identifier, this is available on all parts as a discriminator.""" - def args_as_dict(self) -> dict[str, Any]: """Return the arguments as a Python dictionary. @@ -560,7 +570,28 @@ def has_content(self) -> bool: __repr__ = _utils.dataclasses_no_defaults_repr -ModelResponsePart = Annotated[Union[TextPart, ToolCallPart], pydantic.Discriminator('part_kind')] +@dataclass(repr=False) +class ToolCallPart(BaseToolCallPart): + """A tool call from a model.""" + + part_kind: Literal['tool-call'] = 'tool-call' + """Part type identifier, this is available on all parts as a discriminator.""" + + +@dataclass(repr=False) +class ServerToolCallPart(BaseToolCallPart): + """A tool call from a server tool.""" + + model_name: str | None = None + """The name of the model that generated the response.""" + + part_kind: Literal['server-tool-call'] = 'server-tool-call' + """Part type identifier, this is available on all parts as a discriminator.""" + + +ModelResponsePart = Annotated[ + Union[TextPart, ToolCallPart, ServerToolCallPart, ServerToolReturnPart], pydantic.Discriminator('part_kind') +] """A message part returned by a model.""" diff --git a/pydantic_ai_slim/pydantic_ai/models/anthropic.py b/pydantic_ai_slim/pydantic_ai/models/anthropic.py index 24a72c852..b04856244 100644 --- a/pydantic_ai_slim/pydantic_ai/models/anthropic.py +++ b/pydantic_ai_slim/pydantic_ai/models/anthropic.py @@ -7,11 +7,10 @@ from datetime import datetime, timezone from typing import Any, Literal, Union, cast, overload -from anthropic.types import ServerToolUseBlock, ToolUnionParam, WebSearchTool20250305Param, WebSearchToolResultBlock -from anthropic.types.web_search_tool_20250305_param import UserLocation +from anthropic.types.beta import BetaMessage, BetaRawMessageStreamEvent, BetaToolUnionParam from typing_extensions import assert_never -from pydantic_ai.builtin_tools import WebSearchTool +from pydantic_ai.builtin_tools import CodeExecutionTool, WebSearchTool from .. import ModelHTTPError, UnexpectedModelBehavior, _utils, usage from .._utils import guard_tool_call_id as _guard_tool_call_id @@ -25,6 +24,8 @@ ModelResponsePart, ModelResponseStreamEvent, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ToolCallPart, @@ -61,15 +62,21 @@ RawMessageStartEvent, RawMessageStopEvent, RawMessageStreamEvent, + ServerToolUseBlock, TextBlock, TextBlockParam, TextDelta, ToolChoiceParam, ToolParam, ToolResultBlockParam, + ToolUnionParam, ToolUseBlock, ToolUseBlockParam, + WebSearchTool20250305Param, + WebSearchToolResultBlock, ) + from anthropic.types.beta.beta_code_execution_tool_20250522_param import BetaCodeExecutionTool20250522Param + from anthropic.types.web_search_tool_20250305_param import UserLocation except ImportError as _import_error: raise ImportError( 'Please install `anthropic` to use the Anthropic model, ' @@ -207,10 +214,11 @@ async def _messages_create( stream: bool, model_settings: AnthropicModelSettings, model_request_parameters: ModelRequestParameters, - ) -> AnthropicMessage | AsyncStream[RawMessageStreamEvent]: + ) -> AnthropicMessage | AsyncStream[RawMessageStreamEvent] | BetaMessage | AsyncStream[BetaRawMessageStreamEvent]: # standalone function to make it easier to override tools = self._get_tools(model_request_parameters) tools += self._get_builtin_tools(model_request_parameters) + beta_tools = self._get_beta_tools(model_request_parameters) tool_choice: ToolChoiceParam | None if not tools: @@ -256,11 +264,25 @@ def _process_response(self, response: AnthropicMessage) -> ModelResponse: for item in response.content: if isinstance(item, TextBlock): items.append(TextPart(content=item.text)) - if isinstance(item, WebSearchToolResultBlock): - # TODO(Marcelo): We should send something back to the user, because we need to send it back on the next request. - ... + elif isinstance(item, WebSearchToolResultBlock): + items.append( + ServerToolReturnPart( + tool_name='web_search', + content=item.content, + tool_call_id=item.tool_use_id, + ) + ) + elif isinstance(item, ServerToolUseBlock): + items.append( + ServerToolCallPart( + model_name='anthropic', + tool_name=item.name, + args=cast(dict[str, Any], item.input), + tool_call_id=item.id, + ) + ) else: - assert isinstance(item, (ToolUseBlock, ServerToolUseBlock)), f'unexpected item type {type(item)}' + assert isinstance(item, ToolUseBlock), f'unexpected item type {type(item)}' items.append( ToolCallPart( tool_name=item.name, @@ -305,6 +327,13 @@ def _get_builtin_tools(self, model_request_parameters: ModelRequestParameters) - ) return tools + def _get_beta_tools(self, model_request_parameters: ModelRequestParameters) -> list[BetaToolUnionParam]: + tools: list[BetaToolUnionParam] = [] + for tool in model_request_parameters.builtin_tools: + if isinstance(tool, CodeExecutionTool): + tools.append(BetaCodeExecutionTool20250522Param(name='code_execution', type='code_execution_20250522')) + return tools + async def _map_message(self, messages: list[ModelMessage]) -> tuple[str, list[MessageParam]]: """Just maps a `pydantic_ai.Message` to a `anthropic.types.MessageParam`.""" system_prompt_parts: list[str] = [] diff --git a/pydantic_ai_slim/pyproject.toml b/pydantic_ai_slim/pyproject.toml index 15d0bb838..32c30eaa6 100644 --- a/pydantic_ai_slim/pyproject.toml +++ b/pydantic_ai_slim/pyproject.toml @@ -65,7 +65,7 @@ openai = ["openai>=1.75.0"] cohere = ["cohere>=5.13.11; platform_system != 'Emscripten'"] vertexai = ["google-auth>=2.36.0", "requests>=2.32.2"] google = ["google-genai>=1.15.0"] -anthropic = ["anthropic>=0.49.0"] +anthropic = ["anthropic>=0.52.0"] groq = ["groq>=0.15.0"] mistral = ["mistralai>=1.2.5"] bedrock = ["boto3>=1.35.74"] diff --git a/tests/models/cassettes/test_anthropic/test_anthropic_code_execution_tool.yaml b/tests/models/cassettes/test_anthropic/test_anthropic_code_execution_tool.yaml new file mode 100644 index 000000000..f29b41ec6 --- /dev/null +++ b/tests/models/cassettes/test_anthropic/test_anthropic_code_execution_tool.yaml @@ -0,0 +1,60 @@ +interactions: +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '143' + content-type: + - application/json + host: + - api.anthropic.com + method: POST + parsed_body: + max_tokens: 1024 + messages: + - content: + - text: How much is 3 * 12390? + type: text + role: user + model: claude-3-5-sonnet-latest + uri: https://api.anthropic.com/v1/messages?beta=true + response: + headers: + connection: + - keep-alive + content-length: + - '370' + content-type: + - application/json + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + parsed_body: + content: + - text: |- + Let me calculate that: + + 3 * 12390 = 37170 + type: text + id: msg_01D3uRsKuEcst7jtMdwoqYUi + model: claude-3-5-sonnet-20241022 + role: assistant + stop_reason: end_turn + stop_sequence: null + type: message + usage: + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + input_tokens: 18 + output_tokens: 20 + service_tier: standard + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml b/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml index 6aa1e7519..3a59790f2 100644 --- a/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml +++ b/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml @@ -37,7 +37,7 @@ interactions: connection: - keep-alive content-length: - - '25705' + - '25971' content-type: - application/json strict-transport-security: @@ -46,139 +46,136 @@ interactions: - chunked parsed_body: content: - - text: Let me search for today's date and any significant events. + - text: Let me search for information about today's date and any significant events. type: text - - id: srvtoolu_01RhAr4gUKVGNh2F9DLT4WNY + - id: srvtoolu_01ALRFK59SkK8D9e1Xj2exhq input: - query: current date today May 14 2025 notable events + query: current date today May 23 2025 events news name: web_search type: server_tool_use - content: - - encrypted_content: EuwCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDENTQOMiruuPOENZYxoMwVvlhptGQ/WfhkJKIjDA0aujpCVZ7CzE9fpfZ8vEfn2pfxg384zlVeCpdeU2njTaFx6shdbgS/Wvm/JH00Aq7wFjNSSAjwRFMBTp5zqyULRPar0riRk0kNRf7HUi+hIwTpvSJ4sLgFzMeeVHo/0BRBy1355ugtI/auSOnlXmPVgXp6wTaL35BJwJ+8AMRoF9hf2NAwBhPEmPmtomsxJPv5z+MHEzEhc3VlE3xaSZvdcMRaBaV4UYFv+iEjbtUnOX93j/WkyuaJdiC8JhQz05FRzYr06NHHIt0s4nZ8mV1DhLJcHT629gMTYcQ1WohEQR/k0IlOim2EcOlnOdQ9jydrrBqSZcXiFj1md/+araQ5qN7vCSBK8wt7eV0yiWaMNcnY1+1ID7eTerKQaZOdAoMhgD - page_age: null - title: May 14, 2025 Calendar with Holidays & Count Down - USA + - encrypted_content: EvYKCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDI/hbUSxQZPSWMwO7xoMxyuxfcQKb+8mOPpjIjAKK+ApU1RaFto5mWlwM5k8iEi5juZVRU1xY18ez4rV7YiJHtssA7lBadfIzGGJ3qoq+QlWiTqY/hH75J03S+I+HUn4NkcVZAUIJXPRbhhEuFMj8w1EdI2hhLGeOPnNHZ1fuykYebO7akF1fcbtzEm2ok04u8mAE4oUdg8NzIWmO2QyH9cs0QM0MfIyM2pdGcKPqVMIAek4HrHO4OfGANUDpnVsnNO9XvABIgWXltfv9EWH+iuhzms+GG46hrJxMpy5qDefjHsHzTfr9Rv538S6Hk/JSc/v2cbmoiY4LP++58eKxhQabyI2HM4iT473MCP0OjhA8lCe0VV/5KuMfQL8ywFhThrkIUXu0AdhlgBQSAcu5SI3JkVYcr/ss8Xxbhxjg9tK6xyNkvYj7bJj4q+glR6fTwn9dWkRn0umBN8jUL/tw9BTXYcD3W35J+rdLfLgS8Y1QRnhI51OFFLYAmMj1aiscjKNEoANJtXDDQXjGcQdZTcWBPu6wG4vv3N2sIF3hDE/atxFGI53EZdh/43p6jeGra9Y0seQT9mhA3Dsqxq2QdK2n6z2Aj5RzhN/kBvVfF9xq/o87RJ2QuTr6tub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ajspdX8AjCb10b4j5Kt0xp93d5/nNePkaMu/FTaNwCV7IlbVqpiiKgkYez++VnSjKvtq5dA0gVoWfHghv8xv7vU6RGAM= + page_age: 7 hours ago + title: 'Horoscope Today: May 23, 2025 | Vogue India' type: web_search_result - url: https://www.wincalendar.com/Calendar/Date/May-14-2025 - - encrypted_content: ErgLCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDJHVFtPE/ya+huasEhoMQSPb1dSwMrdh7YSIIjBNbA8bqpJm6SgBalw8iygcItghQyZny2MHi+KtOw6tATA27DwMSauaMAT8iyfL6FUquwoLofO1XezkCrC5RA8451ydQK1ehbA1eOiirPdywVtfH2WQ017pbT9+fNZCELd/Caxxuvu0yIgQs1X7/m2O/ijHxUUSW9PyszCz35KTGqlXXwTKlUxrp0tNApdrRu81bETresUb05CKQimiwN/9Jf4DgDUmIo5NiP9angpV1KiCv0oaepSWJ0BHmGAuASFfEoI7Dj7epTKSH/ieEn7/XzAjaXvQBK4ZU2lVbx+CTltGbnu9bi9tCfdPlyDSkGCYkkPezUvsA9MJhdS7dhO1lNN4Hb/8vd5O7itT5DgkBSwrV9KNNpvWNdojTDayc/ocf+tCp7lgf4dFkyLSkukCejxCJNeVc6XZIHitq2vpkjVoBbdwpa6ro7bJA5Fsib5u5oyD9s0G7hs40vRpz8q5CEnYLQpZmsxBCuQ3rt3M+7Y/kM29gY7tl0dG08v1gRtdc7XsrYxgLkVf04mjmoHCE8CK8Bh8X5oCrMs5KOTHIQoPh307AyPTo/t40MDjVwhmH1HmrraAQDD748dRqWCI8GWYwoYCFd9LCYrA+aMS1l9rbfI0bXso64OZxGu4mZLoci7s2DZF7xT4O2iVQD+kEEcxUCgkh6SnRljNlFsLq0i+JAnEoz2b5ryX12RgxMeIiSnntLZtikIOWED29tG6UaKxwT0vehfMSSb6U8bYWs3RvknRCMAxTC9xAvd1sC8JlBVaB/QUVhn+JsjVqleWG9o0d81gMO8JbKoTBoN8efbXNgFnAEhnAyrJxM9ighQct7EV3vDZvmKwkUZp4QW1qR2rJTZjWKScLms79U62WJLefB9LsDM87hb7aKWdGyO42vcy1TOWsa62EEIYO/2LYRvv9oXvKVTaq9HINybGXDaa2sOcw5uUsgnsdX80km7my44YsK/AK+NVXlsZyBEY7r6wRsosY0ThMO3w/RswV9mSzAV9wbZydVFZKsJGPcUYJGez8szdSkjec22gfqIrkSs9rxXej8rpjFF7qJZorWz9eLgQJHXbZGD+VvWfA5xOIehc0drEyKq1tv6+Xp7zMtK0I6my628dzj659W87kEyHtybQShffk8ot0skcqP4EVDdLfIJoe5pdmoCshJqkvsedbhZJRK77w5psP+V1i/ukLmiIwU/H7zY4gslfEqvgLU9maf+lagy48d7bCVAJqQbSkWl1i+M+/wS+74gTvkG2PTvqlCg9X5WKcyz78uejua/Cma6YE6aGdfZuNpUq7UFulyAWGX1hSi8+10rfxElABi/j6EC2eWeC8ohgZ8K+q3wy2jnQu0/tiGBcbhAn6qrd4E3mx0KKvv8JZ8T+4NPIoTq5gSXGU0BJElQHHe5u9jKC1CJyw1QFPCoLpFgRA1cfjyE/DsAIrplAd+krSQMrRaRA6mOkqa4t4ugYidqRipVrP5jfRgjuhyERU/v6qbCOsiFYpx3qL5Q9v4APZa1wLNC1eAZnQUXYXizJvfY4ZKXNZ3YXawzJwweGPZQUHIVnHD4mDKjUP7TY2rPONPTmI4CXhMLeCVOofGagXssAraRJOtLSTLHHReGqRTtyPgqvGKwgnM3rzFMGC9on4YoAdsmI4qQCXf28rURZLZPL4qMbEv4I6mLcPTN3tIuvZ/nWq7L7Auh2/tHshawDC51AGfDsTPaqAd+RNWCvIDlMUpz+ibhvyD1tvfi27vId6OakaBIztcHrQJAIkfndrkE6ExQzRAtWKpetHRU/YTEm1JqAEcBQpXzLfiFGAXKhd6kac6bx736BWgUpGGdrcR8IG+aIhio85P8jlVJSGAM= - page_age: null - title: How long ago was May 14th 2025? | howlongagogo.com + url: https://www.vogue.in/content/horoscope-today-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C7eFqb3XIVEp658hjo0Oz6Ih9cApzJfiXY3Iine2d+jHbGBO+d68th9rwW2TGKUG1WxleTf6EFSsq07wDp7QorY0i009fNEnKjNZno0iyg+wwg9hrSFKZEP54bL3Ggco1IfcC7GbZQuzMtTn11Ghxum1QSxZdn5t0zxZeBLCoHdv17kP7OAAk56825DVNsCw2WNwFfUZk5jyHAOzvMjLL+s7ROrhvAWS0e5n0r2wk2pycd6eAvdcBZg9wHrw6oRRO6ieiv7CWB5ZUifh70Z0PBS+vLabwEbv94YmnlHI61zbQETeIvPdfx0vhC3aKdwOiHAh1oKEaUYvX/I2GbsvQ5EvsmvQN2PifBI+GAM= + page_age: 7 hours ago + title: 'Sagittarius Horoscope Today, 23 May 2025: Today favours real estate exploration and property-related investment + | Horoscope Today - The Indian Express' type: web_search_result - url: https://howlongagogo.com/date/2025/may/14 - - encrypted_content: Eq4MCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDIp4arY5Pc32EbAjyRoM7zbzg+hOuF1HknCLIjD+0lHVb9/Zb0tHt8GXocJqiMjb9jndCXY2GUxdWxVwXxg1ZTb2nVgD8oQWN3azkvIqsQsJDm7KBfbtPGi52mY9N+EgHsEU/o+PWE3kMHaOSc7n36wv5haaELoni8+lvQLN1kHo7PleOnYCpHQHDytO7CdVoCc2Ve/UbZphzWGCVhQjp9RmX9gh3TyuRJOKaA50jt053yrjYob+qcm8ZX0i3SHxczDI1EOCEv+3XKhZ56/tuW7fichaUvxniPhm7/ire8Ujccpv+HXRW9Eq/1ousHqfPDqxgm4a2BWxiqL4M5SiclzjvWUANksfEtdYc5a1h7ETThFDfYnbxENZ5FcR/oUx0oDLfKBD3cdNsIHC/RxdOHPRaayTULcG7dDpoACaRaUOBNJhexLoKyoJ9jy1uPjDw7FPTCzxNLV8KZCq0f1h46L6iJ25jeXWYROENgCRz96/T8OF4fxImkMdFla7+ta/Z7tXDIV70Qz6eHnZdiwzwzsR/I3A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87z8Zt44W7UmRHg7vQHiEjWNOWGgjIdLGrgOU6zNXLjcWCnHhyV5Fjbk/owDPWLEVpVkSC4l8BoyxHcmDgVtrrKsTWiGYBPCr0aRw31PS2CfmHfpMQGGV+Z157dVEAdGrkIzXXFSTcBCxyjzs6U8Mv08eQ2jlLCV+N8mf6b+AZcbYGNPerHNRPQ3TslwPn2DUkZNl8AnW6FRchEMDU8s1p99PL39kbFcY81iICHQks61uqK4vzeKoeWAOjD9j6aHpY9yaiAAakTv7Cyxet2qWRr8VVkz79JzDJMswzi8ePvd1u67kQScnLq+uEKd8P2xQ4mYhQvt5FbFX1Kp6bX++MCVFHApXecCGDdfULzpdD+KU6QwyuwctlnEFx+sS3XQ2u8SM4HqXLyZ9fe1pIpt/jpD5O9q1FM+iAHDLnlQ5xgD - page_age: null - title: What Happened On May 14, 2025 This Day In History + url: https://indianexpress.com/article/horoscope/sagittarius-horoscope-today-23-may-2025-daily-astrology-prediction-for-sagittarius-career-finance-money-love-10020998/ + - encrypted_content: EtAJCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDD3tFx9a2iDqJWl6WRoMBVqhD6dltrjObVsgIjCVGW1c5PmYPcrXvq0c78H7gjjxs+M+yJkoIz2pfjBchm8LajiEpkfIynRSvd+Ym4oq0wg0evN5iA8qD3woyOAJqikGVSvs2nTDRmKBpKdHDdgDf3Na9XAw1n/uQnWWLn2+wtZbB3dXUekFZ+c0zzeQxo74Jrn6I964ykL9xq/w7Z+D4wr28WLbK5ITEq8lkH3Sacqysh2tegSHixLmnfTO4DkAEnlFpKpu+V2Rbs/Mu223BAcztshvXqUvkuXsvKSBVSOPK5Mig8HEvHG3uipWZ1Oug0GnE0pVlWiyjbGT8MnYExZGnORIobr6lVN3CXXf3I7dbK37PGpEjIAu5XJtvam4XqrhIS2xCMHniBefKYGdwTX2OH8HJ1rRybcVto/imdvGbOalGKMto8jMD5bNrWdA4qDCmpY9sK40a+xcrA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TlMbWD7uzZVlPmWuDNwJPZlSCT7UcnWTaQmJz6xwip2waafNo+yQ3gFKoYAw== + page_age: 7 hours ago + title: 'Aries Horoscope Today, 23 May 2025: Ganesha sees you leaning toward creative projects | Horoscope Today + - The Indian Express' type: web_search_result - url: https://www.whathappenedtodayinhistory.com/?m=May&d=14&y=2025&go=Go - - encrypted_content: Er4JCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDIPPDjYA/kRS9AaiABoMGQoXNgkDmifibxmuIjDyhA1T2HToHbs4le4kGJ9Y//tBf4a93M1DW2pRJrnFhDRW/VcymcpSMAmnYA6d9xAqwQhSjL4AlMWcKjB94746Jyv88rDw2FNUosUYsTdwkNWtX73yG5LVqn9ez5zPkhcMTxmaRxT3wQ5N5aU3UslHDGoc1bFaHCmjHJAeybTvkVeC31wjpStzyPRLnEzh9BikImrnpu2HBfs9/i83mgFwteIun7LLk4Z3dsCfAjtvo0uRDqozXgUpUQVNQXKTMoCPI8bd2CmJelw7PF2opmb6LnyU0/g3ED62QToRbFkSAyUWAiuFX5VODjNeEnTNR8jSLn6llgqOFSl4D58o1D5TKEfLcwupwwuzfIo2PZxlyd+5ICFoWWw5gRJqT8z8sp5wADgwfCxZsHKeB3hhHrvaGchbxgR1vhtgc+U6vFuquyzibt9warZ01AZ2JjtGho9QKF1ahSjbwqcwJIVCN3iFQA0v8WL1NmDorH9Icy/8wmtLJNjP7bspAah7RNIhgKR1Lq0KmdBIdY0W5ri5cuTiRJwPjeF9zshX4PLKiWbDs4w5AR6ELQUj7S/VGW7eV0FXDcnxcA7u7lwlaHf9yf5XtplQ7x3SEHoJ1Ue0DFO4XI4EirD6W60YBZDtA4sh+a2F+Puxy3nHeNsMmB0XUXzqLQobOw7y4SnPTp3+7p0g3xzXmLmsyeNpAxRGjM1BDp4y6Ms184eUFhVUrisx9PMdEVj/Eypq2yoyoa9+ChmzqcaNLBGyzMv4vC3FO4Tmp4zLGERn9YAiOjNa73k9jcLV+WK+T+LVHwbCfA1EMGXBu6oqOLfPmpAbAp66Q/fizFzNcTbJcc+DbPU35WZMyYK3E3XhkDzvx5JhE0+yn5kYC5vPuQwXHaUdNVKieU1/r/pPBV9Y8X1jLk/p55t3HZON33EXT1kcv93Rbf42vnpgP4UzEZQbW578ruOwPQwIxNbVIjzDbQuMRxq4IgFhsRP5cd3XQl6UkAtQLj+mtMbHWezLg8CLBRj0K5gBYW61EM/DypbPaBerhXSloBVgxKZqgUdMcGuWlDQnVZmVvPFFAbrP2zPKmGY9mDHGan9WxvMWnRA71tu8LuPT+jTQwFMPMbeWCYh971VbBvSk+R14Q2dpl1XIqsACDUjaGVjYFx9qEIt+WsNtzclmTxDvK2Swy3spI37xyXU50IHZOEfBGL+RI77DyZFxYCzXXYZTYj7UKdqzupwYEtfKlAogOtwGcCZ3C1FOZ6nVlHuQgbLqPQk6J+nNlO9zYMywWVmlIYpU7xE5wh1emhjzUeIdkLQ6o+7Pc7C/DrQ+G0kSzG3dX8Sil7p6Ct140Cwoeu7kSD2uTcmoqkBF9UqxigtVWMhb4EZ1yzLAxyt+T7WMMG0hURKNytTLfxb3o4JyZ7vC2hEP/iqWEwrznV8m7l/stS9czZM18p7WYifHfTNq4XBsmV8EqFGBQn8MkaAkRT5v7L9Qi3TZabSrbld7Py6UF8xAiper68HbVXr9jqk641c4Wu6yNhcYAw== - page_age: January 1, 2019 - title: Wednesday 14th May 2025 | There is a Day for that! + url: https://indianexpress.com/article/horoscope/aries-horoscope-today-23-may-2025-daily-astrology-prediction-for-aries-career-finance-money-love-10020982/ + - encrypted_content: Et0KCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDBq4olrZFHF+J7dt1xoM4bAEoHkWzZty0vJVIjA5Dmomb4aD1Bnw3XVZyhywjrUcaGHukZRPGuUuU+YpIAfSSidBXqmlvJNiz5Uy4QEq4AnKQQzJ8iu/iVDcg0mmgTHr1Hon4M4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waeCDa1VNIx2/NsFCzBIzGnlVXJhvAEDdHGZ36qHH9ObKa2eFodkxIwpyqJS+4Ommu2LuOzIu3W0LcAhphXnpTgHhh1PjBriqb2kyIBNn8Q84w5XUux5HViy2Q9NKINNmftQn3uKLvKfs3idQYIizwW5GrBkv+TmSAYIAgigtr7YlnAjHyxy/79av029p0ZxxAcH12uEFBLFFFJIBgX5amErn62AdhyCpr5z0H+Ck7sX5J+FVHIKmOeWN8ptCcYeg/D219XUZYEDhacblCbIDBrb5o3KdM1LPVwfFeox/EjOEC185UC/N/mZMPVSb21XdWTAcWZ9PPzUqwAMb+9DKbtCFPx6ZbN1h5in+k/rts5+QUKCbgaall0a9hKSAMr7AHMi17iAc0vYBjG7UZpIw1dsuyWDo1NPELzoDBwRzCtAxm4BSHnt0cdxyaf/41Xj8QAclunFwR8HYGBKVcFDfMqh94O7reBCHiXmiaeGul+K9KMa/fdfT3FKx1X779fpG0+EbTGxeTPqYAWp2IQ/LxXfa0hnX+Que5U2iQowLkjjyiU07a5PMYAw== + page_age: 7 hours ago + title: 'Pisces Daily Horoscope Today, May 23, 2025: Meaning Is Hidden in Simple Belongings - Times of India' type: web_search_result - url: https://www.thereisadayforthat.com/calendars/2025/5/14 - - encrypted_content: ErADCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDMhOMyVwq2J/zkOd/hoMcqpamRXHCa4nWgbsIjA49SZ++sNY8IPe8sobpikWZQdV+rOyNYls+kUzAyRmS0d4lEa0PGCnrfmTl2WRZe8qswIWhFzP/ARu4qJSB4qRF73+r+0VI5X4gKHBoSSTJXF+1SpI7kzi1qu42Fmhp7rivBR5d2JJxd+GlRaSei+leN3gD5Ab51F3WTf9FWbFkS1UzUU14Ra52u87S7rVivBAjWFAA+Of9ShMY5Aiqt4AX/ka957jgvATMekL8qd0BVtGB12egrN94YVo8CEtb5Tn2Z4tazwziZ29uuSKKe0xnKwuHXIJeK3Gdc+SH5f+ig22ez2L1pumumJZkEuFodYH5WfOnyZqPaa6++35pXGUwNtv+XQB8OFbmMymmsDQnDJOZ+gex6gqoP2uafzoEqqkSqVSAR8pznVs8mWkDJMl5DBE8KylSAB1vKVyNHytUzYN+8aMWTfxtjUrl6gfuHarNc+l+Ta0zTR2ESjyOnkAs3YbHyXtGAM= - page_age: null - title: How many days until the end of 14th May 2025? + url: https://timesofindia.indiatimes.com/astrology/horoscope/pisces-daily-horoscope-today-may-23-2025-meaning-is-hidden-in-simple-belongings/articleshow/121343860.cms + - encrypted_content: Eq0ICioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDLOvJkD5k12EJV0xFRoMMZpX7u/ZhJlnMy3NIjAQ1LwSNr3eZ9XTu0sQXza6xp7J2/P+ed46KYL7Nap4nyl0q2LoydtpMnvPMh90g10qsAfAGdqlb4eoF2zJ4ejehLLv0N0s2mrLzzWFUrv71ox2mpVfqwnkjq3VYnonsQyJKERY7S0pnRwTlaO4c2WYV644c+xvnaYGpY+IlYfkJ/71kBO5hglWG2valdWZ2v9omGbNiXMqKSMgt7hFKgRAr/rhHqxeNYtApWalZckzxX0DvdtbN5HVWSyqGBYlUgDDTsvLHTWaxfDur5Zfe2EFTbtdzNfV3dT69I07iol/bZsOMBcDRhXp0HoMvpClNo5VrntvSGBSet5nzJfiowmm6zF7nBrWnOWwQQSou2AQnUTviUrdEA61+92OQLSXbi2/qvF9gDu+jpIsjfbfcQNTLN/kVNYGLpSDl05aI0iqP6m6kCcPUaUvxNAkA+I5t09RhcVzg7Etnd/9kWZFHoXxybR2K4YFai2obUacDR7OpRFAwAqQ6Pgd+rNOYjew+8uC6ix4JIfnHXqcyXsysCUXfKxhjXblqL9Bliz4bBpN1o8h8xlj29A8701EgZkSNIMFamhOys7jXc1wjmqY9aXU8Y459vwLYFCfKGFbAmxIFv30zWvevZ8iCrkq6+hCP7r1Uzi0XBX1ZDJrqlWZtqMqxKbby5NDFoemsXpdeJyvxYfrNLLSAJreYJ918PymfGmUIH0RDvv6wsYnGPeQvuq2SF7Rc+ITy/6JfQlWAD8BuPCJJkNBGhYTgvB87EH0urdua3gvIpNVCQ8xu/QZGmgF7Ob1/sAXYJ307OkTwPs5D0Dh6MJEbgkV5uZIGR/4qdkeqDs/aFmdOkAa6dE+WdNwGHzVD0p3GPgILmj0n+3s2+EtQR6KAk4By/UCuX2CqZL2bk39b2qe4zFYfYbwZHoHQjpPM8cdUlNB2oiEy68NMZDLoQ0TjlEDli0+DDtqy5aHvGX/dUUF1apMIVwZMZrAenQ1VuczNKwKhLM3XId0fTkdwKfPxatWYML8mY1W0pJZZxU/DN7gGGG5q7XsCPVOyHf3lu4M9Bapt6sJe0VBOAsAgmVoiDvtGa1oGfFvlLJU5/w4sknLVqm1/oA1eOEnFdxvoSiOnkyojw2mlmbqNrY5iw7gK64juvypzqUt8IcwHJTaIBXPcCtY3bLqQ42ADmoPCdYosYD6/Y29LaA+cue5XLx/CcpOZZMdOueoxTDFckRNOp5qzZjzCwfiZnLpBJA0SLFjD+mWhEDqRmZjnUW0wsY6Ued9xPEBXfUM6X07CrwhNMnj6BxfBmCn2OZuzJASAriXoZabcxT1QrxfM47z5hgD + page_age: 6 hours ago + title: 'Tarot Horoscope Today: Zodiac sign predictions for May 23, 2025 - Hindustan Times' type: web_search_result - url: https://days.to/14-may/2025 - - encrypted_content: ErwJCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDHslw9mNBIPhRDVdexoMfUzHqm0JhuxmTdSAIjCoew9gbwGPEz82g5AtA/ijcUGExYiRt64rH3n7weaW8VVW17pIwW0RV/gf2bQcJk4qvwhVUZWohvyyThYcpCvmHAFfwPVqrGIHMlMLHvgXRUIyOjYsu0836KECfhCLsJ/wspWAfVi5YYKkePYUAo3MUH5biPCW3I2BAUFTYkTYb3qD5I1OTQ/nbBwkTP3ZfjdLZyWA3ADTbUuDQ+LdipaqJr2eKJs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M6YKoFOrlXQmOMZ10y1b8DiyXnDyxyoYr6Izs5gqHelN99y057qDtYFKx4K3VFXGZdKZC4hoCmsaAOmV43SZfLUol+wW8pTUxKNmWJps76ladybLH6Bi2FTlz7L6VcqrWdj3mNFzRRwNiLM7JpRL1xacCMQo9aVeOvEJozsIDpgd4QHQqWN7fUSScFrCubQ1bVbAegBPZBtqcGjIfjsm3pWqGAM= - page_age: null - title: What Day of the Week Is May 14, 2025? + url: https://www.hindustantimes.com/astrology/tarot-horoscope-today-zodiac-sign-predictions-for-may-23-2025-101747812397776.html + - encrypted_content: ErIICioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDEoFc6QoKjloLSzLGhoMyxbWSt2S58TJ3hxSIjCX/IaQvPakDfV4z05AuEC3Pt56rlk09aIfD9o3a/lMbiWo+EmB2GrtRoA4ZLn11G8qtQdImlz4GkvUtHQPJf1XrRLswnxP8S855kdWVbia3okuGk5pk+9Ly2UDPDthFTM0JzuZIdqKHr9jrWL0r3Z8U97NNQdoiYn1CkIX5tRNjD1AnLIXqAFHI9F97c/3L5tIAEpz4LNp9hy79W1wevZF7QHDA2iNM9LMiCXA0M2dpGTUn6YGnEhtlw5KTi2pkJe+VNn+L19SOjYqCyrcQKa4jKhTZN7YGdWnKSWIAR8v5IuZNuhjLeecVpY8+dsyJb2H3wvvV2l83nkTeZLWdcq6vpAHaQinfe24BBW5b6kmCz9kPQ9rytEhRsjMwr7jntSf/RvejNW3PX7ZWkgfDiAxvV31sJOyw0b/sJTDFHU7eNjnvkJOIRtMK5Mh5bQqERJ2//ZfSeMdUzjcNWkP6evqW9g7BepfEjCezIfW9ndVD9ZWK2qnyX1VVX+Lr1eF3DFGQRyZv/yhjwR/heEqiwo8mHySVBoiJ7oZWI4YJPssqgIfz30V6QCVCNRYdMyNoDNzDtuaVMnO1mIoUK5iNlK2bfWIyy2zzrGXB0cmpUK9LbESXNG+Le2ZRAQr6nx/ufgNBx8o3tkmb1409xV+C2U2acs+8JiaVmWFXy3e9gzyDyf59i4ZhA9B8E4w4DvSw6p72FS1qwXkmR2cSefN4ebfsIxuquvHFPDPoPnoPGx+ajPdVPZUO4LHjkzJF4Dft0hnDwYnO9nQGtNa6oBG/XvhL64bijAOzttai3Mm2x1q4v0+WLg4HR5JzzFODBjo3gkYjYKx1yGdGNEBReDuMo3SRDExW8O57sSD1cFGNHZQq9qqILYf+3JkyE5smvDCiCQadKXbCdcXOoaeMB7LHtUnnSdAedj+5TacMIC4D6Lm9BDPc0KZU6URbaRY1L8lJnPPZWycbefU0SI+DymFgMWFH6UsJw2jCmb1njQPitmfyHYJ+cFaJuak6xGtzeYmMJbhQD8KYhVncpM21yRDKndCUuNjCf4OBoNZTO6v/vvYaUZEnDeXjovFww23pEAaUaBBXVz9oeUMS1/ArQjL0vg6d7HFZofx9Osmgv5+uURtCASNJrfOcB6nFLdC6pg6/aXu9znM+IKtSb7b3rRnbAq+1Qi99SmCcK8HM1nve6gLYzm/5vMrsxhWq/QdEvG9sGSSTAICIicgfE+6mysGV5SdIMiWDpysRRQrg/HWIFNRFxno/Vg1Q5Q+1rKk92p9aSCgZowByNrQcq05uluvnDV4WiMviaMtsJ0vFQeoi8jhkYqR/MVMoE09GAM= + page_age: 8 hours ago + title: Libra Daily Horoscope Today, May 23, 2025, predicts creative breakthroughs | Astrology - Hindustan Times type: web_search_result - url: https://www.dayoftheweek.org/?m=May&d=14&y=2025&go=Go - - encrypted_content: EosXCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDEOuUR/sMbSMSI4vIhoM76Tnlqwa0FRDdPSZIjDTATrEKH3Dky9TR9ixVwrQU75xxZwC8RdR/gLNcJIks0Spurm+cj1BpexrJvgdB9gqjhZ57zNnDUGk8S8ByO11j0QBHrWBmHQ8hIoz8CMilKQlvF0QQa1uA7vgBPZb+L4ZyCTSfoDUOvXi6HmGoxPj3lXp+KKxFS/4bcf0U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rWLwRvhCcpvXGHqVJ7VJ68JqbzSF+3sBaIv+w79Xc67XM6xmLCqYfG/modDuAmDlIdBVhI0SUdTQIOTikumfQvtfe3N5ELgwI7ntv3l9memSW55Dqcf/qZ1mlfl0iupz/MZcl+cd55tG98s3UEzQH306qMdNTmNMobV9YWbxxCyHz7sjUzC7GCq4uJ4bedXk4Aod6SWaDs9p6fqde6FRT74k9UkAFPtiYqSS+FitTDRpd6myTYToio3Knmb+rg8P44BlEx3SDVKEPazyqs33LArlSajm4P0fM7W8Xo65QcClpe7DdwWrUdWwWYtU4lGRDHH0KEgKx2sLCvKTZZVg7p/uXfvKhMn1x12ugL6NivGdFuEoieKIcGI9BKzkbAG61oPIs7PQqi8uu3aoAIPkjir6mLygfWmbUtxA99vxgyqCVTNqkHYKqR0GAM= - page_age: null - title: National Holidays on May 14th, 2025 | Days Of The Year + url: https://www.hindustantimes.com/astrology/horoscope/libra-daily-horoscope-today-may-23-2025-predicts-creative-breakthroughs-101747924124810.html + - encrypted_content: EpwICioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDKPDaaqaz0k5YUrSAhoMsYnGse65ktdFJ+VjIjBQCTS7izJVJkJRjg30JNTZYqM7HW5wnLXF5lxp4EQYnmaf5nefFH89U77jPFaDfmkqnwf2PYyTEkuVuCXK7oerw5/K6fIlkjnoAdCdoP9+2xO2dculHBQhlABRQDCFbnClLvQG7pJHLExLpSrYicn02hIq17lp079SkdMzbAhIEnI/M+z37ckzndxCQWmo18pBRWT2QfPgAOgxzr/Fsn/gD7Hxq8VRyznhU3FfHTlOWP4tqWDdyzYb2h1zC3va5FL7YF9Jk78wEr3R2ZT8Ig8ZefVc9+039CUXQ649zphHy8C9AB6C6mrGVWg/Lf/RTjXqq7Cjw7sipciIc1pKng4FWjFXOQAUA9SbdVpk/8zXzeFZ4wUCWDHHParKoqAAGvi99f7br0wYvtcaoeFJ1jmXkQWGqqRtnmpthwIaQBZ3f3gf1/kHO0ywvy3PqH50ToUF7fasg4VG3dQtvp3ewJv2aOeE8fsSCvbtJ5hor25b6xbwdUM9AysYLNkRDXDzqsBzqb8XOVjZvaOrlsK6Qjd+O+VlY2ck2dre1tLIgZLO8CyF53rz4gn8fn2qqilkhnC/QX8uww2RL9dml8r8oqLn4XKUu9/F3Cha48KX0sYy+LRGUIlX94bcTWTfV3cxyplWxGTagAVnV1JTz2aqBbplKjmIUv50WGhS0B/eJY8OYrpuyNhVDHee7DwelfxtvRQ9br4IyXXNM4XOZnD1P5tgnYawZguVWvTphn08D60jSpAGXzR1fpwiQ6qz9YDZGV/ZwDygap70HBkNMaKJ+h6bZsjUsHau1jWj+3Mq8KvTgju+Eb8cROo5eGQK0pG/8hJWJoa7BxSrb5ine53EJVauHGeoGbFown2ckPbd6ELWwvduaMJITmBTwcS7vR/TypGUtQ2ydGLE3JFQBs4LlPC1I/2MjedIn352YP3reJ3blXNXvC70azNXwEBOpdTjcXoYQyGKSPnXPMls+fMAuXll7WKSOFUZxM46bgyaa3fZAc0eFGf4ylt/3ItrKYEc4+TJhfXJWgZWGzHocWF1qGVtyoZhim+EHBjVhAySd2Y+Vzw1tRcptUcEGsa7dfCE27qn4Gmi8j7nm4bcmWgd4VxXGgXHJWFLJo1+vhGhGgD2OQtxtuseTF7xqEeLWpcXulkLWizzDhuN0CuQIzo+zskFknAmMzqj4Y17STrPWIJT1pnR4IR0fPCDbpymibAcQpTpuysPQrTMMShMkRWuu7QF1iBEdFkY3pUWHqSRA8x0gEXkf2jYzydQf4D8GTBsyAtzBO5xcBpmEIP9bvunCSnHDAkYAw== + page_age: 7 hours ago + title: 'Virgo Horoscope Today, 23 May 2025: This is a promising day for financial expansion | Horoscope Today - + The Indian Express' type: web_search_result - url: https://www.daysoftheyear.com/days/may/14/ - - encrypted_content: EuUCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDNTGqHhqgzMPPSfyvBoMlhz5M3Ag/qfWByZBIjAAaAB9xG6an3G9giGryVpVMQDJaVa0FvfywWIEQySIsaqFTYAIANQ5YnZyHv31vacq6AGb7K7zfFKak7CUQabYzwTXl8wIjnr4m+ChcForX+8+TlXvY/7X8+/3xC3TSEqodRMkJKgowcMQ3J+JCGdFhhA3WMkjwvwbvXiMrv1SOM1n+JNvCUiB6FG4ZrocyFPl4Xf6zF0tccngrsUnGU8bX6i+o2VlVPr9zFrm/BfF4ELra/p8s0RCWS7v/w7V8dB2+omT8EI0VkP6YTGFDeRYPnw+xKZuOoKNMOUTua14HhM2I5GItR/R4lQKiQVhe21ChXR7QUIvOPFnIDSW+GuIt/wIRES60FCN3+2DosmqEZubMKd9EyYFXdtVGAM= - page_age: null - title: 'April 14, 2025: History, News, Top Tweets, Social Media & Day Info' + url: https://indianexpress.com/article/horoscope/virgo-horoscope-today-23-may-2025-daily-astrology-prediction-for-virgo-career-finance-money-love-10020992/ + - encrypted_content: EqgNCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDN087PMpPpqSqfrydhoMctbw17CYfOiB92ZtIjDp7VFD2NaOgc8oXw7vWl4CMkOC+piqA+zoHim9qI2vSatujJ6SdWI0UmsKIv5YY0Mqqwza5/V3l1DttOhZc/CqXxJStITjGBGc90j0UKVD1iNvbgg/E+nxDGb+3dHruWJchKVggPE01dJtF9q/4KPRI3xLFFDqHfFFyMTZSnAFWMA0fuPR9uKM/dRKgzCqMcC/HQgoO9CXjbuhhMBK+bg/yYG02cc0A8IfF7gr4ePiDSUeD0F9GcXupvgkHqjznskcoC4873hvoeIHBryqFARheRvONPVN4lJ3QqGqJFjSsEDaq9BaYQVaF367DseyvhtMCiXEsZuq479/JuLNH+xEGoOVjyMj6XYotuUTvmEV6WBnG8v8HX3W0mqkC4e2KxNsMm1vBTGUaVYDs2OvgxDDXBBG1Vve0dY+wXHuLDuVgUA6yWm1wj6pqqhSHWvOifr88rl+x462vUEFDSxzRrqE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Rbz55+wZtGIYpUafebKM6M/g+tgvkvxcr6wwmvSMvgiV1tjODnmLC6wxxpCZ95uYBgc8koyXHTHX6ytXEM+9wXa8mVtPJKikEWJJp67zSl4Xu56KmmyCv/ydkPeRcp/wEBpf/rN6ShjdH/dRtc7RC50dlE35pADoglv/sAFyvSuyM4tMmaCYZTi18WsFvkZy5jo7AHgAE1v5XRgaDMMUSP/an7CDpqbNKpZ3N98t/Dvrc++Q2QXS7b5fNfxbOuCXyKVrm62P7k5xTGBK0mU77HyzWTcCKgC+EQKM6TK7M1jbh5jd/QPedQD1oda/amV6cZjWTHcTEGodLLZqQ9ds6RhTC2nQehIXEHHWOpY7fT2GPqMvrWzJShxejeY8js2eS9DokNiJEbosWlPSg6a+03HiNIRZ8fDcMoweKfLzfO6sr8wXzK+CSFEdgh0gZIGECBshzEqdYTZHYniSJsw1cps1oSOdkrxQ3J+5xwmB5/iuosMqkQ4XFb/faSJTIrvgXE+lblEixJYEYq9dNIXeN1g3N5fqLl8vH8KtnBznRBRI4oK2b3HO1cvXwxCdW+nmN74AtTkzLql0HRv0XJ03IJUUekJZsouJDGDgHj84gKd20PRPcVhAIef3oGAM= + page_age: 7 hours ago + title: 'Daily Horoscope Today - 23rd May 2025, Astrology Predictions: Spiritual growth, silent strength, and mental + clarity guide your day - The Economic Times' type: web_search_result - url: https://www.wincalendar.com/Calendar/Date/April-14-2025 - - encrypted_content: EosJCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDOHn1SNXW0sKnFgkDhoMXq6vuYB1w8eBtpaGIjAaSotCwI5hjkfcfWHdx2W1e2kY1KCzHO3pyH7PybE33Pzc36Zb82RShey8/ZQjVnIqjggCAYlJO2LKETgzXHx5fS7x3Yq7OkVa0HQRpk4HhRt5lnh6NStD9XCOfEsgq/dk+fO5MvTAa16YqFBjG3+PehAxQBpXbfBlX3IkXTJ3nKLGuw15BJnnfs/O5iT+WzPjE7Ym8TI7AvsfenL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qmJXX2OkkisOMHqCpbOBRINDHZvGUAGibgXPZ7muYNwxzUPVqsIplKKOZiZWUeOOa/vryd0g5Nj7UwvQ4sruQKQRgHXlwffNAM05COz5frXSi9T+HAu2DNqcxojI3WGEi9SRj79/qELxXrX69j2TcaC/sJs1aqlTD8CbSNQxgYAw== - page_age: null - title: Daily Calendar for Wednesday, May 14, 2025 | Almanac.com + url: https://economictimes.indiatimes.com/astrology/daily-horoscope-today-19th-may-2025-astrology-predictions-spiritual-growth-silent-strength-and-mental-clarity-guide-your-day/articleshow/121348740.cms?from=mdr + - encrypted_content: EpIMCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDK9Ft1NiQPz4lWZk5hoMc3NnlzEWDH6wK9q7IjAkSpyG4rNkx6lEGryVFTndqXuUfKA6Dr2Pc+a742KnjQV88qDcm30DkG7s3v71gFYqlQtz8IDoZFcNUlTMdRkP+Zju8DbZQeZUxirI/n6C6eEG8rJrSx4jY3H6YjfIJg49Px7ITmNmsOlOQZf+OnJPQBi/POspgspQuFKGuUbX/MOP6pXeS+WjxzKAuheTx9pDMqbY6jZJI/oH0u9LG+gasz56kb0oyJTXaZAbovCHiAOSwJofzl2QWYh8UiYFUlvTmG4pPMQIGi3oPU0mpIhR6yESqp9+kuYGPdRXBlOefbFElAm0oczJbxrEqB/WRwy7e/caoD4IqzFGeBugqJmqrA90Ut0iFJjwlpINITh7nlZkxK1887m7Q8pILvm8FHN3ztK8lqmLQ9qvQm6qFZtLH4keU9Ydci5rBOKnnZYlrzDaLVqYVkEbDZ9A1eOwa4t5KCfxjecBLT/TAe+1fq8Q0x7ND5bxFwgIR+h/iORn+/PLzOykcw3xGaII8tBkonM1CrI4Jt5a3ymTzOrlHz9cfxoQ+T/rl1T36jJc3NSAINGQAtF8kE4KQ06N9s4HDruxOPwHojVaHMCqLI2vPw6Ckp3zWjexdiGO//BGZiQkvAwLiI+yKAIROnY4WE3FXjWw9P4fgghmt2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zmNqBQRpAmx6122RpUQOISmqSkJ+9MfKzeGV/ox/tnmquRoZJzbbcISJRoFUm3b+0uC3o7I0zr5eSJTdc/NVROjLyWTid+lj2rBwFzshqNZGBdrss+wI/ZNS8JVaLzlfzXfQin14yiqmcgDjHGKkP5/8myTcsFUlDL0tfJvvVnjTQZsr0NAoEDc2qd6oqOoSdfJLOBptvb0UPAl7iQaLIZLqbHb2sOmQ5dEunG+u/A4XGCqUwpM62nZrnGAM= + page_age: 6 hours ago + title: 'Tarot Horoscope Today - 23rd May 2025: Tarot Card Reading & Daily Predictions for All Zodiac Signs - The + Economic Times' type: web_search_result - url: https://www.almanac.com/calendar/date/2025-05-14 - - encrypted_content: EogeCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDEgd6EnaP2kwRbf1XhoM9QRhUCdWF29ZqVEZIjBGs8T/tP2g+mNlS0Yy8FrT9kTecy/rYYZ74okw3Rwu2tgSMWBsH+AloPO4i2j8ty0qix1zCk/+cSIpd2mgOp+OEf44b1zwYrxhuIGnZudCSaHSAG+1ZKz+/q/9aqBzj809jJWwwrerrJkYV6Z3ij+RiMPdbbM+Jtoq8Hew50DOlcfEm5tPbAP/LWAKLk3Kc0psx/mpbOb4jYXdI5mI1lluuxrWD+Ay1eZrLL+xe2UUcP2tNQYJaRs9DKh/+40uEstgfoZRJzTMAyxdwxSO5KkdDsT9EE8+DFTf2IpXXnobKtGo1C57ESvRwX3WQR2XZfnHQWhp5sPNzk3svL5SDn3p2V2OMrBb2v42E6/yrz+JGM2dSxcrGz/QfQ/CU733HFZ6/Tn/Wn7LarEtRVPUTMyQ0RUxqZrqzbTnEOcpaCJjD3eNGeD7+z6BazBQBSn/v5/8r5Cf9/4D0Pf5pNpiNKM9Lx9reBHa8f4m89RxwA/eFVQC985TkmZjTC+G6ZWXbu/MPwOOprbfqNg+hWIOXpO2P+7b0kSk8E9kVgUUA2AN8kVMwRKwLwf7CTWEDMXfaB61F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ijUldXyykiTL/TlHZyqeCg7kpxedowmuNyMwnlBNFYThRiQyN3HVHv1B/xfYrFjR6YVOGVkRcEA8P6kq112fS5l7Gg2gBSiLkmBAtT8+ZmHPUlfLmAYAw== - page_age: null - title: National Holidays in May, 2025 | Days Of The Year + url: https://economictimes.indiatimes.com/astrology/tarot-horoscope-today-23rd-may-2025-tarot-card-reading-daily-predictions-for-all-zodiac-signs/articleshow/121348972.cms?from=mdr + - encrypted_content: EocHCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDAMNJCKKM9JFtCOyCBoMS6iYVNGva0wsk2M1IjBcz53eGg2p4ed8/Fo4TJpHCZijWYTp+/0zD5emMRzUxudo/K+oq5lrQncGcHeByicqigbu4Xzs8lcxcMJ4zxJDunx89H0AFJ/MfItmOnHeqFFY1xNVMlye3BqukSuKfuj+7p+mpkbBVqDmIS4qJdl2q7h10JR7yesca145kRbCSZvVYSPsIZZwy8CFVwxQExaXdhkUkvD5XB8QaL6uRHspQUXSKdH6wWjNJO3Y/xD0jfF7KZXaOHE2RlJzGCyf8+WLspuHYPOtdxAryHTdQpe9hzfw42yAZ8ZWGzaYZeHD56Bc2R2BC5aqJKj9z2KzAGxe+0xaFPsvxgyYJmWBUrad44rJ/CsYwGQox9UXEXyDzHVWskutc0PZvddAiaZ38rpy2c9qXEu9m+FhSHP1y2LtUqVT6lHznKWYkSOFsQNUPogr9ahFdDOTL2bqnueHztMHhXe+TNITRr4xkb3mW434fvKo/1CteKn8YyiI95tj+W8MX0deKWyRBJumtc2UoHxBEpmw+BiN0kjBcTgwuAiaFYhIGQpqyK0ZPiNQeKEB/1velKYFKLvHtzioUAljcoKMF20clzSqomqTnBXKzExlW4jJy07R8akhdfd2CGNDZXbmgzvQKhLFIJV3Py7ommqO6F4fIStYJq7E5gfr1QRCzgQEYEq0lTAEf7TkS/fta0fbTmgUAn3xfT4GU9GPbH8Lff0nYuRIa/BBestwetOg4obTbAOB/VzyQliuV+FTFECchDpAtZRLHyS48V7JMkAGWyT8QCX1hPFg/qzylmZupJq4TrzoSx50KU+xFsQnnZpXcbDbDzvB5bn582A6Oo7MkBpu0WJh7IRRac8wQzutyMoRPYs/yusGSl2WAvsa1FNN+Y1cHuk4OEcgOaR+RGxeb390i48sh5tg25Jz52UU81TbJF9Vr3veWhwsq4LKboKnOxmF4NcoNorLNaTSMaqyQ+2L2QOHJrrt9Ozs45RAxY19x9vpO90l5ns2QZH66RxHcB+8GgDcKgnKBZjvuhR8l+2LuSbL9Cl9iz12vE1gGVgq8fg+c/cQO0MUhHW0F0lJCgIs+w8TVUh/SirDwY79TifD6Fv3T5qCjMWkGAM= + page_age: 14 hours ago + title: Top Stocks for Today - 23rd May 2025 | India Infoline type: web_search_result - url: https://www.daysoftheyear.com/days/may/ - tool_use_id: srvtoolu_01RhAr4gUKVGNh2F9DLT4WNY + url: https://www.indiainfoline.com/news/markets/top-stocks-for-today-23rd-may-2025 + tool_use_id: srvtoolu_01ALRFK59SkK8D9e1Xj2exhq type: web_search_tool_result - - text: |2+ - - - Based on the search results, today is Wednesday, May 14, 2025. Here are some additional details about today: - + - text: "\n\nBased on the search results, today is " type: text - citations: - - cited_text: 'May 14, 2025 is the 134th day of the year 2025 in the Gregorian calendar. There are 231 days remaining - until the end of this year. ' - encrypted_index: EpEBCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDFtlKgZiJHR7JqBGIxoMKc9D5YSjIiXWrHPcIjCeRjLh04EnS3ZV+Cqopq7+2L6vSuhhGiXQyDRrVp7bSGZl33mBKnMs2CFI/yKAtaIqFbeul9oFO6HH3nrS/DIQ9BH3LXNfxBgE - title: What Happened On May 14, 2025 This Day In History + - cited_text: 'Sagittarius Horoscope Today, 23 May 2025: + Today, domestic concern...' + encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDCbDDdUiTyDBbTGQOxoMQGhGUwXGrNo/GROYIjC8zO+WNZgsdFFZ6CBsCJztRqmFgQ7D4a94Eh84prfkFPXTjHB2K5x6iPykb604r0cqE86OhsBbKKpHZLCblw8RmEPihCYYBA== + title: 'Sagittarius Horoscope Today, 23 May 2025: Today favours real estate exploration and property-related investment + | Horoscope Today - The Indian Express' type: web_search_result_location - url: https://www.whathappenedtodayinhistory.com/?m=May&d=14&y=2025&go=Go - text: It is the 134th day of the year 2025, with 231 days remaining until the end of this year + url: https://indianexpress.com/article/horoscope/sagittarius-horoscope-today-23-may-2025-daily-astrology-prediction-for-sagittarius-career-finance-money-love-10020998/ + - cited_text: 'Tarot Horoscope Today: As the first day of Gemini season 2025, find + the tarot readings based on zodiac signs for may see significant price movement today: + Tata Steel, Hindustan Copper, Grasim Indu...' + encrypted_index: EpIBCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDPzwkG7Dwu30Hg823hoMR/Jqy9OxGs1/psXBIjCYx4k0xNP4gBbE8XinduUuG9+UUyuqx4QLn0fNLN6V1PgqbEfaBhisa/NPDguHKqIqFgM8TrUPp2yRMNuJm+IrmxaEv3Z+n8sYBA== + title: Top Stocks for Today - 23rd May 2025 | India Infoline type: web_search_result_location - url: https://www.daysoftheyear.com/days/may/14/ - - cited_text: It's National Dance Like a Chicken Day, National Buttermilk Biscuit Day, International Chihuahua Appreciation - Day, National Receptionists Day, Online ... - encrypted_index: EpABCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDEyAxsHBYMXEU1jUwhoMOUjcAhl5PdDDirbHIjDsmTGOPT74M31dJUWmwUrxrA07YdZ9jUlYFHTSsjz8JE/NcCBOStLRPjzkXSRLaoAqFKK9AWMsL0XBkQj/ihJ6JnMdYDBEGAQ= - title: National Holidays on May 14th, 2025 | Days Of The Year - type: web_search_result_location - url: https://www.daysoftheyear.com/days/may/14/ - text: |- - It's being celebrated as: - - National Dance Like a Chicken Day - - National Buttermilk Biscuit Day - - International Chihuahua Appreciation Day - - National Receptionists Day - - Online Romance Day + url: https://www.indiainfoline.com/news/markets/top-stocks-for-today-23rd-may-2025 + text: there are expected to be significant stock movements, and the BSE is planning to rejig several indices, including + the 30-stock benchmark Sensex. This restructuring will take effect from June 23, 2025 type: text - - text: |2+ - - + - text: ".\n\n2. In sports, " type: text - citations: - - cited_text: Get familiar with the history of Asian Americans and Pacific Islanders in the US, or join an event to - celebrate your heritage during Asian/Pacific Her... - encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDBJIi8ErVI8SPvtXnRoMVM/kY+jExGcrakWkIjDdfUL7xDZm/uDkIO+UnyN+W69tqzTjRl0ta+Yk4dSlPI7LRztzJSOkeOnoNZlYcCAqE9HebEam/25CyIeRbDXfuOI79xEYBA== - title: National Holidays on May 14th, 2025 | Days Of The Year + - cited_text: 'IPL 2025, GT vs LSG highlights: Lucknow Super Giants beat Gujarat Titans by 33 runs5 hours ago' + encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDASI2eDqhP9h3zqSNhoM0nVV8tu71M95gZI2IjDg+u22h1i+CM2eNScuVF8UNOdtqm/Pvrkl38bxu1WVQl1rhsUfxVXnNJzJ3oI8HHgqE9kCGCtcHMyfZRyF6dyCKN8zL68YBA== + title: 'Sagittarius Horoscope Today, 23 May 2025: Today favours real estate exploration and property-related investment + | Horoscope Today - The Indian Express' type: web_search_result_location - url: https://www.daysoftheyear.com/days/may/14/ - text: It's also part of Asian/Pacific Heritage Month + url: https://indianexpress.com/article/horoscope/sagittarius-horoscope-today-23-may-2025-daily-astrology-prediction-for-sagittarius-career-finance-money-love-10020998/ + text: there was an IPL 2025 match where Lucknow Super Giants defeated Gujarat Titans by 33 runs type: text - - text: |+ - . - + - text: ".\n\n3. Astrologically, " type: text - citations: - - cited_text: (Sponsored by MyBirthday.Ninja) Taurus is the zodiac sign of a person born on this day. Emerald is the - modern birthstone for this month. Sapphire is t... - encrypted_index: EpMBCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDFJ5RUG1bQ1eEQ6q6BoMtBY580wgcdWItBUWIjBoMOm5r/PhUZFtiDNn8DZ+92GZDbgmK/Aco4q4a3V5WPCXfmv9JE96Tc6Vto5vh8YqF//2ULrAGRJFo/qvgaWyYjrk8f4lYcJtGAQ= - title: What Day of the Week Is May 14, 2025? + - cited_text: 'Horoscope Today – 23rd May 2025: The Moon will continue + its transit from the Pisces sign to...' + encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDDYbMWXQmhoGwKRD2xoMhRr0U2J7j1hQBqtvIjDhKoHAEs149pR//GkmoFgYw6pJlgSpb7FGOQEt9udtTdYJefbmzQ3vP+jVHKmw5dQqEx6ddQitTWUlmf48PF1mx9+uyE4YBA== + title: 'Daily Horoscope Today - 23rd May 2025, Astrology Predictions: Spiritual growth, silent strength, and mental + clarity guide your day - The Economic Times' type: web_search_result_location - url: https://www.dayoftheweek.org/?m=May&d=14&y=2025&go=Go - text: |- - For those interested in astrology: - - The zodiac sign for today is Taurus - - The modern birthstone is Emerald - - The mystical birthstone is Sapphire + url: https://economictimes.indiatimes.com/astrology/daily-horoscope-today-19th-may-2025-astrology-predictions-spiritual-growth-silent-strength-and-mental-clarity-guide-your-day/articleshow/121348740.cms?from=mdr + - cited_text: 'Mercury will be transiting into the Taurus sign today. This will bring a steady tone + to your communication and thoughts. ' + encrypted_index: EpEBCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDMt/spapnaqCS+9pcBoMsdh9Y6/tpNkdCeG4IjAlWGsDiLQoRi9Pn0xVHj8IYjBxoYPBt7T9t+YBITynjqXWWzQuns3vjkGbhBkRjFMqFfPsz3VBsXKeFpa2gO3/cAfrlu1MLxgE + title: 'Daily Horoscope Today - 23rd May 2025, Astrology Predictions: Spiritual growth, silent strength, and mental + clarity guide your day - The Economic Times' + type: web_search_result_location + url: https://economictimes.indiatimes.com/astrology/daily-horoscope-today-19th-may-2025-astrology-predictions-spiritual-growth-silent-strength-and-mental-clarity-guide-your-day/articleshow/121348740.cms?from=mdr + text: the Moon is transiting through Pisces, and Mercury is moving into Taurus, which is expected to bring a steady + tone to communication and thoughts type: text - id: msg_015ivxZjWnb186VBacQBDCSr - model: claude-3-5-sonnet-latest + - text: . + type: text + id: msg_01Va2uREGK2xDeCM9twM17NR + model: claude-3-5-sonnet-20241022 role: assistant stop_reason: end_turn stop_sequence: null @@ -186,11 +183,102 @@ interactions: usage: cache_creation_input_tokens: 0 cache_read_input_tokens: 0 - input_tokens: 12360 - output_tokens: 332 + input_tokens: 11844 + output_tokens: 327 server_tool_use: web_search_requests: 1 + service_tier: standard status: code: 200 message: OK +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '1671' + content-type: + - application/json + host: + - api.anthropic.com + method: POST + parsed_body: + max_tokens: 1024 + messages: + - content: + - text: What day is today? + type: text + role: user + - content: + - text: Let me search for information about today's date and any significant events. + type: text + - id: srvtoolu_01ALRFK59SkK8D9e1Xj2exhq + input: + query: current date today May 23 2025 events news + name: web_search + type: tool_use + - text: "\n\nBased on the search results, today is " + type: text + - text: Friday, May 23, 2025 + type: text + - text: ". Several significant events are happening today, including:\n\n1. In the financial markets, " + type: text + - text: there are expected to be significant stock movements, and the BSE is planning to rejig several indices, including + the 30-stock benchmark Sensex. This restructuring will take effect from June 23, 2025 + type: text + - text: ".\n\n2. In sports, " + type: text + - text: there was an IPL 2025 match where Lucknow Super Giants defeated Gujarat Titans by 33 runs + type: text + - text: ".\n\n3. Astrologically, " + type: text + - text: the Moon is transiting through Pisces, and Mercury is moving into Taurus, which is expected to bring a steady + tone to communication and thoughts + type: text + - text: . + type: text + role: assistant + - content: + - content: |- + Unknown tool name: 'web_search'. No tools available. + + Fix the errors and try again. + is_error: true + tool_use_id: srvtoolu_01ALRFK59SkK8D9e1Xj2exhq + type: tool_result + role: user + model: claude-3-5-sonnet-latest + stream: false + tool_choice: + type: auto + tools: + - allowed_domains: null + blocked_domains: null + name: web_search + type: web_search_20250305 + user_location: null + uri: https://api.anthropic.com/v1/messages + response: + headers: + connection: + - keep-alive + content-length: + - '279' + content-type: + - application/json + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + parsed_body: + error: + message: 'messages.1: `tool_use` ids were found without `tool_result` blocks immediately after: srvtoolu_01ALRFK59SkK8D9e1Xj2exhq. + Each `tool_use` block must have a corresponding `tool_result` block in the next message.' + type: invalid_request_error + type: error + status: + code: 400 + message: Bad Request version: 1 diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index 69cce91a1..d53c0456f 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -13,7 +13,7 @@ from inline_snapshot import snapshot from pydantic_ai import Agent, ModelHTTPError, ModelRetry -from pydantic_ai.builtin_tools import WebSearchTool +from pydantic_ai.builtin_tools import CodeExecutionTool, WebSearchTool from pydantic_ai.messages import ( BinaryContent, DocumentUrl, @@ -1031,6 +1031,7 @@ def test_usage(message_callback: Callable[[], AnthropicMessage | RawMessageStrea assert _map_usage(message_callback()) == usage +@pytest.mark.xfail() @pytest.mark.vcr() async def test_anthropic_web_search_tool(allow_model_requests: None, anthropic_api_key: str): m = AnthropicModel('claude-3-5-sonnet-latest', provider=AnthropicProvider(api_key=anthropic_api_key)) @@ -1040,3 +1041,12 @@ async def test_anthropic_web_search_tool(allow_model_requests: None, anthropic_a assert result.output == snapshot( "I can't tell you what day it is today, as I don't have access to real-time information. However, you can easily check the current date on your device or calendar." ) + + +@pytest.mark.vcr() +async def test_anthropic_code_execution_tool(allow_model_requests: None, anthropic_api_key: str): + m = AnthropicModel('claude-3-5-sonnet-latest', provider=AnthropicProvider(api_key=anthropic_api_key)) + agent = Agent(m, builtin_tools=[CodeExecutionTool()]) + + result = await agent.run('How much is 3 * 12390?') + assert result.output == snapshot() diff --git a/tests/models/test_fallback.py b/tests/models/test_fallback.py index db6277527..dad5e13a1 100644 --- a/tests/models/test_fallback.py +++ b/tests/models/test_fallback.py @@ -127,7 +127,7 @@ def test_first_failed_instrumented(capfire: CaptureLogfire) -> None: 'end_time': 3000000000, 'attributes': { 'gen_ai.operation.name': 'chat', - 'model_request_parameters': '{"function_tools": [], "allow_text_output": true, "output_tools": []}', + 'model_request_parameters': '{"function_tools": [], "builtin_tools": [], "allow_text_output": true, "output_tools": []}', 'logfire.span_type': 'span', 'logfire.msg': 'chat fallback:function:failure_response:,function:success_response:', 'gen_ai.system': 'function', @@ -200,7 +200,7 @@ async def test_first_failed_instrumented_stream(capfire: CaptureLogfire) -> None 'end_time': 3000000000, 'attributes': { 'gen_ai.operation.name': 'chat', - 'model_request_parameters': '{"function_tools": [], "allow_text_output": true, "output_tools": []}', + 'model_request_parameters': '{"function_tools": [], "builtin_tools": [], "allow_text_output": true, "output_tools": []}', 'logfire.span_type': 'span', 'logfire.msg': 'chat fallback:function::failure_response_stream,function::success_response_stream', 'gen_ai.system': 'function', @@ -272,7 +272,7 @@ def test_all_failed_instrumented(capfire: CaptureLogfire) -> None: 'gen_ai.operation.name': 'chat', 'gen_ai.system': 'fallback:function,function', 'gen_ai.request.model': 'fallback:function:failure_response:,function:failure_response:', - 'model_request_parameters': '{"function_tools": [], "allow_text_output": true, "output_tools": []}', + 'model_request_parameters': '{"function_tools": [], "builtin_tools": [], "allow_text_output": true, "output_tools": []}', 'logfire.json_schema': '{"type": "object", "properties": {"model_request_parameters": {"type": "object"}}}', 'logfire.span_type': 'span', 'logfire.msg': 'chat fallback:function:failure_response:,function:failure_response:', diff --git a/tests/models/test_groq.py b/tests/models/test_groq.py index 365f58125..89e1d8b94 100644 --- a/tests/models/test_groq.py +++ b/tests/models/test_groq.py @@ -691,8 +691,4 @@ async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_k agent = Agent(m, builtin_tools=[WebSearchTool()]) result = await agent.run('What day is today?') - assert result.output == snapshot("""\ -To determine the current day, I would need to know the current date. However, I don't have have access to real-time information. But I can guide you on how to find out. - -You can use a calendar or a digital tool that displays the current date to find out what day it is today. Alternatively, if you provide me with the current date, I can tell you what day it is.\ -""") + assert result.output == snapshot('The current day is Tuesday.') diff --git a/tests/models/test_instrumented.py b/tests/models/test_instrumented.py index f7caad399..ad774292b 100644 --- a/tests/models/test_instrumented.py +++ b/tests/models/test_instrumented.py @@ -151,7 +151,7 @@ async def test_instrumented_model(capfire: CaptureLogfire): 'gen_ai.request.model': 'my_model', 'server.address': 'example.com', 'server.port': 8000, - 'model_request_parameters': '{"function_tools": [], "allow_text_output": true, "output_tools": []}', + 'model_request_parameters': '{"function_tools": [], "builtin_tools": [], "allow_text_output": true, "output_tools": []}', 'logfire.json_schema': '{"type": "object", "properties": {"model_request_parameters": {"type": "object"}}}', 'gen_ai.request.temperature': 1, 'logfire.msg': 'chat my_model', @@ -375,7 +375,7 @@ async def test_instrumented_model_stream(capfire: CaptureLogfire): 'gen_ai.request.model': 'my_model', 'server.address': 'example.com', 'server.port': 8000, - 'model_request_parameters': '{"function_tools": [], "allow_text_output": true, "output_tools": []}', + 'model_request_parameters': '{"function_tools": [], "builtin_tools": [], "allow_text_output": true, "output_tools": []}', 'logfire.json_schema': '{"type": "object", "properties": {"model_request_parameters": {"type": "object"}}}', 'gen_ai.request.temperature': 1, 'logfire.msg': 'chat my_model', @@ -460,7 +460,7 @@ async def test_instrumented_model_stream_break(capfire: CaptureLogfire): 'gen_ai.request.model': 'my_model', 'server.address': 'example.com', 'server.port': 8000, - 'model_request_parameters': '{"function_tools": [], "allow_text_output": true, "output_tools": []}', + 'model_request_parameters': '{"function_tools": [], "builtin_tools": [], "allow_text_output": true, "output_tools": []}', 'logfire.json_schema': '{"type": "object", "properties": {"model_request_parameters": {"type": "object"}}}', 'gen_ai.request.temperature': 1, 'logfire.msg': 'chat my_model', @@ -560,7 +560,7 @@ async def test_instrumented_model_attributes_mode(capfire: CaptureLogfire): 'gen_ai.request.model': 'my_model', 'server.address': 'example.com', 'server.port': 8000, - 'model_request_parameters': '{"function_tools": [], "allow_text_output": true, "output_tools": []}', + 'model_request_parameters': '{"function_tools": [], "builtin_tools": [], "allow_text_output": true, "output_tools": []}', 'gen_ai.request.temperature': 1, 'logfire.msg': 'chat my_model', 'logfire.span_type': 'span', diff --git a/tests/models/test_openai.py b/tests/models/test_openai.py index 9ccb9b3e4..3a45e5aaf 100644 --- a/tests/models/test_openai.py +++ b/tests/models/test_openai.py @@ -1619,7 +1619,7 @@ async def test_openai_web_search_tool(allow_model_requests: None, openai_api_key ) result = await agent.run('What day is today?') - assert result.output == snapshot('May 14, 2025, 8:51:29\u202fAM ') + assert result.output == snapshot('May 14, 2025, 8:51:29 AM ') @pytest.mark.vcr() diff --git a/tests/test_logfire.py b/tests/test_logfire.py index e63f358f3..3fe9f061b 100644 --- a/tests/test_logfire.py +++ b/tests/test_logfire.py @@ -223,6 +223,7 @@ async def my_ret(x: int) -> str: 'strict': None, } ], + 'builtin_tools': [], 'allow_text_output': True, 'output_tools': [], } @@ -404,14 +405,37 @@ async def test_feedback(capfire: CaptureLogfire) -> None: 'gen_ai.operation.name': 'chat', 'gen_ai.system': 'test', 'gen_ai.request.model': 'test', - 'model_request_parameters': '{"function_tools": [], "allow_text_output": true, "output_tools": []}', + 'model_request_parameters': IsJson( + {'function_tools': [], 'builtin_tools': [], 'allow_text_output': True, 'output_tools': []} + ), 'logfire.span_type': 'span', 'logfire.msg': 'chat test', 'gen_ai.usage.input_tokens': 51, 'gen_ai.usage.output_tokens': 4, 'gen_ai.response.model': 'test', - 'events': '[{"content": "Hello", "role": "user", "gen_ai.system": "test", "gen_ai.message.index": 0, "event.name": "gen_ai.user.message"}, {"index": 0, "message": {"role": "assistant", "content": "success (no tool calls)"}, "gen_ai.system": "test", "event.name": "gen_ai.choice"}]', - 'logfire.json_schema': '{"type": "object", "properties": {"events": {"type": "array"}, "model_request_parameters": {"type": "object"}}}', + 'events': IsJson( + [ + { + 'content': 'Hello', + 'role': 'user', + 'gen_ai.system': 'test', + 'gen_ai.message.index': 0, + 'event.name': 'gen_ai.user.message', + }, + { + 'index': 0, + 'message': {'role': 'assistant', 'content': 'success (no tool calls)'}, + 'gen_ai.system': 'test', + 'event.name': 'gen_ai.choice', + }, + ] + ), + 'logfire.json_schema': IsJson( + { + 'type': 'object', + 'properties': {'events': {'type': 'array'}, 'model_request_parameters': {'type': 'object'}}, + } + ), }, }, { diff --git a/uv.lock b/uv.lock index 3fb6c45b1..7430a3533 100644 --- a/uv.lock +++ b/uv.lock @@ -185,7 +185,7 @@ wheels = [ [[package]] name = "anthropic" -version = "0.51.0" +version = "0.52.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -196,9 +196,9 @@ dependencies = [ { name = "sniffio" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/63/4a/96f99a61ae299f9e5aa3e765d7342d95ab2e2ba5b69a3ffedb00ef779651/anthropic-0.51.0.tar.gz", hash = "sha256:6f824451277992af079554430d5b2c8ff5bc059cc2c968cdc3f06824437da201", size = 219063, upload-time = "2025-05-07T15:39:22.348Z" } +sdist = { url = "https://files.pythonhosted.org/packages/57/fd/8a9332f5baf352c272494a9d359863a53385a208954c1a7251a524071930/anthropic-0.52.0.tar.gz", hash = "sha256:f06bc924d7eb85f8a43fe587b875ff58b410d60251b7dc5f1387b322a35bd67b", size = 229372, upload-time = "2025-05-22T16:42:22.044Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/8c/6e/9637122c5f007103bd5a259f4250bd8f1533dd2473227670fd10a1457b62/anthropic-0.51.0-py3-none-any.whl", hash = "sha256:b8b47d482c9aa1f81b923555cebb687c2730309a20d01be554730c8302e0f62a", size = 263957, upload-time = "2025-05-07T15:39:20.82Z" }, + { url = "https://files.pythonhosted.org/packages/a0/43/172c0031654908bbac2a87d356fff4de1b4947a9b14b9658540b69416417/anthropic-0.52.0-py3-none-any.whl", hash = "sha256:c026daa164f0e3bde36ce9cbdd27f5f1419fff03306be1e138726f42e6a7810f", size = 286076, upload-time = "2025-05-22T16:42:20Z" }, ] [[package]] @@ -3070,7 +3070,7 @@ dev = [ [package.metadata] requires-dist = [ - { name = "anthropic", marker = "extra == 'anthropic'", specifier = ">=0.49.0" }, + { name = "anthropic", marker = "extra == 'anthropic'", specifier = ">=0.52.0" }, { name = "argcomplete", marker = "extra == 'cli'", specifier = ">=3.5.0" }, { name = "boto3", marker = "extra == 'bedrock'", specifier = ">=1.35.74" }, { name = "cohere", marker = "sys_platform != 'emscripten' and extra == 'cohere'", specifier = ">=5.13.11" }, From 32324fa78f453715b96566d41100e3e8da7be72f Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Tue, 27 May 2025 12:32:58 +0200 Subject: [PATCH 05/34] add more built-in-tools --- pydantic_ai_slim/pydantic_ai/_agent_graph.py | 6 +- pydantic_ai_slim/pydantic_ai/messages.py | 25 +- .../pydantic_ai/models/anthropic.py | 14 +- pydantic_ai_slim/pydantic_ai/models/openai.py | 8 + .../test_anthropic_code_execution_tool.yaml | 48 ++- ...tool_pass_history_to_another_provider.yaml | 280 ++++++++++++++ .../test_anthropic_web_search_tool.yaml | 270 ++++---------- tests/models/test_anthropic.py | 349 +++++++++++++++++- 8 files changed, 786 insertions(+), 214 deletions(-) create mode 100644 tests/models/cassettes/test_anthropic/test_anthropic_server_tool_pass_history_to_another_provider.yaml diff --git a/pydantic_ai_slim/pydantic_ai/_agent_graph.py b/pydantic_ai_slim/pydantic_ai/_agent_graph.py index d2b84cf7c..9fa0a5762 100644 --- a/pydantic_ai_slim/pydantic_ai/_agent_graph.py +++ b/pydantic_ai_slim/pydantic_ai/_agent_graph.py @@ -419,7 +419,7 @@ async def stream( async for _event in stream: pass - async def _run_stream( + async def _run_stream( # noqa C901 self, ctx: GraphRunContext[GraphAgentState, GraphAgentDeps[DepsT, NodeRunEndT]] ) -> AsyncIterator[_messages.HandleResponseEvent]: if self._events_iterator is None: @@ -435,6 +435,10 @@ async def _run_stream() -> AsyncIterator[_messages.HandleResponseEvent]: texts.append(part.content) elif isinstance(part, _messages.ToolCallPart): tool_calls.append(part) + elif isinstance(part, _messages.ServerToolCallPart): + yield _messages.ServerToolCallEvent(part) + elif isinstance(part, _messages.ServerToolReturnPart): + yield _messages.ServerToolResultEvent(part) else: assert_never(part) diff --git a/pydantic_ai_slim/pydantic_ai/messages.py b/pydantic_ai_slim/pydantic_ai/messages.py index 458ea1fc6..d03261be5 100644 --- a/pydantic_ai_slim/pydantic_ai/messages.py +++ b/pydantic_ai_slim/pydantic_ai/messages.py @@ -914,6 +914,29 @@ class FunctionToolResultEvent: __repr__ = _utils.dataclasses_no_defaults_repr +@dataclass(repr=False) +class ServerToolCallEvent: + """An event indicating the start to a call to a server tool.""" + + part: ServerToolCallPart + """The server tool call to make.""" + + event_kind: Literal['server_tool_call'] = 'server_tool_call' + """Event type identifier, used as a discriminator.""" + + +@dataclass(repr=False) +class ServerToolResultEvent: + """An event indicating the result of a server tool call.""" + + result: ServerToolReturnPart + """The result of the call to the server tool.""" + + event_kind: Literal['server_tool_result'] = 'server_tool_result' + """Event type identifier, used as a discriminator.""" + + HandleResponseEvent = Annotated[ - Union[FunctionToolCallEvent, FunctionToolResultEvent], pydantic.Discriminator('event_kind') + Union[FunctionToolCallEvent, FunctionToolResultEvent, ServerToolCallEvent, ServerToolResultEvent], + pydantic.Discriminator('event_kind'), ] diff --git a/pydantic_ai_slim/pydantic_ai/models/anthropic.py b/pydantic_ai_slim/pydantic_ai/models/anthropic.py index 3e3006901..4c87d4aed 100644 --- a/pydantic_ai_slim/pydantic_ai/models/anthropic.py +++ b/pydantic_ai_slim/pydantic_ai/models/anthropic.py @@ -8,6 +8,7 @@ from typing import Any, Literal, Union, cast, overload from anthropic.types.beta import ( + BetaCodeExecutionToolResultBlock, BetaCodeExecutionToolResultBlockParam, BetaServerToolUseBlockParam, BetaWebSearchToolResultBlockParam, @@ -238,6 +239,7 @@ async def _messages_create( try: extra_headers = model_settings.get('extra_headers', {}) extra_headers.setdefault('User-Agent', get_user_agent()) + extra_headers.setdefault('anthropic-beta', 'code-execution-2025-05-22') return await self.client.beta.messages.create( max_tokens=model_settings.get('max_tokens', 1024), system=system_prompt or NOT_GIVEN, @@ -268,7 +270,7 @@ def _process_response(self, response: BetaMessage) -> ModelResponse: elif isinstance(item, BetaWebSearchToolResultBlock): items.append( ServerToolReturnPart( - tool_name='web_search', + tool_name=item.type, content=item.content, tool_call_id=item.tool_use_id, ) @@ -282,6 +284,14 @@ def _process_response(self, response: BetaMessage) -> ModelResponse: tool_call_id=item.id, ) ) + elif isinstance(item, BetaCodeExecutionToolResultBlock): + items.append( + ServerToolReturnPart( + tool_name=item.type, + content=item.content, + tool_call_id=item.tool_use_id, + ) + ) else: assert isinstance(item, BetaToolUseBlock), f'unexpected item type {type(item)}' items.append( @@ -326,7 +336,7 @@ def _get_builtin_tools(self, model_request_parameters: ModelRequestParameters) - user_location=user_location, ) ) - if isinstance(tool, CodeExecutionTool): + elif isinstance(tool, CodeExecutionTool): tools.append(BetaCodeExecutionTool20250522Param(name='code_execution', type='code_execution_20250522')) return tools diff --git a/pydantic_ai_slim/pydantic_ai/models/openai.py b/pydantic_ai_slim/pydantic_ai/models/openai.py index b7d7ba586..6c54bf870 100644 --- a/pydantic_ai_slim/pydantic_ai/models/openai.py +++ b/pydantic_ai_slim/pydantic_ai/models/openai.py @@ -27,6 +27,8 @@ ModelResponsePart, ModelResponseStreamEvent, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ToolCallPart, @@ -398,6 +400,9 @@ async def _map_messages(self, messages: list[ModelMessage]) -> list[chat.ChatCom texts.append(item.content) elif isinstance(item, ToolCallPart): tool_calls.append(self._map_tool_call(item)) + # OpenAI doesn't return server tools calls. + elif isinstance(item, (ServerToolCallPart, ServerToolReturnPart)): + continue else: assert_never(item) message_param = chat.ChatCompletionAssistantMessageParam(role='assistant') @@ -779,6 +784,9 @@ async def _map_messages( openai_messages.append(responses.EasyInputMessageParam(role='assistant', content=item.content)) elif isinstance(item, ToolCallPart): openai_messages.append(self._map_tool_call(item)) + # OpenAI doesn't return server tools calls. + elif isinstance(item, (ServerToolCallPart, ServerToolReturnPart)): + continue else: assert_never(item) else: diff --git a/tests/models/cassettes/test_anthropic/test_anthropic_code_execution_tool.yaml b/tests/models/cassettes/test_anthropic/test_anthropic_code_execution_tool.yaml index f29b41ec6..76f19dc00 100644 --- a/tests/models/cassettes/test_anthropic/test_anthropic_code_execution_tool.yaml +++ b/tests/models/cassettes/test_anthropic/test_anthropic_code_execution_tool.yaml @@ -8,7 +8,7 @@ interactions: connection: - keep-alive content-length: - - '143' + - '250' content-type: - application/json host: @@ -21,14 +21,20 @@ interactions: - text: How much is 3 * 12390? type: text role: user - model: claude-3-5-sonnet-latest + model: claude-sonnet-4-0 + stream: false + tool_choice: + type: auto + tools: + - name: code_execution + type: code_execution_20250522 uri: https://api.anthropic.com/v1/messages?beta=true response: headers: connection: - keep-alive content-length: - - '370' + - '927' content-type: - application/json strict-transport-security: @@ -36,14 +42,32 @@ interactions: transfer-encoding: - chunked parsed_body: + container: + expires_at: '2025-05-26T13:30:45.703429+00:00' + id: container_011CPW9LpfbF8dmXMvVNCiQJ content: - - text: |- - Let me calculate that: - - 3 * 12390 = 37170 + - text: I'll calculate 3 * 12390 for you. type: text - id: msg_01D3uRsKuEcst7jtMdwoqYUi - model: claude-3-5-sonnet-20241022 + - id: srvtoolu_01CPfaeVC7ju4VsdzxjSLDrY + input: + code: |- + result = 3 * 12390 + print(f"3 * 12390 = {result}") + name: code_execution + type: server_tool_use + - content: + content: [] + return_code: 0 + stderr: '' + stdout: | + 3 * 12390 = 37170 + type: code_execution_result + tool_use_id: srvtoolu_01CPfaeVC7ju4VsdzxjSLDrY + type: code_execution_tool_result + - text: The answer is **37,170**. + type: text + id: msg_015H6Emn2T8vZhE52mU2jF1U + model: claude-sonnet-4-20250514 role: assistant stop_reason: end_turn stop_sequence: null @@ -51,8 +75,10 @@ interactions: usage: cache_creation_input_tokens: 0 cache_read_input_tokens: 0 - input_tokens: 18 - output_tokens: 20 + input_tokens: 1630 + output_tokens: 105 + server_tool_use: + web_search_requests: 0 service_tier: standard status: code: 200 diff --git a/tests/models/cassettes/test_anthropic/test_anthropic_server_tool_pass_history_to_another_provider.yaml b/tests/models/cassettes/test_anthropic/test_anthropic_server_tool_pass_history_to_another_provider.yaml new file mode 100644 index 000000000..a73ea3aa4 --- /dev/null +++ b/tests/models/cassettes/test_anthropic/test_anthropic_server_tool_pass_history_to_another_provider.yaml @@ -0,0 +1,280 @@ +interactions: +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '312' + content-type: + - application/json + host: + - api.anthropic.com + method: POST + parsed_body: + max_tokens: 1024 + messages: + - content: + - text: What day is today? + type: text + role: user + model: claude-3-5-sonnet-latest + stream: false + tool_choice: + type: auto + tools: + - allowed_domains: null + blocked_domains: null + name: web_search + type: web_search_20250305 + user_location: null + uri: https://api.anthropic.com/v1/messages?beta=true + response: + headers: + connection: + - keep-alive + content-length: + - '15304' + content-type: + - application/json + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + parsed_body: + content: + - text: Let me search for today's date. + type: text + - id: srvtoolu_01BJh8n7va96puUF3hhNnYnY + input: + query: current date today May 26 2025 + name: web_search + type: server_tool_use + - content: + - encrypted_content: EtMNCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDMls1HqcdgUH1+5FNRoMOi5Mua0GMHXeHmk7IjBBQ9UrZ9tuM/Wz8gR3MDcbNC1pIzqqRQKgY/7jx84iSpfWWrA8Z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VW7SPBgD + page_age: null + title: May 2025 Calendar + type: web_search_result + url: https://www.calendar-365.com/calendar/2025/May.html + - encrypted_content: EuwCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDNOs+T2nScTnsxVJZRoM3g9Mm5RlKN0sgiPBIjC1PJPZRfoUgRpmpfVZcF8sBTMUr6Lu9BK9xOxTQ8nMMBGjC7kFOrwJZ3ENgXLhRzcq7wF51cgLQ+Pb0MiXBGozKXa1r7DbogMoIacrDz92bvzbwXbo4mTQMipnow47//PYVelJXipxVAA6ISswEiYPGXyCjqSy6QEIde1TOc8nvMpaM0Y4u3DdOXez5EsgP+ZxIYly/I7JS35h/azV0nbpzEKsptZwNWwuBtNIYbkklPaluda13QbkE0KK1Cl6PnkNMVbO0Uo9XURcwLn5aDLJol0GJGVpuiApXVJoMk7e7L/Ib+p1BE77VW619KzDmQvuAjQXZR28Fb5KEbRxXkSaq7xAZnYZyQFtOlqg/07Tv+V4g0WYZhI3tn0phBe0w+95NhgD + page_age: null + title: May 26, 2025 Calendar with Holidays & Count Down - USA + type: web_search_result + url: https://www.wincalendar.com/Calendar/Date/May-26-2025 + - encrypted_content: Es0ICioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDE+yP8aOxk+46r0AERoMFOlAyJD/AGdtDxeVIjDDhlbQbqqMmuMK9bN7ZNTwHWQwahkAaZd/LltU3eIPifLnfk4Apnck+mUOM61zRiQq0Ac12DCFUzhrlxvkXqpK3gWjgosGbUyzt8WbmwSaEmCbXf9F4bNc7+LKvQUtEceYmCesYcQa0lOT+88IhhRTxYBMyXo0Ws3Pw1yrLJi9P1JqfpcnWebg8McOGY/pD/MFeJORQvH+0UvGjBoMD0uaPPY1U6cFC7EWL+IebMjjmpj80RqAi/xjOOnU2XO8N98dFCzW4GiI9IWut8OBv8u3kLpmyYOV6cVxr3WTEntDv3onveQvTIyJFiDG8bmOKK72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ac.com + type: web_search_result + url: https://www.almanac.com/calendar/date/2025-05-26 + - encrypted_content: EpoFCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDClGwxB0YzJdub7VGhoMASvr8D1KqeBCa4knIjAV1lHpDjDIw6nag+Y/ax/aq2LhfZ1/CXJoRyRFiUGLVQHpERodH6/Kg+l8aLy01gAqnQQR8cCm+MlfMM3pSSNah8dZ0m5wam3enQ+5A3VLu0P/CF/TlwL5yB21pfaiu0lad9Ee99YFvs7LInvXpyFcUgLuhankIzNNZZbUIeS4sZIK39RrN+pmifOl6KQqT1f2tpJE6x7erDlAscnMvbRIr9U8Pwf8Au709bI6zcHqCg4GNJk2CqDf6kAXRHRRhcWYFtm8b0wvg9HaWVYZFOunZMJ1gFD3D82dSm3m4awyDSZm54A/9hmzE/lcQyiSVBC73NOmJMBxbNec16qaeJdUTZp33JYk0Fdro1VnkUiJyq5Kb2W7VYvfeQ1a2dLXPTYIsXeQXLHesmVTe7m0X70w0BgCAC+yKZPp68bbsEbsbjwxaWOxQ50seu8kkXDiEgscUK5e4N5YnPXMNjyMNZmlbhmFtw3abOmOCVdpcDORXGOgJZBWBkEqQ4mE8b+aEzXMGRqLzYjDKZHx11wolF3MGu/V/+f4lWEyNwR2Kipp67teOx1ypvl4DiZiPVkZwx9lt08u+TJGEGbTYtdPMQRLVX1K2K4YOEcP5/abNrdT9KdYH7dNscRDqDY04gi+47JyyTSRObcCjQun9LUqh0q6/NfIIWQwjguZ6dbYL67ymiuRgHJDXsPnc/P58qP4kRsClz9lu/XPTFuAzCQwaXioK3XiBNW73nSKyRaxm6/OxbYetPGIG2JUTkQtrmGL5AYJTfFbI6XOB1AFDcsoSC7nGAM= + page_age: null + title: How long ago was May 26th 2025? | howlongagogo.com + type: web_search_result + url: https://howlongagogo.com/date/2025/may/26 + - encrypted_content: Eq0DCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDDT/5zRyvf5kzhhLgxoM5vWn/Zjmu43rvWgPIjCf4z9SIoZxgNKyiLOqk422DLmHbFXGX+mhy6FPo43NOogfLhu/a3F3EPkiMxfd0UMqsAKIhRJKuEhfoi2saPCA3LpNhJ3YPO2NZyYL75SJdCbkfACe2YJOcCXHmt4hkrbA98Mrvh9DmtP6HNA9iYdsotXkDi0BuTlmiIcspblXnkpXLIURVpNYqqZ2jbjBEmi/mVlTonm9NJwx1rZHzwciKhaIrz440Vk/uTIqpiMb22U00hWrQ563gNlMSXpvIpyayhJcCnNEjQybJjQUsKaMqb/3Xbp8NUoWtidUb4ARNeoNe4BlzMEEcIPc0QWi1CKoQJH3JazxAhMSqvc4SVWXRyspZZP6lSHhMcIYlf/yorVYVF3FmL1djZfxXbVnI/VbFbpoNejvnOh5QIdbDrHu6UN3u2iGZBUJLgs6i9OUwMWw8kpi2WUm+3JeRkdyThE0M9WAhK+4qYD3UHgFCcucX7ZeGAM= + page_age: null + title: How many days until 26th May 2025? + type: web_search_result + url: https://days.to/26-may/2025 + - encrypted_content: EpACCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDNXuvVNnWjvXgGql0RoMXwqBXk4fJbTzoM0pIjC1HFbYVJOlp39xpYzw/uJVUO6cC2L9ScOu9ceP2MDjyBWuE0X2LxBsyFjM3ZwzQtYqkwHukWybclFQu5CuM7gntDFNVYsSAVDbslXo5WwOlljEXnC7ohNjuB4lJfXS5HomdOmnUs0/thHHvR5mvCvHt5o+XrnTV8PSOXJvZonVctfjBeMe/3VWaQX2Pr8F71hiBVghYnc4lqnvA/nebBXcqdz2VTlG7V2/u+KCGVfR27l0+BX9s8vroR6dZ7flEBZBSDDzt3QYAw== + page_age: null + title: What day of the week will May 26th 2025 be on? | howlongagogo.com + type: web_search_result + url: https://howlongagogo.com/day-of-the-week/2025-05-26 + - encrypted_content: EtkGCioIAxgCIiQ0NGFlNjc2Yy05NThmLTR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uPuf7mBofFqKbUBJOngnAvSmGibWNn9uSftf8YAw== + page_age: null + title: Calendar 2025 + type: web_search_result + url: https://www.timeanddate.com/calendar/ + - encrypted_content: Eq0CCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDJI9LlFy1IIRylVnDxoMIXCLnspt86G8qxeIIjD0AiJH0r4ULSsSOXmrBj0ntQEjeADrBeCC4P53iCMga7fv0Uxic9EYRY73zIkr7aAqsAFql3nOsfaopCrkf/WC9qvKgDAeuBfKcTNjj+rfHn5HXgVM4BOpomSXxBc0CHUe3Heqw2mD9+Hy99flWI60pgPB+umunXeOjz5HC4W1q39ROTzvMkdpJzvXoUgG/dbgjJ9vEvZ0VC4z+ZwRAYSNgOgiRt3zApcZJ4iSsF/XgrQNs2L2ThcQyc84+lKKAaKPrSl6Lwm1bH+HTFYIm9KPyhvlbfEbp5buj/wQgn4Na/3qrhgD + page_age: null + title: May 26 + type: web_search_result + url: https://www.nationaldaycalendar.com/may/may-26 + - encrypted_content: Eo0NCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDGEwwt/jePgh2l4e2BoMXI0/IICuWUmpN2DNIjD9RSXx/WUV2tcUa8Agn8pOgQlObg5w5bcSlXKUK5FRojDqDl+fe1KL3Jb8EFqgICwqkAygqwIv4g1/aXTTf/O3ro/pVB8lEgHU+ulrBftA92NmhTN2joJhUyPhgs4CxlWyBe/N5+e8ek4DwRwhNwSfIOOFObfL5+QoAT5Fu9K0CtYwbW0iMM0aPYQOnlg4jk3cZ2fk1igsokuhkq9jh7alCsgB0HR2WOsP+VT9Oa25QZ+kWR8ap6MRvaQRAe3O/+FqwTb9OW3GSe73P4XfEjCaIMLidmTMb97XX1I5P8Z8aKngUPQxOTny11sYNG+FiwTO0/Ekjn4TC5Rvxqf8TeHKB1WKWZydnzKLcUeAjTMCubhNYP5VV2zmS30FNaN+R9K/R07LhlXyUBo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YlXRd8kdhri3ZYT7qdkTqrIE/TpgilZZLyIeVXZaiz7F3oj70LfvKp95l7wiAhQXJpHv2HOSLc8nBjC2FOVhoebfdKXRCu8tt6bQkZ/cvDh3E2ZqtrlfNhxOoPqCZyjqnNqTpxmH7UNcir9JT8TI0KZ4IhkTEMxW4+CEhjOesujYUu7gVWwqwuGSj0Rb/XWkjQOOcegGuI7O9Cj3g6/wLjXdOI9Zye8NOv9LFPWIT5kCX9aDnik3ZDe5MDEo+17jHezYDOYKBWpModyf/k5AK6d5/vSMn+6Ahf89zvl/r1SQmGtRBMqaAJpQJ6HgQDf+raJaL9rumcoN8H8ACw8EL8XqnXAK69+2BJEduir8UGNMYPLe+Z56Esl9yd5IlKlO1aDZExVdyAilNI6XXVFinc5KqazckkeWIakgqSx5K/YIa5XsyPznzrLsifuEBeDw10LAh0z72x++EYaygGyQvVzQTId7QwsN6Cjoo7Z+Zfnw9t4S5kA8V1w3J3L0feCqynQthIupll6+cIywju5gYMPR2PTsvOdN1xmiyW1b7Cy8Rrsa5txCZHSvz4yqfwZ84r0NX46E0mupmGyHxIlwllEIx7FsDNnJBARKaqv3fYRA+uQPq7DdaY+cRJpRIQ4o90XQCS+rLdgDO+qFoD0N0pl7GAM= + page_age: null + title: Day Numbers for 2025 + type: web_search_result + url: https://www.epochconverter.com/days/2025 + - encrypted_content: EosGCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDDVXhko+GaoaARLiWxoMhhwixTlmn7YeimyXIjBqLMdGYisjngIKCxw2kKV4whivBWinF+rFSah3+1JUtoRUor9o+HmU0StGZxaPydsqjgUGl0OUiZ7Dlc0YqCN8bOGaoUeUv7MpoODHTH97tj67PKZmSbEkDp0J1bJzxHd4WeL1SdNnExDsDcSk4joJFA4lBVAAgxvBogir7w/ws8fRoANAp3F4T9IoZHSQVR2PhtRpymmT1JIaelypYDnda1cLVKrOhF26o8zSp3sDKsilZRW7TSGG1YmzEEKdFK0h/jrGO9yr35kL8vzIF1vdXeJbJa79pFo8e1OLxq9Z2e3y5thBAB3aMK+WMT6n3vRaaRpG4/sqL69lUB/J8Ju1X2VAqfUhYe1GbTKVwAqv+Fllq/NQfZywAaqkHF0YqzMFNYYNB0KTpzrPetfmvXMvog2I0qn8Xuuefw6ROAgsUJaIbyY2b2AbO9Ohxlqv08Lgt/CEmghIi2I/zvt4Y5AjUZzpRUqYAomrkagze50qj5P5Mj191pU+SLehkArpjDp131C5k3jhJ/6m7EaRpv7R4JWxWZCETvqonBRkooPRYqTZkHAD61WjNrFzDOn3fOHjrK9XjQMYE6C9rLOQf/Cy3XdlJgmSa6OKzak0NhRzIA8h7O16Mlf5kaMz5gW4vhIY/luKVQCgo7O39nxitIw94BlW0u0qT0XzCFgS05ADWdIC7SHJaU8NB4x2h0zQTTX2P5m0U2giLYPO86lUWicae08l14+JUB+uPlpDhNU7UQl29SM77+XnzdGiX/Kk99k8FcMrgp6+X5riQWuE0+rBhuDzOnVhGOgFCazxWCIpXIAvYqin429shbJtttU/upLPrbj9HsXpCJjOPI7+FLK7JXH5tH3rz1OCa/14jkNd4GTg5eGNnJSDgSJ2dWxC9oRQyFub6rPc58n9BCkHzcqrF502Q4TTEfNUuQsqBMJL8yEYAw== + page_age: null + title: Countdown to May 26, 2025 in Washington DC, District of Columbia + type: web_search_result + url: https://www.timeanddate.com/countdown/to?msg=Cressida_Glitter's+birthday&year=2025&month=5&day=26&hour=0&min=0&sec=0&fromtheme=birthday + tool_use_id: srvtoolu_01BJh8n7va96puUF3hhNnYnY + type: web_search_tool_result + - text: "\n\nBased on the search results, " + type: text + - citations: + - cited_text: Current moon phase · Moon calendar 2025 · Moon phases (Full Moon) 2025 & 2026 · World Clock · World + Clock · Calculate · Period between two dates · Mon... + encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDEgJNRfMEmnW19PSuBoMpvnoqkDvIRkx6yxdIjBNsAkQg3SrCCN1zCEKO4LtptywdqMNvgULDnwzA4e8JoIj6nDuov4EZIdg37AOh2QqEx0w/3OTuMMUW8z0FsIsEkBStrkYBA== + title: May 2025 Calendar + type: web_search_result_location + url: https://www.calendar-365.com/calendar/2025/May.html + text: today is Monday, May 26, 2025 (Week 22) + type: text + - text: '. This is notably ' + type: text + - citations: + - cited_text: The custom of honoring ancestors by cleaning cemeteries and decorating graves is an ancient and worldwide + tradition, but the specific origin of Memori... + encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDDh1HLd3wIXrMlbIYRoMJbIyO6jhVRytVw9tIjBp5E9G6P/4oCUT+AvhQia2q7og82j1ZKFJMEyZllOT5wNB8wxo/hua8sprObTuApUqEwNbgxwhB3Rzdzbu8jotXE3VzSYYBA== + title: Daily Calendar for Monday, May 26, 2025 | Almanac.com + type: web_search_result_location + url: https://www.almanac.com/calendar/date/2025-05-26 + text: Memorial Day, which was originally known as Decoration Day + type: text + - text: '. ' + type: text + - citations: + - cited_text: 'The year 2025 has 365 days. ' + encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDGSJfkRRZt9POYx8TRoM9ZykWxngb2XQ3vvZIjDwg7OYkVRW8t1wzFmTQ1TL5akbS2y3zcQRN/I2nU4v3NsNZbfOSHEBhWOql3U/nekqE4EtVZ7XYLel8iTWpvOfRFX8iUAYBA== + title: Day Numbers for 2025 + type: web_search_result_location + url: https://www.epochconverter.com/days/2025 + text: The year 2025 is a regular year with 365 days + type: text + - text: . + type: text + id: msg_014DEwKKUs2hUThC8aqhrc5d + model: claude-3-5-sonnet-20241022 + role: assistant + stop_reason: end_turn + stop_sequence: null + type: message + usage: + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + input_tokens: 9582 + output_tokens: 178 + server_tool_use: + web_search_requests: 1 + service_tier: standard + status: + code: 200 + message: OK +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '732' + content-type: + - application/json + host: + - api.openai.com + method: POST + parsed_body: + input: + - content: What day is today? + role: user + - content: Let me search for today's date. + role: assistant + - content: "\n\nBased on the search results, " + role: assistant + - content: today is Monday, May 26, 2025 (Week 22) + role: assistant + - content: '. This is notably ' + role: assistant + - content: Memorial Day, which was originally known as Decoration Day + role: assistant + - content: '. ' + role: assistant + - content: The year 2025 is a regular year with 365 days + role: assistant + - content: . + role: assistant + - content: What day is tomorrow? + role: user + model: gpt-4.1 + stream: false + tool_choice: auto + tools: + - search_context_size: medium + type: web_search_preview + uri: https://api.openai.com/v1/responses + response: + headers: + alt-svc: + - h3=":443"; ma=86400 + connection: + - keep-alive + content-length: + - '1494' + content-type: + - application/json + openai-organization: + - pydantic-28gund + openai-processing-ms: + - '1271' + openai-version: + - '2020-10-01' + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + parsed_body: + background: false + created_at: 1748263711 + error: null + id: resp_6834631faf2481918638284f62855ddf040b4e5d7e74f261 + incomplete_details: null + instructions: null + max_output_tokens: null + metadata: {} + model: gpt-4.1-2025-04-14 + object: response + output: + - content: + - annotations: [] + text: Tomorrow will be **Tuesday, May 27, 2025**. + type: output_text + id: msg_68346320b7608191a49fcd12e06dd3b5040b4e5d7e74f261 + role: assistant + status: completed + type: message + parallel_tool_calls: true + previous_response_id: null + reasoning: + effort: null + summary: null + service_tier: default + status: completed + store: true + temperature: 1.0 + text: + format: + type: text + tool_choice: auto + tools: + - search_context_size: medium + type: web_search_preview + user_location: + city: null + country: US + region: null + timezone: null + type: approximate + top_p: 1.0 + truncation: disabled + usage: + input_tokens: 410 + input_tokens_details: + cached_tokens: 0 + output_tokens: 17 + output_tokens_details: + reasoning_tokens: 0 + total_tokens: 427 + user: null + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml b/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml index 3a59790f2..57f5e285c 100644 --- a/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml +++ b/tests/models/cassettes/test_anthropic/test_anthropic_web_search_tool.yaml @@ -31,13 +31,13 @@ interactions: name: web_search type: web_search_20250305 user_location: null - uri: https://api.anthropic.com/v1/messages + uri: https://api.anthropic.com/v1/messages?beta=true response: headers: connection: - keep-alive content-length: - - '25971' + - '42593' content-type: - application/json strict-transport-security: @@ -46,135 +46,107 @@ interactions: - chunked parsed_body: content: - - text: Let me search for information about today's date and any significant events. + - text: Let me search for current events to help establish today's date. type: text - - id: srvtoolu_01ALRFK59SkK8D9e1Xj2exhq + - id: srvtoolu_01MqVvTi9LWTrMRuZ2KttD3M input: - query: current date today May 23 2025 events news + query: current events news today May 26 2025 name: web_search type: server_tool_use - content: - - encrypted_content: EvYKCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDI/hbUSxQZPSWMwO7xoMxyuxfcQKb+8mOPpjIjAKK+ApU1RaFto5mWlwM5k8iEi5juZVRU1xY18ez4rV7YiJHtssA7lBadfIzGGJ3qoq+QlWiTqY/hH75J03S+I+HUn4NkcVZAUIJXPRbhhEuFMj8w1EdI2hhLGeOPnNHZ1fuykYebO7akF1fcbtzEm2ok04u8mAE4oUdg8NzIWmO2QyH9cs0QM0MfIyM2pdGcKPqVMIAek4HrHO4OfGANUDpnVsnNO9XvABIgWXltfv9EWH+iuhzms+GG46hrJxMpy5qDefjHsHzTfr9Rv538S6Hk/JSc/v2cbmoiY4LP++58eKxhQabyI2HM4iT473MCP0OjhA8lCe0VV/5KuMfQL8ywFhThrkIUXu0AdhlgBQSAcu5SI3JkVYcr/ss8Xxbhxjg9tK6xyNkvYj7bJj4q+glR6fTwn9dWkRn0umBN8jUL/tw9BTXYcD3W35J+rdLfLgS8Y1QRnhI51OFFLYAmMj1aiscjKNEoANJtXDDQXjG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Cy0W3rqQ4HeBfJA2dPHdhZBkxM0Ag3X/x77ag61/as8AiAK3abH/bZDeldz5sshXSNw04QjqAMpNbLx9rtybAxDfg4LnUB7IDpOSCWgv9VzMGj1BWIKmtl3cUrVCzTPVFcYeq7KqA9XUPYncx8UAEyDe4CnZtVvSXBnY0IN2lIEl62FSq3qpvgGHyaT8jAUeqQdzw0OGA/05ht1h3z0JqrnL0E6EKjpZdYpArEw/hlArmDmrgq21XKH87H0r0iqLGrQWAxpPRiioJBpAa/K2r88ptQGJltBkEuIkiE6ySU5pHy7IuUnGQum/Jb66+9KfXDgshxm2p5QlLUoK+r5jk/zCY5o3qoDzc4+5lCc/qlG9k2ZefX1/1qbhPm4DRVQUn3c1NWKuZ/8UrR4vYiCfHtRhwyHQ5EmT2G2U6u8rVVitjpt5q8z9FZ8oPuD8ShFxa4RJRiH2r8vR6LrTU41+uJCUeRj2TR8li+zDkOuzKVCtN4WSzITUNrz+8Sr0Zgg85yjoCTyCpEsrnEzxq94B2BdZM6B9yAGcR06tYtbT/FWSHMrL5Jl/ooX87sdhXUJdUgn+ea2EuqkYImB3dHbV9yNqew+wDtDNnpwn/5nRlIbYjwCjm/x3QNT0tM5f21C6WLCFqFHN7Ji/oCvYXOdsaxiWWS4bGAM= + page_age: null + title: 'News: U.S. and World News Headlines : NPR' type: web_search_result - url: https://www.vogue.in/content/horoscope-today-may-23-2025 - - encrypted_content: EqMICioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDH4w3jlL4QRvd7HQhhoMpAJGlWscx4DnjE6xIjAZz0vEaZS1UVwE+tsfKjSwYQXvn3voAgj89JY5K+4TVOvVGX0CM9KNq9bYWBSIGe0qpgcLcS/qlQV/hD67LZEvqzZnHh5ChSAr5C/UPKvl3BPhiFM6fQNz49lWvCwx24f7WUzLN6HCTRR8uGjLxOA/nx243f5Gl6F7YGR26q4+/ObdvCiQAYGYL/fH8HV++qqxuLX0QC2PcQeif2LB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bsvQ5EvsmvQN2PifBI+GAM= - page_age: 7 hours ago - title: 'Sagittarius Horoscope Today, 23 May 2025: Today favours real estate exploration and property-related investment - | Horoscope Today - The Indian Express' + url: https://www.npr.org/sections/news/ + - encrypted_content: ErwHCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDK2W0Qu0wNgI6mf5EhoMNCqr1gVeM/Fj3PSYIjBrgyGKmTOrJLgDCXcOvRtrbigKDeccd5oypMBGnMVhm6h3Ade/9+vNOwI3ByflKmwqvwZqUUdfJ6+k9ZDrmb7VM6ktRqsZ4Z++yOdyubDNbsyM6RdwYuNi+bS5ZUON+rMd8+ZrQYlGYqq7NF43o5klxpac+Dsgx3OlKbu6Hq6eiKOQ3rdPGYlUYKdDouAx6RjypXjhYkqErPrjlFZhNv2lO6cohI0QU66p6b7G8UMVyweqYZ+2QYTFfbwU5VdIAOiQW8PBgNwPC5LRnidfbiT04VY+cEsNW04zOq9coXs4NgFRw2WDCZDBPGTEJex0xv7vD0/D0YpBhfiawNJ8FgBTI6q0gXQ2+YwqelVaZ+BDpu2JeRABLXiXQAMIiBBiayofacvfgJZ4omPY1JRiJwX5IpbLFqLcNz2fWr8veYedwrDZV/lOjyn755WTp2i89GD4Pv53htWrDOH8/YJBQ9u5KA2DFz7zAtRLyPqvPz3YaLMr3ATFvs8m0igrllgC5uaWPWfO/28RU7QNnxyBLGNonF3dtz3Uu2naeNvxjRhqCtUOON5odOahtPrRs5qkjv/UrL2YzlnfsRL4Qb/qsGJE6YWScvLhjBaum29Whk2p6RtYJqzzSqDbk0jxKe/hNatl3s2JF1bAW4L7p9FnsK1v/G7AYSaIYl4RDLGuL1bFOKGKVlUZtohNMws+gvTCYKdhQzfurimTsNIpBP4Ci6aJ+/yACa22AXGhZQqyiOS7yxI6zj3vZdQGFBle1TjDpzveY2Nz/kuuTCPbGsWt5kd9v7BkWvkNacqZ70KijyIk5dVt3H0q4eavyNLU0gF4hSCPDHW7eeWXTmNs1YniKiaHrwmOOqXjw2PCQrZv0i7UQRjDmRQqx9NtuqzMup9DRPbQuZM23b8JwzqA0Qjyxc5pTlWRL9aU+U7ZKOD1OdBszAU54c5N9jOca8S2Plt4TGJcAv2Wy73Bex74GPlkHcKWO8TJYhrV4ZF2nMjssncQEKCltJaZg6TJpazpLKoQ1XmYmgzebbVMRc8RTDXk335AYKkN62xRnfrDd5T5wBhGbPNQeF7PGigtAK/SpSpTna/vmGOBul/cONWOFFKNdY+FtCAGd4AOo3s/N8QUnKR66TEv9ocuVep1UZxV2fJcqIuJukutfT9eWPcou6VImLUzRQMYAw== + page_age: 4 days ago + title: The Biggest News Stories Of 2025 type: web_search_result - url: https://indianexpress.com/article/horoscope/sagittarius-horoscope-today-23-may-2025-daily-astrology-prediction-for-sagittarius-career-finance-money-love-10020998/ - - encrypted_content: EtAJCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDD3tFx9a2iDqJWl6WRoMBVqhD6dltrjObVsgIjCVGW1c5PmYPcrXvq0c78H7gjjxs+M+yJkoIz2pfjBchm8LajiEpkfIynRSvd+Ym4oq0wg0evN5iA8qD3woyOAJqikGVSvs2nTDRmKBpKdHDdgDf3Na9XAw1n/uQnWWLn2+wtZbB3dXUekFZ+c0zzeQxo74Jrn6I964ykL9xq/w7Z+D4wr28WLbK5ITEq8lkH3Sacqysh2tegSHixLmnfTO4DkAEnlFpKpu+V2Rbs/Mu223BAcztshvXqUvkuXsvKSBVSOPK5Mig8HEvHG3uipWZ1Oug0GnE0pVlWiyjbGT8MnYExZGnORIobr6lVN3CXXf3I7dbK37PGpEjIAu5XJtvam4XqrhIS2xCMHniBefKYGdwTX2OH8HJ1rRybcVto/imdvGbOalGKMto8jMD5bNrWdA4qDCmpY9sK40a+xcrAXu74u5XTlw9Ifif1kWv+BQSX5KQ2XbR8KnjW6C35UrL6s996Rhy1dpbBufKsyabDzzBSe5yKNp6Od4O5hCLi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horoscope Today, 23 May 2025: Ganesha sees you leaning toward creative projects | Horoscope Today - - The Indian Express' + url: https://92q.com/playlist/the-biggest-news-stories-of-2025/ + - encrypted_content: EuYCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDCmLeaYgzUtJ4Mi+fBoMpktwxWvlSdpeNRRlIjDckkEHzeMKWP+vkSJ+7ci91OlLvn1nTU4wG+0am9miZ+68Q8XjsyCBGekIPeSsgpkq6QFTAvqrNhd55GMbj8VQtB/7oV66lwp8PzaymgQlLzCnxBdZ6IRYyEd6XwFOPrWCwyjtlKbwRiM2NIaNsGcrraBVrDfsjCz20qsDPGNsQf587z/TD3zWUSelhjhf+T5nDCEXUkYM2+4MaGP5Ty57Khh3WQr5q6Q46m85jBBF+akWf1uKZEgjgFug1ufj/8TXEEAaKCVY9YeXTXfYH8DocKveCXH4Bp9TNbgx55UrL8NdXiwdtpI/zqY+8hM/SiaVeXXI/Rbmjg3HzFTLfrH4wSrl5awdKWuGwQy8nqRISZlwNVnwFY0e8uc08xgD + page_age: null + title: ABC News – Breaking News, Latest News and Videos type: web_search_result - url: https://indianexpress.com/article/horoscope/aries-horoscope-today-23-may-2025-daily-astrology-prediction-for-aries-career-finance-money-love-10020982/ - - encrypted_content: Et0KCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDBq4olrZFHF+J7dt1xoM4bAEoHkWzZty0vJVIjA5Dmomb4aD1Bnw3XVZyhywjrUcaGHukZRPGuUuU+YpIAfSSidBXqmlvJNiz5Uy4QEq4AnKQQzJ8iu/iVDcg0mmgTHr1Hon4M4Ct3zN9VN93hiRethoP9r9/1CHIqe3vr0K+YiWikm5s9uxYYEJjEb10aTnCTZQ4xi5APbn25GsjVhQCDgjvQ0tCQDREYXtFb1wpGk5jCBZka+2nmnGAIF+BTz6tXbvdOylcuGx8S6BxmuEfXGCFlhTiNSqY8/7Q2R37jo6J54p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7YlnAjHyxy/79av029p0ZxxAcH12uEFBLFFFJIBgX5amErn62AdhyCpr5z0H+Ck7sX5J+FVHIKmOeWN8ptCcYeg/D219XUZYEDhacblCbIDBrb5o3KdM1LPVwfFeox/EjOEC185UC/N/mZMPVSb21XdWTAcWZ9PPzUqwAMb+9DKbtCFPx6ZbN1h5in+k/rts5+QUKCbgaall0a9hKSAMr7AHMi17iAc0vYBjG7UZpIw1dsuyWDo1NPELzoDBwRzCtAxm4BSHnt0cdxyaf/41Xj8QAclunFwR8HYGBKVcFDfMqh94O7reBCHiXmiaeGul+K9KMa/fdfT3FKx1X779fpG0+EbTGxeTPqYAWp2IQ/LxXfa0hnX+Que5U2iQowLkjjyiU07a5PMYAw== - page_age: 7 hours ago - title: 'Pisces Daily Horoscope Today, May 23, 2025: Meaning Is Hidden in Simple Belongings - Times of India' + url: https://abcnews.go.com/ + - encrypted_content: EtEWCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDHm43fQ50ug337S3LRoMMpBq69Qh8QJrLUwbIjCQZpwOKhXhp64xZ6VuO9jUsfumcGFVwLXHbCFUYK9256rmPdiT1B5qecHMx35qI7cq1BWGwSfTqoKrKdwCLT5GuFP1tDnXee0s1GL8tn4WwqVUe+FgYiHiknLq4+RvdZOXOZv2yrffRh+6FAMtYPdhUfkBVONku44BxAkQabLafuw0pofhEMh1wj5i3HhmjMNIqr4fgMCqHpre7nt052sFkxzlgvrwtKPdAL+bC/QmL9aXPzmbtE2V+LVxLQ5XpcR7OyhTL82S3ds+uNLDhbtUYZtVcLHgdPIk422XzZeRxZ4Sdpe0uIss38kVVPI1G3luS5oJkIUnIaTlsFxgrNKYPZYX+eOwVj/9NdTUIkXtCik32wTOexcIgBmw7JJcUL9V5i1SqhHISSnOG6t4ttUAfBivPS1IWCiUPNwWYWOjgwX8dIVIyW7JpC9Vev/gMJ5WdroYLyKNLK80uXfwxcCtQknjSBaKHm/0wnVERviHapls3prW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B+4s5+5QS7dNwoDIYAw== + page_age: null + title: Breaking News, Latest News and Videos | CNN type: web_search_result - url: https://timesofindia.indiatimes.com/astrology/horoscope/pisces-daily-horoscope-today-may-23-2025-meaning-is-hidden-in-simple-belongings/articleshow/121343860.cms - - encrypted_content: Eq0ICioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDLOvJkD5k12EJV0xFRoMMZpX7u/ZhJlnMy3NIjAQ1LwSNr3eZ9XTu0sQXza6xp7J2/P+ed46KYL7Nap4nyl0q2LoydtpMnvPMh90g10qsAfAGdqlb4eoF2zJ4ejehLLv0N0s2mrLzzWFUrv71ox2mpVfqwnkjq3VYnonsQyJKERY7S0pnRwTlaO4c2WYV644c+xvnaYGpY+IlYfkJ/71kBO5hglWG2valdWZ2v9omGbNiXMqKSMgt7hFKgRAr/rhHqxeNYtApWalZckzxX0DvdtbN5HVWSyqGBYlUgDDTsvLHTWaxfDur5Zfe2EFTbtdzNfV3dT69I07iol/bZsOMBcDRhXp0HoMvpClNo5VrntvSGBSet5nzJfiowmm6zF7nBrWnOWwQQSou2AQnUTviUrdEA61+92OQLSXbi2/qvF9gDu+jpIsjfbfcQNTLN/kVNYGLpSDl05aI0iqP6m6kCcPUaUvxNAkA+I5t09RhcVzg7Etnd/9kWZFHoXxybR2K4YFai2obUacDR7OpRFAwAqQ6Pgd+rNOYjew+8uC6ix4JIfnHXqcyXsysCUXfKxhjXblqL9Bliz4bBpN1o8h8xlj29A8701EgZkSNIMFamhOys7jXc1wjmqY9aXU8Y459vwLYFCfKGFbAmxIFv30zWvevZ8iCrkq6+hCP7r1Uzi0XBX1ZDJrqlWZtqMqxKbby5NDFoemsXpdeJyvxYfrNLLSAJreYJ918PymfGmUIH0RDvv6wsYnGPeQvuq2SF7Rc+ITy/6JfQlWAD8BuPCJJkNBGhYTgvB87EH0urdua3gvIpNVCQ8xu/QZGmgF7Ob1/sAXYJ307OkTwPs5D0Dh6MJEbgkV5uZIGR/4qdkeqDs/aFmdOkAa6dE+WdNwGHzVD0p3GPgILmj0n+3s2+EtQR6KAk4By/UCuX2CqZL2bk39b2qe4zFYfYbwZHoHQjpPM8cdUlNB2oiEy68NMZDLoQ0TjlEDli0+DDtqy5aHvGX/dUUF1apMIVwZMZrAenQ1VuczNKwKhLM3XId0fTkdwKfPxatWYML8mY1W0pJZZxU/DN7gGGG5q7XsCPVOyHf3lu4M9Bapt6sJe0VBOAsAgmVoiDvtGa1oGfFvlLJU5/w4sknLVqm1/oA1eOEnFdxvoSiOnkyojw2mlmbqNrY5iw7gK64juvypzqUt8IcwHJTaIBXPcCtY3bLqQ42ADmoPCdYosYD6/Y29LaA+cue5XLx/CcpOZZMdOueoxTDFckRNOp5qzZjzCwfiZnLpBJA0SLFjD+mWhEDqRmZjnUW0wsY6Ued9xPEBXfUM6X07CrwhNMnj6BxfBmCn2OZuzJASAriXoZabcxT1QrxfM47z5hgD - page_age: 6 hours ago - title: 'Tarot Horoscope Today: Zodiac sign predictions for May 23, 2025 - Hindustan Times' + url: https://www.cnn.com/ + - encrypted_content: ErQCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDGPat3RtBffd6jd9uxoMkx9uAfM4hgJRbrR4IjCBVNWqux+TsqDP0poLm+ss84SLrVR4rAcjrQSDPna9ZfR0OFhPjv2ko1ZVuBzeRE4qtwGOPV6my0G/y4nPEH8gNVc3y/8uZzh7O8CBrduzchEMd5RRXLlsC+bU/SjZ+5LBYGzAVwRCfVXIdaJ0/d8RYdJWHo3bvKc5Lu/WFPV6Po9gVHLOU5WVDsyzwmrvqzCYC0UhkUMa0yf5j7WTFaT+kgHZcFcbvYPG53USqNh0seahaaCC5fJRjRBTAvuyj4md+ppTjIXGZEp3rTMG3MTkv8t60MgPzn4ObLGEmBQIQrfES9G2BT1k7lUYAw== + page_age: null + title: 'Philippines Top Stories: Politics, Environment, Education, Trending | Inquirer.net' type: web_search_result - url: https://www.hindustantimes.com/astrology/tarot-horoscope-today-zodiac-sign-predictions-for-may-23-2025-101747812397776.html - - encrypted_content: ErIICioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDEoFc6QoKjloLSzLGhoMyxbWSt2S58TJ3hxSIjCX/IaQvPakDfV4z05AuEC3Pt56rlk09aIfD9o3a/lMbiWo+EmB2GrtRoA4ZLn11G8qtQdImlz4GkvUtHQPJf1XrRLswnxP8S855kdWVbia3okuGk5pk+9Ly2UDPDthFTM0JzuZIdqKHr9jrWL0r3Z8U97NNQdoiYn1CkIX5tRNjD1AnLIXqAFHI9F97c/3L5tIAEpz4LNp9hy79W1wevZF7QHDA2iNM9LMiCXA0M2dpGTUn6YGnEhtlw5KTi2pkJe+VNn+L19SOjYqCyrcQKa4jKhTZN7YGdWnKSWIAR8v5IuZNuhjLeecVpY8+dsyJb2H3wvvV2l83nkTeZLWdcq6vpAHaQinfe24BBW5b6kmCz9kPQ9rytEhRsjMwr7jntSf/RvejNW3PX7ZWkgfDiAxvV31sJOyw0b/sJTDFHU7eNjnvkJOIRtMK5Mh5bQqERJ2//ZfSeMdUzjcNWkP6evqW9g7BepfEjCezIfW9ndVD9ZWK2qnyX1VVX+Lr1eF3DFGQRyZv/yhjwR/heEqiwo8mHySVBoiJ7oZWI4YJPssqgIfz30V6QCVCNRYdMyNoDNzDtuaVMnO1mIoUK5iNlK2bfWIyy2zzrGXB0cmpUK9LbESXNG+Le2ZRAQr6nx/ufgNBx8o3tkmb1409xV+C2U2acs+8JiaVmWFXy3e9gzyDyf59i4ZhA9B8E4w4DvSw6p72FS1qwXkmR2cSefN4ebfsIxuquvHFPDPoPnoPGx+ajPdVPZUO4LHjkzJF4Dft0hnDwYnO9nQGtNa6oBG/XvhL64bijAOzttai3Mm2x1q4v0+WLg4HR5JzzFODBjo3gkYjYKx1yGdGNEBReDuMo3SRDExW8O57sSD1cFGNHZQq9qqILYf+3JkyE5smvDCiCQadKXbCdcXOoaeMB7LHtUnnSdAedj+5TacMIC4D6Lm9BDPc0KZU6URbaRY1L8lJnPPZWycbefU0SI+DymFgMWFH6UsJw2jCmb1njQPitmfyHYJ+cFaJuak6xGtzeYmMJbhQD8KYhVncpM21yRDKndCUuNjCf4OBoNZTO6v/vvYaUZEnDeXjovFww23pEAaUaBBXVz9oeUMS1/ArQjL0vg6d7HFZofx9Osmgv5+uURtCASNJrfOcB6nFLdC6pg6/aXu9znM+IKtSb7b3rRnbAq+1Qi99SmCcK8HM1nve6gLYzm/5vMrsxhWq/QdEvG9sGSSTAICIicgfE+6mysGV5SdIMiWDpysRRQrg/HWIFNRFxno/Vg1Q5Q+1rKk92p9aSCgZowByNrQcq05uluvnDV4WiMviaMtsJ0vFQeoi8jhkYqR/MVMoE09GAM= - page_age: 8 hours ago - title: Libra Daily Horoscope Today, May 23, 2025, predicts creative breakthroughs | Astrology - Hindustan Times + url: https://newsinfo.inquirer.net + - encrypted_content: Er8qCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDHxmRLcrViwuD4QB+xoM7WGSYO1wzb6z0HchIjATj+RTz1UTP1XUgzt/sKVxIcnJjndgdx3zaOKZ/CMx4ib/mUBO2GKxhojugf+2p5kqwik956URo2GiacJOXWHP0cyE0HmZMDSHK1Nqs0Y8aXMl1iWcTu2Q1ZmBq4+AQ8IQc423bw58O5dc3bS1sdbQJyrd/YL/9SG6Df73ou97ktQ1Ij/MdEHQuDMHhvVDoESB4+i7NDUU4aLqgBFiOGCEozcSTWUdK5ePwtOMSOEHUCOJ7lcxTzDpcTg0tKH1Qo+HANXFl63xNQGbJyxUUBGyGjiAe2vWb6kvW6owWSL5HHYnJ0pzpxska1ovW0yt06Nw9ZuotsX0Xq84sa/Ceg/fFCkMsLoREsCknC9di0zda3CgMrdX481wowpRS0dgj586+6SX/b9C9k7y9htoMLdsG38chq/yHAKeUrtjxHRUI7rLsS63jmVrFxj6S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62tApbxduXL1hDhhzpoHSjyeic74QndYU3ixkrI2sjCpnODlNWfNcEDJ5eVfSepoBdvtwxVX9Go9N1NWk4tKSQS+VnP70Ua2yCZWmI3It/0Q0NGL8eJ5wfpq3WOCa8TmQiV5Zx8e2LjnyLlYj7RsODQZSSet0V4zOr8SOgQ56Q6kwyW9rnjVZItW0lm1h2CqQvlnvF/Acmrzbr/UTEIrEqTGQpaqdxdLOk5ybihhfTgWaTPJ9oRKomxGAM= + page_age: null + title: Portal:Current events/May 2025 - Wikipedia type: web_search_result - url: https://www.hindustantimes.com/astrology/horoscope/libra-daily-horoscope-today-may-23-2025-predicts-creative-breakthroughs-101747924124810.html - - encrypted_content: EpwICioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDKPDaaqaz0k5YUrSAhoMsYnGse65ktdFJ+VjIjBQCTS7izJVJkJRjg30JNTZYqM7HW5wnLXF5lxp4EQYnmaf5nefFH89U77jPFaDfmkqnwf2PYyTEkuVuCXK7oerw5/K6fIlkjnoAdCdoP9+2xO2dculHBQhlABRQDCFbnClLvQG7pJHLExLpSrYicn02hIq17lp079SkdMzbAhIEnI/M+z37ckzndxCQWmo18pBRWT2QfPgAOgxzr/Fsn/gD7Hxq8VRyznhU3FfHTlOWP4tqWDdyzYb2h1zC3va5FL7YF9Jk78wEr3R2ZT8Ig8ZefVc9+039CUXQ649zphHy8C9AB6C6mrGVWg/Lf/RTjXqq7Cjw7sipciIc1pKng4FWjFXOQAUA9SbdVpk/8zXzeFZ4wUCWDHHParKoqAAGvi99f7br0wYvtcaoeFJ1jmXkQWGqqRtnmpthwIaQBZ3f3gf1/kHO0ywvy3PqH50ToUF7fasg4VG3dQtvp3ewJv2aOeE8fsSCvbtJ5hor25b6xbwdUM9AysYLNkRDXDzqsBzqb8XOVjZvaOrlsK6Qjd+O+VlY2ck2dre1tLIgZLO8CyF53rz4gn8fn2qqilkhnC/QX8uww2RL9dml8r8oqLn4XKUu9/F3Cha48KX0sYy+LRGUIlX94bcTWTfV3cxyplWxGTagAVnV1JTz2aqBbplKjmIUv50WGhS0B/eJY8OYrpuyNhVDHee7DwelfxtvRQ9br4IyXXNM4XOZnD1P5tgnYawZguVWvTphn08D60jSpAGXzR1fpwiQ6qz9YDZGV/ZwDygap70HBkNMaKJ+h6bZsjUsHau1jWj+3Mq8KvTgju+Eb8cROo5eGQK0pG/8hJWJoa7BxSrb5ine53EJVauHGeoGbFown2ckPbd6ELWwvduaMJITmBTwcS7vR/TypGUtQ2ydGLE3JFQBs4LlPC1I/2MjedIn352YP3reJ3blXNXvC70azNXwEBOpdTjcXoYQyGKSPnXPMls+fMAuXll7WKSOFUZxM46bgyaa3fZAc0eFGf4ylt/3ItrKYEc4+TJhfXJWgZWGzHocWF1qGVtyoZhim+EHBjVhAySd2Y+Vzw1tRcptUcEGsa7dfCE27qn4Gmi8j7nm4bcmWgd4VxXGgXHJWFLJo1+vhGhGgD2OQtxtuseTF7xqEeLWpcXulkLWizzDhuN0CuQIzo+zskFknAmMzqj4Y17STrPWIJT1pnR4IR0fPCDbpymibAcQpTpuysPQrTMMShMkRWuu7QF1iBEdFkY3pUWHqSRA8x0gEXkf2jYzydQf4D8GTBsyAtzBO5xcBpmEIP9bvunCSnHDAkYAw== - page_age: 7 hours ago - title: 'Virgo Horoscope Today, 23 May 2025: This is a promising day for financial expansion | Horoscope Today - - The Indian Express' + url: https://en.wikipedia.org/wiki/Portal:Current_events/May_2025 + - encrypted_content: EtsnCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDKlvRKONWAUxyGn85xoMfeV+KuQr0lm9kmZSIjCqpqeZoxBvTankmAHSd51eQbmxHgBmDSSbu1eGpcY3u4Gf8joO1Y6tH1cw7MYyh7cq3iZM8rhAJuFyfAIpcDxvJ5ROlkmPNvMDR8MBKZKtSQ9p3R2lI/QOWE9Fk9kfDgxdHFVeCUtPiCmmF7wPi3GMXArw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QhY88NJyZLhekO1sy668dsz3XXRTf+aKWZHNtgDlHKbNT93R8bD9+vTfd6vxgD + page_age: null + title: Portal:Current events - Wikipedia type: web_search_result - url: https://indianexpress.com/article/horoscope/virgo-horoscope-today-23-may-2025-daily-astrology-prediction-for-virgo-career-finance-money-love-10020992/ - - encrypted_content: EqgNCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDN087PMpPpqSqfrydhoMctbw17CYfOiB92ZtIjDp7VFD2NaOgc8oXw7vWl4CMkOC+piqA+zoHim9qI2vSatujJ6SdWI0UmsKIv5YY0Mqqwza5/V3l1DttOhZc/CqXxJStITjGBGc90j0UKVD1iNvbgg/E+nxDGb+3dHruWJchKVggPE01dJtF9q/4KPRI3xLFFDqHfFFyMTZSnAFWMA0fuPR9uKM/dRKgzCqMcC/HQgoO9CXjbuhhMBK+bg/yYG02cc0A8IfF7gr4ePiDSUeD0F9GcXupvgkHqjznskcoC4873hvoeIHBryqFARheRvONPVN4lJ3QqGqJFjSsEDaq9BaYQVaF367DseyvhtMCiXEsZuq479/JuLNH+xEGoOVjyMj6XYotuUTvmEV6WBnG8v8HX3W0mqkC4e2KxNsMm1vBTGUaVYDs2OvgxDDXBBG1Vve0dY+wXHuLDuVgUA6yWm1wj6pqqhSHWvOifr88rl+x462vUEFDSxzRrqE/t4BbCICoS+yQ68u7FsaROM2Q37S2uCWQmUr1TT1Y/LC/H8BCiEzJinRlOdf7ZJzXJ7sSB80hpHa5gfPJa/7HnovrwnT0PnFv9G4uUIUcjuiPWhepSrzbgJAE6DfJA6Sr+1KSoltszPsfMd8opYLpJwDIPgz6t8gcOtKbycvKV2HKUC0THk37cNU3oVkpgK8AzNK2fQ2aYT7as2Ds51F/piB9CkpDxYn+usG7WUcPce0vwUvC9zbcxk3epYWIv0ylQaToF+9A++BS2JN/TUffBW7lE5eKd6GInI6qKuHI7xT51+SQeXtymfliwTqpwZ8dM00em9Xw8MwGRD0V5SrqM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6RhTC2nQehIXEHHWOpY7fT2GPqMvrWzJShxejeY8js2eS9DokNiJEbosWlPSg6a+03HiNIRZ8fDcMoweKfLzfO6sr8wXzK+CSFEdgh0gZIGECBshzEqdYTZHYniSJsw1cps1oSOdkrxQ3J+5xwmB5/iuosMqkQ4XFb/faSJTIrvgXE+lblEixJYEYq9dNIXeN1g3N5fqLl8vH8KtnBznRBRI4oK2b3HO1cvXwxCdW+nmN74AtTkzLql0HRv0XJ03IJUUekJZsouJDGDgHj84gKd20PRPcVhAIef3oGAM= - page_age: 7 hours ago - title: 'Daily Horoscope Today - 23rd May 2025, Astrology Predictions: Spiritual growth, silent strength, and mental - clarity guide your day - The Economic Times' + url: https://en.wikipedia.org/wiki/Portal:Current_events + - encrypted_content: EsoJCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDAYjLeq1Kci5o2pi8BoMqJacE/46sh+pR01VIjDPMDUx0d3wj2zbUnowpxFwHvCCnCwLoPMxQsQm/dnvm0Fzfga5o6zXqDwWpXvUzhEqzQg/X9w2opL/m5o7bUw/TubgkYaR6l4t2n0oQlGgetbSj1gOEor/WWJ8bWXL3BZnS2xkIzwGrbLdlPDn/NoXICDQZ+P3IlA6B8CVwiijOnNq+x5nTpX0m794VFJIfO5SdupAiWqhWmtqt8XhcWs8W2gnhDDvNsBG6oH2ZsRenxt3n7a7eWo7yRk/KSHdBM9c+L5r3wu3Ul81DW9CuE6KqUdFjjePJfWKL8OvzfkvJjIqcRaqc/3RIRZbSPbimBiRMXtCBZeCYE1yeBs3xLQ7TJXgRM/9ScKromcFWckYpGXBYSGL8SiXXoBUD7pLsuP5FnRnZUkQLCHTLoId0/w4jVbuXmDh3oipIlGUQCSbp3FkogFB/CZFpKz4tY5E9WQ4pBkApGYgAeGgOOStiUW3pE9oCy5TRpCfilrg66RtJozGI+LWM/XYuuOwSK+f+/c6AaUJ7av+LCUSPFI6G1XErfHK/KeBSJp7ZVoRXn/f7yJXlZvybKQXdN6UtxqxRJbil9RnmmXsBc6cesWW/cHbz01V8tkaqcYdrtJdVM/LesICK77C/JYiA6PQsneeg5xdZDCUp7yUO9P/CHMBqhPB8geS9y4dG7UIdJrFbv43cGOiqoSBsBGCLCc7crptYYGydT6YBgKb+ktUJm14MfbF8lzKt6SVYpn8KWL2dyhsDbfi88h51fvZqDV6loTDpyHbMHeJoA4pIxLhkBIriQOLNnEIEwqTGy2XFy326bahzINKJVTY1mMq2v3O0Snl0DNcAZ1X/iHt393xPgdcSy6c2+sDRexvpU4grX1GGFD4E8kg1QP0fErasq17XzRVpnU7Kedk/ntU/X6zeI3aTEeyRNG7IPH67w6GyIF8XmgCh25H6bCBGN87N8hnPSVAy8/qIMcfZYaF1c8W/QB9n7HBWhQgdyZv3relj0Ur0xdRi2osqo+k2c0a9mmIVupbzpLAxfY7LiwU8Edsr+1WY62x1omk+b4XNiGnhHnrF4B2o+f89icgAVSqRo2ydqIUDnZUYewu8jjUg/j+WUI8yKqZHCgCRdkm4fDSOcK8faTeaITl1iI6XFbUicEWZzG87tFykNSv5fz+ueDbMj936cm97rPUhp/qMnS2uloAxmiWLcS2/oV605i97ccR9IlwB0tt259e9iCvltjxzcC6P95vbhLS94+xVNOG2fmQtzE8oyaREZBkwSjVHuJ3lDAxvHDRYY8F+lkuLE4AvLiye3CDAMXNyCrG+/xiQIBNUGs+1aV9edHMmwpCVs99Q+nHO1RBVPljY607Q6u06Wt4VHnY+45+IxzpHHWXxg3Jn8Lh1AuzFKEaRWaI7JDSCgJmYxjIwkUO7988PWjOmFLquOd6mQsQ6iVG/89zSwr019RlAQRDIbMimefHIYhLm4S/Y8TzPhLFXJ6FaxrPFAkkkp2LnLQUoNKlo2h64JaAerGAku2FEwn/vo3hsCXwILg6R4QYAw== + page_age: null + title: Current Affairs Today – Current Affairs – 2025-26 - GKToday type: web_search_result - url: https://economictimes.indiatimes.com/astrology/daily-horoscope-today-19th-may-2025-astrology-predictions-spiritual-growth-silent-strength-and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Horoscope Today - 23rd May 2025: Tarot Card Reading & Daily Predictions for All Zodiac Signs - The - Economic Times' + url: https://www.gktoday.in/current-affairs/ + - encrypted_content: Eo4ZCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDPmBifgbGKjJUWA4LxoMysyEr2mcRqSQzmmjIjBCfvhhJTAOxHLRGv3ljzK5jUBicnJMjypAm7ZduBpPkX+mDQvdcj2CACyWCydaQ0gqkRjhs2EgE0MIO0YyXAzzkWltz0ki4S12d0f0bRdmI2W31SmMvd7jGXZyIQx60LTKRqqQa1GVeqfrM2855muFRsk6uji8F9tni8hjSdU4Pcd5WlC6f2dwWDJcfvt/HD2GCI1uPZkx4ha2BLYDV37uXfumDLk/tFPswHb3cbUgLc28rTb18pTi+HTE5f5r06/x2DPVVXYLylYuRPtr2WJ6l/2r/I59B+iwdTzI8sYRhSIRf47kt32Reo3w5esYpPsmGXFL0SOW57j5jtwBZWkJqkEc5wD10ObzxCDXrNfZ89KVkli/++RedncFZnqKcWkrLwctyW4eIBj0qiI4ZA81Wx6cnc09shOAflAw1EitPiOQ4HKoNkcFn9GNUfF1rBzblgVvjgO5t/zZpv53CnuZ9Aoo2nwF4pNrflPpmnd22gQdLpOmLTYrxygC/2vboGrNrS1HkxfvFKPib1DopDY/y9CECre1zHtdf6PNQxgvc+EGIncCnb8gTHFZxN1Mhyc1dmTDhitv/vawaqI8sZHx54tnP5l+KvWuXbegWPJETo6hMsbtMYHAmJIi5VFmhn6rq1zRuKYBFILEpHs3RPoybQzJtJoRYVRYA1E/vsBrdTfXD6jNDg6fz+88kc/menQlSALfAIhZhwxGz5eyhFqBVeYNfqKrJR+CHiUTAKN7t0R/nlsYo89V4SFMpvZakV9ywY6lqnu8mehn4c28OtFQ51wqtldG97kyQFNazwoXrayCNWo3xshZ5hqv1mSIAU2xGUD1UENXddR9bba6BmrU3zgroGPNbYkFUFVeyHAcHmw3oxy+18LW32bRY3Rgv6oZAXnZ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T9UC8N0pzRBesxLeXZTpfwLpUmI6rWtkwDIUh4HLo7UEZtX5s1kDVZqMcgRp5Ci4BYLVBgD + page_age: 3 weeks ago + title: 'May 6, 2025: Top news events to look out for today - People Daily' type: web_search_result - url: https://economictimes.indiatimes.com/astrology/tarot-horoscope-today-23rd-may-2025-tarot-card-reading-daily-predictions-for-all-zodiac-signs/articleshow/121348972.cms?from=mdr - - encrypted_content: EocHCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDAMNJCKKM9JFtCOyCBoMS6iYVNGva0wsk2M1IjBcz53eGg2p4ed8/Fo4TJpHCZijWYTp+/0zD5emMRzUxudo/K+oq5lrQncGcHeByicqigbu4Xzs8lcxcMJ4zxJDunx89H0AFJ/MfItmOnHeqFFY1xNVMlye3BqukSuKfuj+7p+mpkbBVqDmIS4qJdl2q7h10JR7yesca145kRbCSZvVYSPsIZZwy8CFVwxQExaXdhkUkvD5XB8QaL6uRHspQUXSKdH6wWjNJO3Y/xD0jfF7KZXaOHE2RlJzGCyf8+WLspuHYPOtdxAryHTdQpe9hzfw42yAZ8ZWGzaYZeHD56Bc2R2BC5aqJKj9z2KzAGxe+0xaFPsvxgyYJmWBUrad44rJ/CsYwGQox9UXEXyDzHVWskutc0PZvddAiaZ38rpy2c9qXEu9m+FhSHP1y2LtUqVT6lHznKWYkSOFsQNUPogr9ahFdDOTL2bqnueHztMHhXe+TNITRr4xkb3mW434fvKo/1CteKn8YyiI95tj+W8MX0deKWyRBJumtc2UoHxBEpmw+BiN0kjBcTgwuAiaFYhIGQpqyK0ZPiNQeKEB/1velKYFKLvHtzioUAljcoKMF20clzSqomqTnBXKzExlW4jJy07R8akhdfd2CGNDZXbmgzvQKhLFIJV3Py7ommqO6F4fIStYJq7E5gfr1QRCzgQEYEq0lTAEf7TkS/fta0fbTmgUAn3xfT4GU9GPbH8Lff0nYuRIa/BBestwetOg4obTbAOB/VzyQliuV+FTFECchDpAtZRLHyS48V7JMkAGWyT8QCX1hPFg/qzylmZupJq4TrzoSx50KU+xFsQnnZpXcbDbDzvB5bn582A6Oo7MkBpu0WJh7IRRac8wQzutyMoRPYs/yusGSl2WAvsa1FNN+Y1cHuk4OEcgOaR+RGxeb390i48sh5tg25Jz52UU81TbJF9Vr3veWhwsq4LKboKnOxmF4NcoNorLNaTSMaqyQ+2L2QOHJrrt9Ozs45RAxY19x9vpO90l5ns2QZH66RxHcB+8GgDcKgnKBZjvuhR8l+2LuSbL9Cl9iz12vE1gGVgq8fg+c/cQO0MUhHW0F0lJCgIs+w8TVUh/SirDwY79TifD6Fv3T5qCjMWkGAM= - page_age: 14 hours ago - title: Top Stocks for Today - 23rd May 2025 | India Infoline + url: https://peopledaily.digital/news/may-6-2025-top-news-events-to-look-out-for-today + - encrypted_content: EvcfCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDLM35Bum8iGp3KQslRoM14ZW+oAvbXsy7nUsIjCLxAF5JOrnB/xWs20058EEqp98kwMCubS8ohl/TFUHHJN7eeUDJz7IuZOFycr4+2Eq+h4AUNPhuzguwpPktjSAdmE8fd4sXi46MXN+AqpE3NlTX7NqhmtEhPnwn3HdMGnBiQMG///1824z5wmFCjV2v/aqK/HIy1wvC7M0C/oWcQiBhVR1zNhPbGz153Vt5tw/XgOusVQZz+8tKl3yXac7lWmksW03m2JK39XQFFcs5CZJIaYTqqReD28AyyAaNFW29WF9GrW13HCaOn8YeSHP+zVLqBWR2+WmEnIDStBBEpnl5QVyjhFMdiUG/0TzPTfhXOvHJo5WL/pef7qEKG1ECVjkF4BbYGXh/4E+3CFu2xaFO7Kfcds3pqb2hPgU5gaBnXFAv8QRXxPqfAWOX54vAW0H1ahBM9sUQQcfK8XTVyoVvEF/ImqoC8m4I7ciw8cGW9g7UF4ML8w8NGefqMDeWBz57Q3fPDkAZdr3OLdaUQkY2Vub+LFeI9hAqbLBixWmG6l9iTytGF/XuBuqcM81HO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ktD1X2X4QPeieLGvCLGFgVlzVxmuryoZa+m8E9JFnt3DvyqOnZ/GjutTdI1/JC/JJ2q4IvNo/oFQyqZitB/NX3IGXIm7Qe+AGVXYukItPSh9wNp1dmlCHQwMdN6fu9HOh5NswBrXqAR/TbK+7JjIY6HeWlykdOUeE//3e0SACTbjq7EbH0mbnWLTGPLCAhb49c5RJbXNJrPKWxLj5y9eDAxTrpqUQ3IfjjGiU9JBUTAUjwlKrE2/skjZtJbVegv1QhBFuwaUloEXHh89oOBh+4B5KbxqlS/YXtrHfKbFewdGiRSV4KUYc1FV4emyUZmn27joV1qc93UgWkqyAgXg9X75I7GtygxzN0SYqMp1R1LSOofRiqHMLOMs68He0BOPCRHw21/veVKiC1gN5R5g64DvLH4uhL+BBf15TivY/XnJKPJKtmG8pEWd6uXX/fYSo670WD2A7tWV1ZhszWai3tgH/1wR7kpOzik6wkhgD + page_age: 7 hours ago + title: 26 May 2025 UPSC Current Affairs - Daily News Headlines type: web_search_result - url: https://www.indiainfoline.com/news/markets/top-stocks-for-today-23rd-may-2025 - tool_use_id: srvtoolu_01ALRFK59SkK8D9e1Xj2exhq + url: https://testbook.com/ias-preparation/upsc-current-affairs-for-26-may-2025 + tool_use_id: srvtoolu_01MqVvTi9LWTrMRuZ2KttD3M type: web_search_tool_result - - text: "\n\nBased on the search results, today is " + - text: "\n\nBased on the search results, today is Monday, May 26, 2025. This is confirmed by several sources:\n\n1. " type: text - citations: - - cited_text: 'Sagittarius Horoscope Today, 23 May 2025: - Today, domestic concern...' - encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDCbDDdUiTyDBbTGQOxoMQGhGUwXGrNo/GROYIjC8zO+WNZgsdFFZ6CBsCJztRqmFgQ7D4a94Eh84prfkFPXTjHB2K5x6iPykb604r0cqE86OhsBbKKpHZLCblw8RmEPihCYYBA== - title: 'Sagittarius Horoscope Today, 23 May 2025: Today favours real estate exploration and property-related investment - | Horoscope Today - The Indian Express' + - cited_text: "Katja Ridderbusch hide caption toggle caption Katja Ridderbusch · May 26, 2025 \x95 Efforts to improve + officers' mental health have grown over the p..." + encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDDbwqv5slJiinAczsRoMhSEnYjGPJgqqehvhIjD+BvlqTC7HRjtE/aw2RZWQrImtkFRHsMc+fLuePmKCTV6CchthAUcDrpTbM2sVfeoqE2azhBPbtwuu/6GGPopddo8c5owYBA== + title: 'News: U.S. and World News Headlines : NPR' type: web_search_result_location - url: https://indianexpress.com/article/horoscope/sagittarius-horoscope-today-23-may-2025-daily-astrology-prediction-for-sagittarius-career-finance-money-love-10020998/ - - cited_text: 'Tarot Horoscope Today: As the first day of Gemini season 2025, find - the tarot readings based on zodiac signs for may see significant price movement today: - Tata Steel, Hindustan Copper, Grasim Indu...' - encrypted_index: EpIBCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDPzwkG7Dwu30Hg823hoMR/Jqy9OxGs1/psXBIjCYx4k0xNP4gBbE8XinduUuG9+UUyuqx4QLn0fNLN6V1PgqbEfaBhisa/NPDguHKqIqFgM8TrUPp2yRMNuJm+IrmxaEv3Z+n8sYBA== - title: Top Stocks for Today - 23rd May 2025 | India Infoline + - cited_text: 'May 2025 is the fifth month of the current common year. The month, which began on a Thursday, will + end on a Saturday after 31 days. ' + encrypted_index: EpMBCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDKg1IA50Gwr+acWT5BoMGYg/QqdGIWZ1xBQKIjAkgAmLPkrAfHcJ5l/9cBkuIDZFR5HqWIMts7szVwtYu+KUtw636GWrp1YgAWw+PHkqF0xqh9pIZ2wPGUKGN4beDYqhKyS3yKNSGAQ= + title: Portal:Current events/May 2025 - Wikipedia type: web_search_result_location - url: https://www.indiainfoline.com/news/markets/top-stocks-for-today-23rd-may-2025 - text: there are expected to be significant stock movements, and the BSE is planning to rejig several indices, including - the 30-stock benchmark Sensex. This restructuring will take effect from June 23, 2025 + url: https://en.wikipedia.org/wiki/Portal:Current_events/May_2025 + text: May 2025 is the fifth month of the current common year. The month began on a Thursday and will end on a Saturday + after 31 days type: text - - text: ".\n\n2. In sports, " + - text: "\n\n3. " type: text - citations: - - cited_text: 'IPL 2025, GT vs LSG highlights: Lucknow Super Giants beat Gujarat Titans by 33 runs5 hours ago' - encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDASI2eDqhP9h3zqSNhoM0nVV8tu71M95gZI2IjDg+u22h1i+CM2eNScuVF8UNOdtqm/Pvrkl38bxu1WVQl1rhsUfxVXnNJzJ3oI8HHgqE9kCGCtcHMyfZRyF6dyCKN8zL68YBA== - title: 'Sagittarius Horoscope Today, 23 May 2025: Today favours real estate exploration and property-related investment - | Horoscope Today - The Indian Express' + - cited_text: On May 26, 2025, India and the world witnessed significant developments across various sectors. In recent + developments shaping global and national aff... + encrypted_index: EpIBCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDFkt41LpatakOxyiFhoMv3NkIlXjrN17gwJmIjBYF1Ds1OSA6s5ysr6ObQrej6qB8TY2C7CLY3A9izWkBKF92leDuAKzxrbr0q2HuTYqFvMJ033dlXOze2WorB4B4VxlNRvBw7EYBA== + title: 26 May 2025 UPSC Current Affairs - Daily News Headlines type: web_search_result_location - url: https://indianexpress.com/article/horoscope/sagittarius-horoscope-today-23-may-2025-daily-astrology-prediction-for-sagittarius-career-finance-money-love-10020998/ - text: there was an IPL 2025 match where Lucknow Super Giants defeated Gujarat Titans by 33 runs + url: https://testbook.com/ias-preparation/upsc-current-affairs-for-26-may-2025 + text: On May 26, 2025, there are significant developments happening, including India's launch of the Bharat Forecasting + System to boost weather prediction and disaster preparedness type: text - - text: ".\n\n3. Astrologically, " - type: text - - citations: - - cited_text: 'Horoscope Today – 23rd May 2025: The Moon will continue - its transit from the Pisces sign to...' - encrypted_index: Eo8BCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDDYbMWXQmhoGwKRD2xoMhRr0U2J7j1hQBqtvIjDhKoHAEs149pR//GkmoFgYw6pJlgSpb7FGOQEt9udtTdYJefbmzQ3vP+jVHKmw5dQqEx6ddQitTWUlmf48PF1mx9+uyE4YBA== - title: 'Daily Horoscope Today - 23rd May 2025, Astrology Predictions: Spiritual growth, silent strength, and mental - clarity guide your day - The Economic Times' - type: web_search_result_location - url: https://economictimes.indiatimes.com/astrology/daily-horoscope-today-19th-may-2025-astrology-predictions-spiritual-growth-silent-strength-and-mental-clarity-guide-your-day/articleshow/121348740.cms?from=mdr - - cited_text: 'Mercury will be transiting into the Taurus sign today. This will bring a steady tone - to your communication and thoughts. ' - encrypted_index: EpEBCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDMt/spapnaqCS+9pcBoMsdh9Y6/tpNkdCeG4IjAlWGsDiLQoRi9Pn0xVHj8IYjBxoYPBt7T9t+YBITynjqXWWzQuns3vjkGbhBkRjFMqFfPsz3VBsXKeFpa2gO3/cAfrlu1MLxgE - title: 'Daily Horoscope Today - 23rd May 2025, Astrology Predictions: Spiritual growth, silent strength, and mental - clarity guide your day - The Economic Times' - type: web_search_result_location - url: https://economictimes.indiatimes.com/astrology/daily-horoscope-today-19th-may-2025-astrology-predictions-spiritual-growth-silent-strength-and-mental-clarity-guide-your-day/articleshow/121348740.cms?from=mdr - text: the Moon is transiting through Pisces, and Mercury is moving into Taurus, which is expected to bring a steady - tone to communication and thoughts - type: text - - text: . - type: text - id: msg_01Va2uREGK2xDeCM9twM17NR + id: msg_01WWvGdHT1E2kYaV5ZLWMB2N model: claude-3-5-sonnet-20241022 role: assistant stop_reason: end_turn @@ -183,102 +155,12 @@ interactions: usage: cache_creation_input_tokens: 0 cache_read_input_tokens: 0 - input_tokens: 11844 - output_tokens: 327 + input_tokens: 16312 + output_tokens: 258 server_tool_use: web_search_requests: 1 service_tier: standard status: code: 200 message: OK -- request: - headers: - accept: - - application/json - accept-encoding: - - gzip, deflate - connection: - - keep-alive - content-length: - - '1671' - content-type: - - application/json - host: - - api.anthropic.com - method: POST - parsed_body: - max_tokens: 1024 - messages: - - content: - - text: What day is today? - type: text - role: user - - content: - - text: Let me search for information about today's date and any significant events. - type: text - - id: srvtoolu_01ALRFK59SkK8D9e1Xj2exhq - input: - query: current date today May 23 2025 events news - name: web_search - type: tool_use - - text: "\n\nBased on the search results, today is " - type: text - - text: Friday, May 23, 2025 - type: text - - text: ". Several significant events are happening today, including:\n\n1. In the financial markets, " - type: text - - text: there are expected to be significant stock movements, and the BSE is planning to rejig several indices, including - the 30-stock benchmark Sensex. This restructuring will take effect from June 23, 2025 - type: text - - text: ".\n\n2. In sports, " - type: text - - text: there was an IPL 2025 match where Lucknow Super Giants defeated Gujarat Titans by 33 runs - type: text - - text: ".\n\n3. Astrologically, " - type: text - - text: the Moon is transiting through Pisces, and Mercury is moving into Taurus, which is expected to bring a steady - tone to communication and thoughts - type: text - - text: . - type: text - role: assistant - - content: - - content: |- - Unknown tool name: 'web_search'. No tools available. - - Fix the errors and try again. - is_error: true - tool_use_id: srvtoolu_01ALRFK59SkK8D9e1Xj2exhq - type: tool_result - role: user - model: claude-3-5-sonnet-latest - stream: false - tool_choice: - type: auto - tools: - - allowed_domains: null - blocked_domains: null - name: web_search - type: web_search_20250305 - user_location: null - uri: https://api.anthropic.com/v1/messages - response: - headers: - connection: - - keep-alive - content-length: - - '279' - content-type: - - application/json - strict-transport-security: - - max-age=31536000; includeSubDomains; preload - parsed_body: - error: - message: 'messages.1: `tool_use` ids were found without `tool_result` blocks immediately after: srvtoolu_01ALRFK59SkK8D9e1Xj2exhq. - Each `tool_use` block must have a corresponding `tool_result` block in the next message.' - type: invalid_request_error - type: error - status: - code: 400 - message: Bad Request version: 1 diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index 9ec5f344d..1013242ab 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -21,6 +21,8 @@ ModelRequest, ModelResponse, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ToolCallPart, @@ -37,6 +39,7 @@ from anthropic import NOT_GIVEN, APIStatusError, AsyncAnthropic from anthropic.resources.beta import AsyncBeta from anthropic.types.beta import ( + BetaCodeExecutionResultBlock, BetaContentBlock, BetaInputJSONDelta, BetaMessage, @@ -51,6 +54,7 @@ BetaTextBlock, BetaToolUseBlock, BetaUsage, + BetaWebSearchResultBlock, ) from anthropic.types.beta.beta_raw_message_delta_event import Delta @@ -1038,22 +1042,357 @@ def test_usage(message_callback: Callable[[], BetaMessage | BetaRawMessageStream assert _map_usage(message_callback()) == usage -@pytest.mark.xfail() @pytest.mark.vcr() async def test_anthropic_web_search_tool(allow_model_requests: None, anthropic_api_key: str): m = AnthropicModel('claude-3-5-sonnet-latest', provider=AnthropicProvider(api_key=anthropic_api_key)) agent = Agent(m, builtin_tools=[WebSearchTool()]) result = await agent.run('What day is today?') - assert result.output == snapshot( - "I can't tell you what day it is today, as I don't have access to real-time information. However, you can easily check the current date on your device or calendar." + assert result.all_messages() == snapshot( + [ + ModelRequest(parts=[UserPromptPart(content='What day is today?', timestamp=IsDatetime())]), + ModelResponse( + parts=[ + TextPart(content="Let me search for current events to help establish today's date."), + ServerToolCallPart( + tool_name='web_search', + args={'query': 'current events news today May 26 2025'}, + tool_call_id='srvtoolu_01MqVvTi9LWTrMRuZ2KttD3M', + model_name='anthropic', + ), + ServerToolReturnPart( + tool_name='web_search_tool_result', + content=[ + BetaWebSearchResultBlock( + encrypted_content='EpMiCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2Nm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KfXDgshxm2p5QlLUoK+r5jk/zCY5o3qoDzc4+5lCc/qlG9k2ZefX1/1qbhPm4DRVQUn3c1NWKuZ/8UrR4vYiCfHtRhwyHQ5EmT2G2U6u8rVVitjpt5q8z9FZ8oPuD8ShFxa4RJRiH2r8vR6LrTU41+uJCUeRj2TR8li+zDkOuzKVCtN4WSzITUNrz+8Sr0Zgg85yjoCTyCpEsrnEzxq94B2BdZM6B9yAGcR06tYtbT/FWSHMrL5Jl/ooX87sdhXUJdUgn+ea2EuqkYImB3dHbV9yNqew+wDtDNnpwn/5nRlIbYjwCjm/x3QNT0tM5f21C6WLCFqFHN7Ji/oCvYXOdsaxiWWS4bGAM=', + title='News: U.S. and World News Headlines : NPR', + type='web_search_result', + url='https://www.npr.org/sections/news/', + ), + BetaWebSearchResultBlock( + encrypted_content='ErwHCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDK2W0Qu0wNgI6mf5EhoMNCqr1gVeM/Fj3PSYIjBrgyGKmTOrJLgDCXcOvRtrbigKDeccd5oypMBGnMVhm6h3Ade/9+vNOwI3ByflKmwqvwZqUUdfJ6+k9ZDrmb7VM6ktRqsZ4Z++yOdyubDNbsyM6RdwYuNi+bS5ZUON+rMd8+ZrQYlGYqq7NF43o5klxpac+Dsgx3OlKbu6Hq6eiKOQ3rdPGYlUYKdDouAx6RjypXjhYkqErPrjlFZhNv2lO6cohI0QU66p6b7G8UMVyweqYZ+2QYTFfbwU5VdIAOiQW8PBgNwPC5LRnidfbiT04VY+cEsNW04zOq9coXs4NgFRw2WDCZDBPGTEJex0xv7vD0/D0YpBhfiawNJ8FgBTI6q0gXQ2+YwqelVaZ+BDpu2JeRABLXiXQAMIiBBiayofacvfgJZ4omPY1JRiJwX5IpbLFqLcNz2fWr8veYedwrDZV/lOjyn755WTp2i89GD4Pv53htWrDOH8/YJBQ9u5KA2DFz7zAtRLyPqvPz3YaLMr3ATFvs8m0igrllgC5uaWPWfO/28RU7QNnxyBLGNonF3dtz3Uu2naeNvxjRhqCtUOON5odOahtPrRs5qkjv/UrL2YzlnfsRL4Qb/qsGJE6YWScvLhjBaum29Whk2p6RtYJqzzSqDbk0jxKe/hNatl3s2JF1bAW4L7p9FnsK1v/G7AYSaIYl4RDLGuL1bFOKGKVlUZtohNMws+gvTCYKdhQzfurimTsNIpBP4Ci6aJ+/yACa22AXGhZQqyiOS7yxI6zj3vZdQGFBle1TjDpzveY2Nz/kuuTCPbGsWt5kd9v7BkWvkNacqZ70KijyIk5dVt3H0q4eavyNLU0gF4hSCPDHW7eeWXTmNs1YniKiaHrwmOOqXjw2PCQrZv0i7UQRjDmRQqx9NtuqzMup9DRPbQuZM23b8JwzqA0Qjyxc5pTlWRL9aU+U7ZKOD1OdBszAU54c5N9jOca8S2Plt4TGJcAv2Wy73Bex74GPlkHcKWO8TJYhrV4ZF2nMjssncQEKCltJaZg6TJpazpLKoQ1XmYmgzebbVMRc8RTDXk335AYKkN62xRnfrDd5T5wBhGbPNQeF7PGigtAK/SpSpTna/vmGOBul/cONWOFFKNdY+FtCAGd4AOo3s/N8QUnKR66TEv9ocuVep1UZxV2fJcqIuJukutfT9eWPcou6VImLUzRQMYAw==', + page_age='4 days ago', + title='The Biggest News Stories Of 2025', + type='web_search_result', + url='https://92q.com/playlist/the-biggest-news-stories-of-2025/', + ), + BetaWebSearchResultBlock( + encrypted_content='EuYCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDCmLeaYgzUtJ4Mi+fBoMpktwxWvlSdpeNRRlIjDckkEHzeMKWP+vkSJ+7ci91OlLvn1nTU4wG+0am9miZ+68Q8XjsyCBGekIPeSsgpkq6QFTAvqrNhd55GMbj8VQtB/7oV66lwp8PzaymgQlLzCnxBdZ6IRYyEd6XwFOPrWCwyjtlKbwRiM2NIaNsGcrraBVrDfsjCz20qsDPGNsQf587z/TD3zWUSelhjhf+T5nDCEXUkYM2+4MaGP5Ty57Khh3WQr5q6Q46m85jBBF+akWf1uKZEgjgFug1ufj/8TXEEAaKCVY9YeXTXfYH8DocKveCXH4Bp9TNbgx55UrL8NdXiwdtpI/zqY+8hM/SiaVeXXI/Rbmjg3HzFTLfrH4wSrl5awdKWuGwQy8nqRISZlwNVnwFY0e8uc08xgD', + title='ABC News – Breaking News, Latest News and Videos', + type='web_search_result', + url='https://abcnews.go.com/', + ), + BetaWebSearchResultBlock( + encrypted_content='EtEWCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDHm43fQ50ug337S3LRoMMpBq69Qh8QJrLUwbIjCQZpwOKhXhp64xZ6VuO9jUsfumcGFVwLXHbCFUYK9256rmPdiT1B5qecHMx35qI7cq1BWGwSfTqoKrKdwCLT5GuFP1tDnXee0s1GL8tn4WwqVUe+FgYiHiknLq4+RvdZOXOZv2yrffRh+6FAMtYPdhUfkBVONku44BxAkQabLafuw0pofhEMh1wj5i3HhmjMNIqr4fgMCqHpre7nt052sFkxzlgvrwtKPdAL+bC/QmL9aXPzmbtE2V+LVxLQ5XpcR7OyhTL82S3ds+uNLDhbtUYZtVcLHgdPIk422XzZeRxZ4Sdpe0uIss38kVVPI1G3luS5oJkIUnIaTlsFxgrNKYPZYX+eOwVj/9NdTUIkXtCik32wTOexcIgBmw7JJcUL9V5i1SqhHISSnOG6t4ttUAfBivPS1IWCiUPNwWYWOjgwX8dIVIyW7JpC9Vev/gMJ5WdroYLyKNLK80uXfwxcCtQknjSBaKHm/0wnVERviHapls3prWbiPKG95pcHB4QSK+toTEVh+rzhKRYIBAAJp1hQrVtSceyjPKd78Dkv8nXVzcQxWlD3Go0fis8p2n4g2eZJKMLBpvu/CyOxhGumxAOdM3RrirdDKm8tLIIqDil+caVQyvGNvvgtJW10fRi2S7atagwzI6/oVH9lNCn9P+53ERe6zUAYJ9V9HavpoijPm1mm0KRyC5ktHNRWuAONdQC1z4BbqyMInQTGMuUkB55uy97Fyuzx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6ByWT7sKu0BC6SODSmQnLLm+/I3ilPdm5jCp8mvC/LKI7fYPEXH0ylvWccN22OgF6g354t6KS88F9AXatU+Xf7WH6+TiVFAhyhf0b7hZMGxCahnj+ZPjfqNt4OpeXO9+vz2isVZ4pEf6b/8l69oPq5Vwwb21DoRpErZjbVPPXgQZgjKPuXNEiua/kKep4eHMau8pZxZlFa+xunNSRox7q1AJE4AZ0lF3b/gJBQ46TTS1eyTEe76w1Vk79cTcFoWhMDT20a9JQ+UpJVGKSGlHBd3923sjsZwb+cxSIDdOrcpXrL2fRvwsU5g0Tc0hkQOhAagBgi+IudxBNFa4lGhj9PrqjTAPTWj5HCkcSEiehs6goVMvrovqWts9bfrfS0HxheEAa75MM6/tn6JBkR1Fc5ENK/XVq/ccWEtQZ9IM6eGZCg37nT/nB7FmGv/iiYS6N09TK8oPST+zWpRDxIETarKqPCBxnlKZkr8D0GJIX9HhzdFkOL6BWTvwTOIz9ilC5SFRAhX8DfzLmPHn7gV+xf4U5h7ZCnvXJfQV8vx0IaMXPcLE4wJkFV+e33SGOLKbWwgrgHv4cyWKY8MOfTHEQo+wiwykQqHPageS+kXR01tTytP+103eLkmLjnPldoO+E1OJ3TReO7HQwCY1jxghsmWyDctKYjgm34Pp3v721RQoVp7buV98bWm1LhjPecsQlvAyzckizfVvIz31y5+QLgt35GiMhnijWAgxED0avEybJ1gQZzj4utmhsH7TCT0wO+MJKaCLS7FFku4VCestJtf2T1nY2Sk05WuRSi4twDIYEp4dgPHpVjEMt9rJfwog1URFtuPQZXBATrmRhUkmEEwTziB+4s5+5QS7dNwoDIYAw==', + title='Breaking News, Latest News and Videos | CNN', + type='web_search_result', + url='https://www.cnn.com/', + ), + BetaWebSearchResultBlock( + encrypted_content='ErQCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDGPat3RtBffd6jd9uxoMkx9uAfM4hgJRbrR4IjCBVNWqux+TsqDP0poLm+ss84SLrVR4rAcjrQSDPna9ZfR0OFhPjv2ko1ZVuBzeRE4qtwGOPV6my0G/y4nPEH8gNVc3y/8uZzh7O8CBrduzchEMd5RRXLlsC+bU/SjZ+5LBYGzAVwRCfVXIdaJ0/d8RYdJWHo3bvKc5Lu/WFPV6Po9gVHLOU5WVDsyzwmrvqzCYC0UhkUMa0yf5j7WTFaT+kgHZcFcbvYPG53USqNh0seahaaCC5fJRjRBTAvuyj4md+ppTjIXGZEp3rTMG3MTkv8t60MgPzn4ObLGEmBQIQrfES9G2BT1k7lUYAw==', + title='Philippines Top Stories: Politics, Environment, Education, Trending | Inquirer.net', + type='web_search_result', + url='https://newsinfo.inquirer.net', + ), + BetaWebSearchResultBlock( + encrypted_content='Er8qCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDHxmRLcrViwuD4QB+xoM7WGSYO1wzb6z0HchIjATj+RTz1UTP1XUgzt/sKVxIcnJjndgdx3zaOKZ/CMx4ib/mUBO2GKxhojugf+2p5kqwik956URo2GiacJOXWHP0cyE0HmZMDSHK1Nqs0Y8aXMl1iWcTu2Q1ZmBq4+AQ8IQc423bw58O5dc3bS1sdbQJyrd/YL/9SG6Df73ou97ktQ1Ij/MdEHQuDMHhvVDoESB4+i7NDUU4aLqgBFiOGCEozcSTWUdK5ePwtOMSOEHUCOJ7lcxTzDpcTg0tKH1Qo+HANXFl63xNQGbJyxUUBGyGjiAe2vWb6kvW6owWSL5HHYnJ0pzpxska1ovW0yt06Nw9ZuotsX0Xq84sa/Ceg/fFCkMsLoREsCknC9di0zda3CgMrdX481wowpRS0dgj586+6SX/b9C9k7y9htoMLdsG38chq/yHAKeUrtjxHRUI7rLsS63jmVrFxj6Sbggo2fL1bEFliDjL4SFVz8Fu0XaFBlq+S9cU76uj/vVh76btLnNOKjBZyZvZ5LG8XqHBE6AN0nCx19o8zOpvXYej+hMftkU1fHljvT6HJSHw0YUjyflvx06S4JXH12HG5h2r/86E4qHw3Q76sY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nyLlYj7RsODQZSSet0V4zOr8SOgQ56Q6kwyW9rnjVZItW0lm1h2CqQvlnvF/Acmrzbr/UTEIrEqTGQpaqdxdLOk5ybihhfTgWaTPJ9oRKomxGAM=', + title='Portal:Current events/May 2025 - Wikipedia', + type='web_search_result', + url='https://en.wikipedia.org/wiki/Portal:Current_events/May_2025', + ), + BetaWebSearchResultBlock( + encrypted_content='EtsnCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDKlvRKONWAUxyGn85xoMfeV+KuQr0lm9kmZSIjCqpqeZoxBvTankmAHSd51eQbmxHgBmDSSbu1eGpcY3u4Gf8joO1Y6tH1cw7MYyh7cq3iZM8rhAJuFyfAIpcDxvJ5ROlkmPNvMDR8MBKZKtSQ9p3R2lI/QOWE9Fk9kfDgxdHFVeCUtPiCmmF7wPi3GMXArw4FjQXDNHUZ8ECNxkKCmSf0vlLQMfwNtqAqJZ6vLqjCuDst0d7pBfaDW9YcrY6du/9UAWGlCP8BudfzzUI5ds7+lMTkOTR9nrlQyby73AQmuY1IaPEiNhuj2vohNT+t21qan4WGxrXFJ3iFoq1nUPJAjfmcLaJVNbDzksiRlo9HCgql49Nqau1BEyN9OQfF0W9KMa5rLtbyeQUn4tpsAAdA5UoePHbl9jHSWlu3GddU30F8YclCGIDVAnyhbLAGbrjHuJUjdx2t6XeDldk6ZAIH51s9+TGl+23lYsu2kinQpczecJFzcc9sCtVszDs3Z6iqecJo0Qp3hAJvVwX3U2W2p/m71rIrYO67RpSOvplwZxXQNKfrDWT3ZdcfWTxHvZf5bFSzeI+desA/K+bZ6g8gsBeJZoAHm2QDp7vdoAt6x/K9Ys1lIMxoOCQoUHWFFSmuMKUYUo/D8SvqBQmrAiqbZV9qQ81cX8li1X+pmbRrFA8oesTmv15yMHid5ZH6KV60WUZ/lVMgpDJ+LphK0qcLJNdPzoDPvwelEhC9VTH1uo3DhmBpkvQlsLBOB0mXFHGx3tmn7nXCZIAf67im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yLHnZdlPPlWAGkS7bxpM9mUUv/SFGHNiqBryuUoxS8eCAZvGuIfa1qVbXIE9bLEoOxHH/h1E/QGgQsZvPCHMoF9ywZiRAnjFn21J2JEACDmAWEL5o2oHO+rI/rfeMFNJ+U7k3B+12xn999WHr0d1FeQIHdqJU0tQUrKDT8w3zNYdRyaM3VDQAn9uRRzSjTdvjkCSC75T5ojfK8dabiYrp4rCq4pKTg+PdGKkJt02L8E1mhSKFL5ZFl1Raq+Jde6TX1qGbKZTiQubr2h51Ha019OTO5aHZOFRl6awl+NauRNJutrrTTLs3VfYSkf/jaAP9wFpcfypV6ZO6NWzaRLGWH6EkbFaDvV8+9g+ul0t4HVVjKvYBGhCsxIOcpO8C5MOmioId89J8BVAD3okW1AFi/PJQUhZdG1+0CAy+xybaK5YGHsDyGzmFaCpRQ7e/vW74SvFs7LH/ReSOqBNTwilF0jKR53QhY88NJyZLhekO1sy668dsz3XXRTf+aKWZHNtgDlHKbNT93R8bD9+vTfd6vxgD', + title='Portal:Current events - Wikipedia', + type='web_search_result', + url='https://en.wikipedia.org/wiki/Portal:Current_events', + ), + BetaWebSearchResultBlock( + encrypted_content='EsoJCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDAYjLeq1Kci5o2pi8BoMqJacE/46sh+pR01VIjDPMDUx0d3wj2zbUnowpxFwHvCCnCwLoPMxQsQm/dnvm0Fzfga5o6zXqDwWpXvUzhEqzQg/X9w2opL/m5o7bUw/TubgkYaR6l4t2n0oQlGgetbSj1gOEor/WWJ8bWXL3BZnS2xkIzwGrbLdlPDn/NoXICDQZ+P3IlA6B8CVwiijOnNq+x5nTpX0m794VFJIfO5SdupAiWqhWmtqt8XhcWs8W2gnhDDvNsBG6oH2ZsRenxt3n7a7eWo7yRk/KSHdBM9c+L5r3wu3Ul81DW9CuE6KqUdFjjePJfWKL8OvzfkvJjIqcRaqc/3RIRZbSPbimBiRMXtCBZeCYE1yeBs3xLQ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VG/89zSwr019RlAQRDIbMimefHIYhLm4S/Y8TzPhLFXJ6FaxrPFAkkkp2LnLQUoNKlo2h64JaAerGAku2FEwn/vo3hsCXwILg6R4QYAw==', + title='Current Affairs Today – Current Affairs – 2025-26 - GKToday', + type='web_search_result', + url='https://www.gktoday.in/current-affairs/', + ), + BetaWebSearchResultBlock( + encrypted_content='Eo4ZCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDPmBifgbGKjJUWA4LxoMysyEr2mcRqSQzmmjIjBCfvhhJTAOxHLRGv3ljzK5jUBicnJMjypAm7ZduBpPkX+mDQvdcj2CACyWCydaQ0gqkRjhs2EgE0MIO0YyXAzzkWltz0ki4S12d0f0bRdmI2W31SmMvd7jGXZyIQx60LTKRqqQa1GVeqfrM2855muFRsk6uji8F9tni8hjSdU4Pcd5WlC6f2dwWDJcfvt/HD2GCI1uPZkx4ha2BLYDV37uXfumDLk/tFPswHb3cbUgLc28rTb18pTi+HTE5f5r06/x2DPVVXYLylYuRPtr2WJ6l/2r/I59B+iwdTzI8sYRhSIRf47kt32Reo3w5esYpPsmGXFL0SOW57j5jtwBZWkJqkEc5wD10ObzxCDXrNfZ89KVkli/++RedncFZnqKcWkrLwctyW4eIBj0qiI4ZA81Wx6cnc09shOAflAw1EitPiOQ4HKoNkcFn9GNUfF1rBzblgVvjgO5t/zZpv53CnuZ9Aoo2nwF4pNrflPpmnd22gQdLpOmLTYrxygC/2vboGrNrS1HkxfvFKPib1DopDY/y9CECre1zHtdf6PNQxgvc+EGIncCnb8gTHFZxN1Mhyc1dmTDhitv/vawaqI8sZHx54tnP5l+KvWuXbegWPJETo6hMsbtMYHAmJIi5VFmhn6rq1zRuKYBFILEpHs3RPoybQzJtJoRYVRYA1E/vsBrdTfXD6jNDg6fz+88kc/menQlSALfAIhZhwxGz5eyhFqBVeYNfqKrJR+CHiUTAKN7t0R/nlsYo89V4SFMpvZakV9ywY6lqnu8mehn4c28OtFQ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JXhj5XnfeDQq1jU5keqBMiCUBkxNNlLCdkq34qWUcgmVfVskSh9Uq0ml5NhUFjKvHwxSfqZ3hlW8Z6a0PXzdYQDLi0EI2THYV1JTkOB2T9UC8N0pzRBesxLeXZTpfwLpUmI6rWtkwDIUh4HLo7UEZtX5s1kDVZqMcgRp5Ci4BYLVBgD', + page_age='3 weeks ago', + title='May 6, 2025: Top news events to look out for today - People Daily', + type='web_search_result', + url='https://peopledaily.digital/news/may-6-2025-top-news-events-to-look-out-for-today', + ), + BetaWebSearchResultBlock( + encrypted_content='EvcfCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDLM35Bum8iGp3KQslRoM14ZW+oAvbXsy7nUsIjCLxAF5JOrnB/xWs20058EEqp98kwMCubS8ohl/TFUHHJN7eeUDJz7IuZOFycr4+2Eq+h4AUNPhuzguwpPktjSAdmE8fd4sXi46MXN+AqpE3NlTX7NqhmtEhPnwn3HdMGnBiQMG///1824z5wmFCjV2v/aqK/HIy1wvC7M0C/oWcQiBhVR1zNhPbGz153Vt5tw/XgOusVQZz+8tKl3yXac7lWmksW03m2JK39XQFFcs5CZJIaYTqqReD28AyyAaNFW29WF9GrW13HCaOn8YeSHP+zVLqBWR2+WmEnIDStBBEpnl5QVyjhFMdiUG/0TzPTfhXOvHJo5WL/pef7qEKG1ECVjkF4BbYGXh/4E+3CFu2xaFO7Kfcds3pqb2hPgU5gaBnXFAv8QRXxPqfAWOX54vAW0H1ahBM9sUQQcfK8XTVyoVvEF/ImqoC8m4I7ciw8cGW9g7UF4ML8w8NGefqMDeWBz57Q3fPDkAZdr3OLdaUQkY2Vub+LFeI9hAqbLBixWmG6l9iTytGF/XuBuqcM81HOo9BaD0Dgh11IUcz3F2iCo53yoUAqjC40nL/oHYbeJHSGKbhZSYjZc16WQ1RKw8AAbaKxQofOKVH7L+eYxoUnUzbl5WnqiwKdy9k7/lOH0o+/Xu3CUlyi9kTuFRv3MfhuZCmB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rXqAR/TbK+7JjIY6HeWlykdOUeE//3e0SACTbjq7EbH0mbnWLTGPLCAhb49c5RJbXNJrPKWxLj5y9eDAxTrpqUQ3IfjjGiU9JBUTAUjwlKrE2/skjZtJbVegv1QhBFuwaUloEXHh89oOBh+4B5KbxqlS/YXtrHfKbFewdGiRSV4KUYc1FV4emyUZmn27joV1qc93UgWkqyAgXg9X75I7GtygxzN0SYqMp1R1LSOofRiqHMLOMs68He0BOPCRHw21/veVKiC1gN5R5g64DvLH4uhL+BBf15TivY/XnJKPJKtmG8pEWd6uXX/fYSo670WD2A7tWV1ZhszWai3tgH/1wR7kpOzik6wkhgD', + page_age='7 hours ago', + title='26 May 2025 UPSC Current Affairs - Daily News Headlines', + type='web_search_result', + url='https://testbook.com/ias-preparation/upsc-current-affairs-for-26-may-2025', + ), + ], + tool_call_id=IsStr(), + timestamp=IsDatetime(), + ), + TextPart( + content="""\ + + +Based on the search results, today is Monday, May 26, 2025. This is confirmed by several sources: + +1. \ +""" + ), + TextPart(content="It's Memorial Day today, May 26, 2025"), + TextPart( + content="""\ + + +2. \ +""" + ), + TextPart( + content='May 2025 is the fifth month of the current common year. The month began on a Thursday and will end on a Saturday after 31 days' + ), + TextPart( + content="""\ + + +3. \ +""" + ), + TextPart( + content="On May 26, 2025, there are significant developments happening, including India's launch of the Bharat Forecasting System to boost weather prediction and disaster preparedness" + ), + ], + usage=Usage( + requests=1, + request_tokens=16312, + response_tokens=258, + total_tokens=16570, + details={ + 'cache_creation_input_tokens': 0, + 'cache_read_input_tokens': 0, + 'input_tokens': 16312, + 'output_tokens': 258, + }, + ), + model_name='claude-3-5-sonnet-20241022', + timestamp=IsDatetime(), + vendor_id=IsStr(), + ), + ] ) @pytest.mark.vcr() async def test_anthropic_code_execution_tool(allow_model_requests: None, anthropic_api_key: str): - m = AnthropicModel('claude-3-5-sonnet-latest', provider=AnthropicProvider(api_key=anthropic_api_key)) + m = AnthropicModel('claude-sonnet-4-0', provider=AnthropicProvider(api_key=anthropic_api_key)) agent = Agent(m, builtin_tools=[CodeExecutionTool()]) result = await agent.run('How much is 3 * 12390?') - assert result.output == snapshot() + assert result.all_messages() == snapshot( + [ + ModelRequest(parts=[UserPromptPart(content='How much is 3 * 12390?', timestamp=IsDatetime())]), + ModelResponse( + parts=[ + TextPart(content="I'll calculate 3 * 12390 for you."), + ServerToolCallPart( + tool_name='code_execution', + args={ + 'code': """\ +result = 3 * 12390 +print(f"3 * 12390 = {result}")\ +""" + }, + tool_call_id=IsStr(), + model_name='anthropic', + ), + ServerToolReturnPart( + tool_name='code_execution_tool_result', + content=BetaCodeExecutionResultBlock( + content=[], + return_code=0, + stderr='', + stdout='3 * 12390 = 37170\n', + type='code_execution_result', + ), + tool_call_id=IsStr(), + timestamp=IsDatetime(), + ), + TextPart(content='The answer is **37,170**.'), + ], + usage=Usage( + requests=1, + request_tokens=1630, + response_tokens=105, + total_tokens=1735, + details={ + 'cache_creation_input_tokens': 0, + 'cache_read_input_tokens': 0, + 'input_tokens': 1630, + 'output_tokens': 105, + }, + ), + model_name='claude-sonnet-4-20250514', + timestamp=IsDatetime(), + vendor_id=IsStr(), + ), + ] + ) + + +@pytest.mark.vcr +async def test_anthropic_server_tool_pass_history_to_another_provider( + allow_model_requests: None, anthropic_api_key: str, openai_api_key: str +): + try: + from pydantic_ai.models.openai import OpenAIResponsesModel + from pydantic_ai.providers.openai import OpenAIProvider + except ImportError: + pytest.skip('OpenAI is not installed') + + openai_model = OpenAIResponsesModel('gpt-4.1', provider=OpenAIProvider(api_key=openai_api_key)) + anthropic_model = AnthropicModel('claude-3-5-sonnet-latest', provider=AnthropicProvider(api_key=anthropic_api_key)) + agent = Agent(anthropic_model, builtin_tools=[WebSearchTool()]) + + result = await agent.run('What day is today?') + assert result.output == snapshot("""\ +Let me search for today's date. + + + +Based on the search results, \n\ + +today is Monday, May 26, 2025 (Week 22) + +. This is notably \n\ + +Memorial Day, which was originally known as Decoration Day + +. \n\ + +The year 2025 is a regular year with 365 days + +.\ +""") + result = await agent.run('What day is tomorrow?', model=openai_model, message_history=result.all_messages()) + assert result.new_messages() == snapshot( + [ + ModelRequest(parts=[UserPromptPart(content='What day is today?', timestamp=IsDatetime())]), + ModelResponse( + parts=[ + TextPart(content="Let me search for today's date."), + ServerToolCallPart( + tool_name='web_search', + args={'query': 'current date today May 26 2025'}, + tool_call_id=IsStr(), + model_name='anthropic', + ), + ServerToolReturnPart( + tool_name='web_search_tool_result', + content=[ + BetaWebSearchResultBlock( + encrypted_content='EtMNCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDMls1HqcdgUH1+5FNRoMOi5Mua0GMHXeHmk7IjBBQ9UrZ9tuM/Wz8gR3MDcbNC1pIzqqRQKgY/7jx84iSpfWWrA8ZuaeSTAl7oQc3wIq1gxORDCDZizvXpEuwM2MP1BMSmcVjoLJSP4jcvDBG36KWY5vqRmPG3xgFLOML6Kb5BgE4zcmQDmYxmqTwmQLavNEJ01gmSnMcweZrT0++SGIvTfd/P5qqLrxI3m4bYEMeEcOEMqYCTLke1Y00BMq4QJllJanxBDjQ/fMfeJqrE6fvWqc1lpqNxeDlUeO3jIWDxFyma0tHDcAb8+M7eosB2fjhKGfOeO4avENE3HUDXmGYJBR9qNE/bFzshx+S850r4YKAK81kinG9QtbrEal4NVAepc59wYbuTm6ZZE88khRqi/iXX2/I5J4VZ1UFlg3eAVs034ekJ/Tru2owFNfUv3FAVix7eUZHfKNg+a+6//smhJSnOHHcmJeBEO8QPSpWs0sRyTJinT+nMQ3GBMkbNFW5KYOzy4naRMmIUxB0dFvtMkaUGd+GULqDMpzdosn9EJUkdx/DSLjOFFUJP3bQnE+FQRBaQRVz2NI9tmulS0g879Ldxg8dIV4h+7cyi236nchhCDCAsBNIrVLOS+1cOu3rdmVjifSE9wlk75HjzQs74ra+BrsbyAoRMLIOnbUok3KWjBjh0NEjlJszzNOgdMka/umaNYQ8xCscg6T2GeisFWDKN9xEAqOYsOsvtkp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bDfjDQqO70P+PF40ADTk6jYyv5vy2qWKl3E4SwgblZRv+45ZqkiNQJFWyscoytsew7BugWHKamA3fCK2uQNNTCvrBliXY3K3yKxI4sPDXPh1WCvScJWatRYCFY+YGU3K9+abdJWJ5OvDE7SIdJGvOoCbn3ODFB+Rkrki5U34a5Gz+i2d++6rJsuAdIc5IWLsz2rTka9QOcEfCa1RiHvnkHvQo0M5s6EnR4Q65WKCirr8LT7hzbQ46hmjvRKbrniC0rEQpbc9i9+P36x4GmyqQFeK0Lro6KCGbTzPQ/A0rc4Zp4GBEwEL3OFOe9QVkPfQX9HP6pG/pqzv+0cJ6hK/0zIu8Ym48F8tH482smAtjUJ/3/rm8L+MdW1Q6LAOpYdcj/B7sQPHO9QZ3e9lAwEu7xPFpsliTjy16nLijSER1/eVW7SPBgD', + title='May 2025 Calendar', + type='web_search_result', + url='https://www.calendar-365.com/calendar/2025/May.html', + ), + BetaWebSearchResultBlock( + encrypted_content='EuwCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDNOs+T2nScTnsxVJZRoM3g9Mm5RlKN0sgiPBIjC1PJPZRfoUgRpmpfVZcF8sBTMUr6Lu9BK9xOxTQ8nMMBGjC7kFOrwJZ3ENgXLhRzcq7wF51cgLQ+Pb0MiXBGozKXa1r7DbogMoIacrDz92bvzbwXbo4mTQMipnow47//PYVelJXipxVAA6ISswEiYPGXyCjqSy6QEIde1TOc8nvMpaM0Y4u3DdOXez5EsgP+ZxIYly/I7JS35h/azV0nbpzEKsptZwNWwuBtNIYbkklPaluda13QbkE0KK1Cl6PnkNMVbO0Uo9XURcwLn5aDLJol0GJGVpuiApXVJoMk7e7L/Ib+p1BE77VW619KzDmQvuAjQXZR28Fb5KEbRxXkSaq7xAZnYZyQFtOlqg/07Tv+V4g0WYZhI3tn0phBe0w+95NhgD', + title='May 26, 2025 Calendar with Holidays & Count Down - USA', + type='web_search_result', + url='https://www.wincalendar.com/Calendar/Date/May-26-2025', + ), + BetaWebSearchResultBlock( + encrypted_content='Es0ICioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDE+yP8aOxk+46r0AERoMFOlAyJD/AGdtDxeVIjDDhlbQbqqMmuMK9bN7ZNTwHWQwahkAaZd/LltU3eIPifLnfk4Apnck+mUOM61zRiQq0Ac12DCFUzhrlxvkXqpK3gWjgosGbUyzt8WbmwSaEmCbXf9F4bNc7+LKvQUtEceYmCesYcQa0lOT+88IhhRTxYBMyXo0Ws3Pw1yrLJi9P1JqfpcnWebg8McOGY/pD/MFeJORQvH+0UvGjBoMD0uaPPY1U6cFC7EWL+IebMjjmpj80RqAi/xjOOnU2XO8N98dFCzW4GiI9IWut8OBv8u3kLpmyYOV6cVxr3WTEntDv3onveQvTIyJFiDG8bmOKK72ONWrevnrKGQ7JY2gPYp5CakS+SYahIKiJOOY3cWQfUEheIfEZeuGadI907uvREyb1bf4h/0KsFjnOBWrHXdl7LIDRSfz8OIwfJufTERGCfG0vzMiHzFJbFcezciz3K9m25QjxL676NcrYbgZGFhIXar9jNvPAjGcUecpaOLAEztHx7pd0nHMsW5KKUTS0yU5sMFNY1+RMSKk8kVoCcBtOuOsiegf+BJV/J997IvbQG5A7h/72VsVyUbiBDT1z77VjKTPcerZr4EReCobAoyGdMKt1mihwvYvsyvZepAkvrxOoKnb+2pkzhZQtxGt0ub23yhSZyLgi0frVSS04KeYncVWW7cQJJygzfDS37pdSPnU0wZmAgZLzQ3X1NVmR9AQVSQ+IcIoVSCuru/WiBcS7aJPC4uh6cn5sB9C6yThrD8i7T7DJGbR/uutIADP9IgGUzdoppStgQugx4TwnQI9SC6e36zjfsK6NeUkxLi2b4T1uuRDvjgUDc0OXGZdoGQgc8nHoe7rexoLJqeWat19KNwy4DqnM7oywivVJWDJ2ThV4863f3+hYRlXeuxnojBsmENJsSxZtF46ye1gfPSvBYlEpO/Uu9FzR3yy4bB3b/qOh2+JMTLkk3R5u4C6Ca/Nye0bpnsKG7xjW2cKguqfKhUuUFaSucCCJqg/hT21DlUiHXZQ6wq6Ywi9C9l+wJbzfJWWHczjkTJvWhFq8saXSAzfWDd8tTKH1zje7NN38jRQPUDxS0CWMM78/+BgWoqsB5+IjkEl5QHV55GSCg+05HQPLyHQWWjBdMLWr+Uu3T0kKI0B/QDJPHO1mSX5AsGot5HZzva5qEPzn3vGly1n1vs14JWE+RrtIJTBHi0ypFhaO6oCRGejMRDbZhotP4gWW1VW0gLNikgfW0Z5waOb8wmLcN4vQhsHRFfZiXsqUF0dTXsme8+kF8qcVZNnPtghyf1ACvFgZ8TAF4PaM1wzpa8kDeBFvyp14U39R8XDJ3T6lGWR2rpv0WjS8d5h0RCZ3XlFuqPUXWEQ89OpEH8vEiYXGAM=', + title='Daily Calendar for Monday, May 26, 2025 | Almanac.com', + type='web_search_result', + url='https://www.almanac.com/calendar/date/2025-05-26', + ), + BetaWebSearchResultBlock( + encrypted_content='EpoFCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDClGwxB0YzJdub7VGhoMASvr8D1KqeBCa4knIjAV1lHpDjDIw6nag+Y/ax/aq2LhfZ1/CXJoRyRFiUGLVQHpERodH6/Kg+l8aLy01gAqnQQR8cCm+MlfMM3pSSNah8dZ0m5wam3enQ+5A3VLu0P/CF/TlwL5yB21pfaiu0lad9Ee99YFvs7LInvXpyFcUgLuhankIzNNZZbUIeS4sZIK39RrN+pmifOl6KQqT1f2tpJE6x7erDlAscnMvbRIr9U8Pwf8Au709bI6zcHqCg4GNJk2CqDf6kAXRHRRhcWYFtm8b0wvg9HaWVYZFOunZMJ1gFD3D82dSm3m4awyDSZm54A/9hmzE/lcQyiSVBC73NOmJMBxbNec16qaeJdUTZp33JYk0Fdro1VnkUiJyq5Kb2W7VYvfeQ1a2dLXPTYIsXeQXLHesmVTe7m0X70w0BgCAC+yKZPp68bbsEbsbjwxaWOxQ50seu8kkXDiEgscUK5e4N5YnPXMNjyMNZmlbhmFtw3abOmOCVdpcDORXGOgJZBWBkEqQ4mE8b+aEzXMGRqLzYjDKZHx11wolF3MGu/V/+f4lWEyNwR2Kipp67teOx1ypvl4DiZiPVkZwx9lt08u+TJGEGbTYtdPMQRLVX1K2K4YOEcP5/abNrdT9KdYH7dNscRDqDY04gi+47JyyTSRObcCjQun9LUqh0q6/NfIIWQwjguZ6dbYL67ymiuRgHJDXsPnc/P58qP4kRsClz9lu/XPTFuAzCQwaXioK3XiBNW73nSKyRaxm6/OxbYetPGIG2JUTkQtrmGL5AYJTfFbI6XOB1AFDcsoSC7nGAM=', + title='How long ago was May 26th 2025? | howlongagogo.com', + type='web_search_result', + url='https://howlongagogo.com/date/2025/may/26', + ), + BetaWebSearchResultBlock( + encrypted_content='Eq0DCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDDT/5zRyvf5kzhhLgxoM5vWn/Zjmu43rvWgPIjCf4z9SIoZxgNKyiLOqk422DLmHbFXGX+mhy6FPo43NOogfLhu/a3F3EPkiMxfd0UMqsAKIhRJKuEhfoi2saPCA3LpNhJ3YPO2NZyYL75SJdCbkfACe2YJOcCXHmt4hkrbA98Mrvh9DmtP6HNA9iYdsotXkDi0BuTlmiIcspblXnkpXLIURVpNYqqZ2jbjBEmi/mVlTonm9NJwx1rZHzwciKhaIrz440Vk/uTIqpiMb22U00hWrQ563gNlMSXpvIpyayhJcCnNEjQybJjQUsKaMqb/3Xbp8NUoWtidUb4ARNeoNe4BlzMEEcIPc0QWi1CKoQJH3JazxAhMSqvc4SVWXRyspZZP6lSHhMcIYlf/yorVYVF3FmL1djZfxXbVnI/VbFbpoNejvnOh5QIdbDrHu6UN3u2iGZBUJLgs6i9OUwMWw8kpi2WUm+3JeRkdyThE0M9WAhK+4qYD3UHgFCcucX7ZeGAM=', + title='How many days until 26th May 2025?', + type='web_search_result', + url='https://days.to/26-may/2025', + ), + BetaWebSearchResultBlock( + encrypted_content='EpACCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDNXuvVNnWjvXgGql0RoMXwqBXk4fJbTzoM0pIjC1HFbYVJOlp39xpYzw/uJVUO6cC2L9ScOu9ceP2MDjyBWuE0X2LxBsyFjM3ZwzQtYqkwHukWybclFQu5CuM7gntDFNVYsSAVDbslXo5WwOlljEXnC7ohNjuB4lJfXS5HomdOmnUs0/thHHvR5mvCvHt5o+XrnTV8PSOXJvZonVctfjBeMe/3VWaQX2Pr8F71hiBVghYnc4lqnvA/nebBXcqdz2VTlG7V2/u+KCGVfR27l0+BX9s8vroR6dZ7flEBZBSDDzt3QYAw==', + title='What day of the week will May 26th 2025 be on? | howlongagogo.com', + type='web_search_result', + url='https://howlongagogo.com/day-of-the-week/2025-05-26', + ), + BetaWebSearchResultBlock( + encrypted_content='EtkGCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDNqnvrEdyAJMqZiouRoMl3zAD6YOqFa5Y+LGIjCFzjG2cb9Uv/fUGE2iFHKU3CP5i7yVrpvusD4UBOrARkME7qTDdfIczSbj1PvU7ygq3AUQ9yGVSgg9AB7qawws2Zx43sVi5sDW/thrC8owactbSzc2qE9IsmucxwknSZXemJFSMW3I2vWhlpJVcfipESwRyVSnVNoTivU7/aIbnI15/NOGATtd/TR0mkyO2MMMAFIHiEfq0iuvMUX/EmnEqlSzDngrlWdPvb0qDrZIkSVEYFE5FEPHXuXEFEWZ/yLs7rUK7M9kc161gTbQ/NMALrWDjKtFtgI20Wf2luvbfX8G8kivyPttdUk9aiBxStWetpJZqsBEGT1auj3hk7FaHU2FTNW0LGvIe++QZNL+w/nKa+YuNGpJCxAiLt3X+2hnZmz8Mskfyfl5I5EWt7eOQmoR0qStl7Fh9Myb3vZ0rpZ8gZeaLd1xn6pKKa+tBonm1Oq1zQvsoMkMwTcMRK3LA53dF3rtkgSFyBAWis/tenbdrRVUGlicecn/bSd9FVFoGM5RWYvXR9/3zr3SBf2qNTT2jmeLqcl07LYUk+WDGcas6vAVGDXxVoAh+uAC0WziUtKfv//V4IeleGEOLJNdX1jDC8uQMKyGuRCXNRJAoHRhgUr2F46Ax9xJOHWXKDheklfqTFff0wf93d5U/d4p52RaeM7jcBexjz0wMQRBL91ZOZVweRHbV2BVTBpPH79Y9W/UmBEycRnTmurJJspZre10EVH7MIX/4DRhxBipdZrQFgqTrCgbN6dRFLlQR9w1n+Y2pSEXnSeHdwOTPVHSKBKQO43XCKWmJPgNFELcRBZdVxGcE9xd2/dzs0C6Aa7vXZ/5ZPx9rgis1TY2UegdpiyWmKV0yw1K2LKpq8BOdH4t3OPDTPvJrymaZwldTb+w6rLGf0p1YAkZIBPpUX9tAstQ1HAz58zHnLhQfUzpm5ft4S3m2i+WkyjzIkh4F2Y1bIvbwQvqT2x3rGJRRWJGyg9PDEVCY4gjKObhjkQbanRG58uPuf7mBofFqKbUBJOngnAvSmGibWNn9uSftf8YAw==', + title='Calendar 2025', + type='web_search_result', + url='https://www.timeanddate.com/calendar/', + ), + BetaWebSearchResultBlock( + encrypted_content='Eq0CCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDJI9LlFy1IIRylVnDxoMIXCLnspt86G8qxeIIjD0AiJH0r4ULSsSOXmrBj0ntQEjeADrBeCC4P53iCMga7fv0Uxic9EYRY73zIkr7aAqsAFql3nOsfaopCrkf/WC9qvKgDAeuBfKcTNjj+rfHn5HXgVM4BOpomSXxBc0CHUe3Heqw2mD9+Hy99flWI60pgPB+umunXeOjz5HC4W1q39ROTzvMkdpJzvXoUgG/dbgjJ9vEvZ0VC4z+ZwRAYSNgOgiRt3zApcZJ4iSsF/XgrQNs2L2ThcQyc84+lKKAaKPrSl6Lwm1bH+HTFYIm9KPyhvlbfEbp5buj/wQgn4Na/3qrhgD', + title='May 26', + type='web_search_result', + url='https://www.nationaldayc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gYMPR2PTsvOdN1xmiyW1b7Cy8Rrsa5txCZHSvz4yqfwZ84r0NX46E0mupmGyHxIlwllEIx7FsDNnJBARKaqv3fYRA+uQPq7DdaY+cRJpRIQ4o90XQCS+rLdgDO+qFoD0N0pl7GAM=', + title='Day Numbers for 2025', + type='web_search_result', + url='https://www.epochconverter.com/days/2025', + ), + BetaWebSearchResultBlock( + encrypted_content='EosGCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDDVXhko+GaoaARLiWxoMhhwixTlmn7YeimyXIjBqLMdGYisjngIKCxw2kKV4whivBWinF+rFSah3+1JUtoRUor9o+HmU0StGZxaPydsqjgUGl0OUiZ7Dlc0YqCN8bOGaoUeUv7MpoODHTH97tj67PKZmSbEkDp0J1bJzxHd4WeL1SdNnExDsDcSk4joJFA4lBVAAgxvBogir7w/ws8fRoANAp3F4T9IoZHSQVR2PhtRpymmT1JIaelypYDnda1cLVKrOhF26o8zSp3sDKsilZRW7TSGG1YmzEEKdFK0h/jrGO9yr35kL8vzIF1vdXeJbJa79pFo8e1OLxq9Z2e3y5thBAB3aMK+WMT6n3vRaaRpG4/sqL69lUB/J8Ju1X2VAqfUhYe1GbTKVwAqv+Fllq/NQfZywAaqkHF0YqzMFNYYNB0KTpzrPetfmvXMvog2I0qn8Xuuefw6ROAgsUJaIbyY2b2AbO9Ohxlqv08Lgt/CEmghIi2I/zvt4Y5AjUZzpRUqYAomrkagze50qj5P5Mj191pU+SLehkArpjDp131C5k3jhJ/6m7EaRpv7R4JWxWZCETvqonBRkooPRYqTZkHAD61WjNrFzDOn3fOHjrK9XjQMYE6C9rLOQf/Cy3XdlJgmSa6OKzak0NhRzIA8h7O16Mlf5kaMz5gW4vhIY/luKVQCgo7O39nxitIw94BlW0u0qT0XzCFgS05ADWdIC7SHJaU8NB4x2h0zQTTX2P5m0U2giLYPO86lUWicae08l14+JUB+uPlpDhNU7UQl29SM77+XnzdGiX/Kk99k8FcMrgp6+X5riQWuE0+rBhuDzOnVhGOgFCazxWCIpXIAvYqin429shbJtttU/upLPrbj9HsXpCJjOPI7+FLK7JXH5tH3rz1OCa/14jkNd4GTg5eGNnJSDgSJ2dWxC9oRQyFub6rPc58n9BCkHzcqrF502Q4TTEfNUuQsqBMJL8yEYAw==', + title='Countdown to May 26, 2025 in Washington DC, District of Columbia', + type='web_search_result', + url="https://www.timeanddate.com/countdown/to?msg=Cressida_Glitter's+birthday&year=2025&month=5&day=26&hour=0&min=0&sec=0&fromtheme=birthday", + ), + ], + tool_call_id=IsStr(), + timestamp=IsDatetime(), + ), + TextPart( + content="""\ + + +Based on the search results, \ +""" + ), + TextPart(content='today is Monday, May 26, 2025 (Week 22)'), + TextPart(content='. This is notably '), + TextPart(content='Memorial Day, which was originally known as Decoration Day'), + TextPart(content='. '), + TextPart(content='The year 2025 is a regular year with 365 days'), + TextPart(content='.'), + ], + usage=Usage( + requests=1, + request_tokens=9582, + response_tokens=178, + total_tokens=9760, + details={ + 'cache_creation_input_tokens': 0, + 'cache_read_input_tokens': 0, + 'input_tokens': 9582, + 'output_tokens': 178, + }, + ), + model_name='claude-3-5-sonnet-20241022', + timestamp=IsDatetime(), + vendor_id=IsStr(), + ), + ModelRequest(parts=[UserPromptPart(content='What day is tomorrow?', timestamp=IsDatetime())]), + ModelResponse( + parts=[TextPart(content='Tomorrow will be **Tuesday, May 27, 2025**.')], + usage=Usage( + request_tokens=410, + response_tokens=17, + total_tokens=427, + details={'reasoning_tokens': 0, 'cached_tokens': 0}, + ), + model_name='gpt-4.1-2025-04-14', + timestamp=IsDatetime(), + ), + ] + ) From f33e56825bc86dcf95a5e662b4c191b94f07d4b2 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Tue, 27 May 2025 19:04:14 +0200 Subject: [PATCH 06/34] Fix test --- tests/models/test_anthropic.py | 107 --------------------------------- 1 file changed, 107 deletions(-) diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index 1013242ab..0832c2ebb 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -1275,113 +1275,6 @@ async def test_anthropic_server_tool_pass_history_to_another_provider( result = await agent.run('What day is tomorrow?', model=openai_model, message_history=result.all_messages()) assert result.new_messages() == snapshot( [ - ModelRequest(parts=[UserPromptPart(content='What day is today?', timestamp=IsDatetime())]), - ModelResponse( - parts=[ - TextPart(content="Let me search for today's date."), - ServerToolCallPart( - tool_name='web_search', - args={'query': 'current date today May 26 2025'}, - tool_call_id=IsStr(), - model_name='anthropic', - ), - ServerToolReturnPart( - tool_name='web_search_tool_result', - content=[ - BetaWebSearchResultBlock( - encrypted_content='EtMNCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDMls1HqcdgUH1+5FNRoMOi5Mua0GMHXeHmk7IjBBQ9UrZ9tuM/Wz8gR3MDcbNC1pIzqqRQKgY/7jx84iSpfWWrA8ZuaeSTAl7oQc3wIq1gxORDCDZizvXpEuwM2MP1BMSmcVjoLJSP4jcvDBG36KWY5vqRmPG3xgFLOML6Kb5BgE4zcmQDmYxmqTwmQLavNEJ01gmSnMcweZrT0++SGIvTfd/P5qqLrxI3m4bYEMeEcOEMqYCTLke1Y00BMq4QJllJanxBDjQ/fMfeJqrE6fvWqc1lpqNxeDlUeO3jIWDxFyma0tHDcAb8+M7eosB2fjhKGfOeO4avENE3HUDXmGYJBR9qNE/bFzshx+S850r4YKAK81kinG9QtbrEal4NVAepc59wYbuTm6ZZE88khRqi/iXX2/I5J4VZ1UFlg3eAVs034ekJ/Tru2owFNfUv3FAVix7eUZHfKNg+a+6//smhJSnOHHcmJeBEO8QPSpWs0sRyTJinT+nMQ3GBMkbNFW5KYOzy4naRMmIUxB0dFvtMkaUGd+GULqDMpzdosn9EJUkdx/DSLjOFFUJP3bQnE+FQRBaQRVz2NI9tmulS0g879Ldxg8dIV4h+7cyi236nchhCDCAsBNIrVLOS+1cOu3rdmVjifSE9wlk75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sGkJbpBoKfd2KUfeSFoJ8Oy2J8kE3t3ursEP8gOJhAJQwI5K5nGzSpoz+QfVAnRstc7oMRYYfUGrDRhln9W8bDfjDQqO70P+PF40ADTk6jYyv5vy2qWKl3E4SwgblZRv+45ZqkiNQJFWyscoytsew7BugWHKamA3fCK2uQNNTCvrBliXY3K3yKxI4sPDXPh1WCvScJWatRYCFY+YGU3K9+abdJWJ5OvDE7SIdJGvOoCbn3ODFB+Rkrki5U34a5Gz+i2d++6rJsuAdIc5IWLsz2rTka9QOcEfCa1RiHvnkHvQo0M5s6EnR4Q65WKCirr8LT7hzbQ46hmjvRKbrniC0rEQpbc9i9+P36x4GmyqQFeK0Lro6KCGbTzPQ/A0rc4Zp4GBEwEL3OFOe9QVkPfQX9HP6pG/pqzv+0cJ6hK/0zIu8Ym48F8tH482smAtjUJ/3/rm8L+MdW1Q6LAOpYdcj/B7sQPHO9QZ3e9lAwEu7xPFpsliTjy16nLijSER1/eVW7SPBgD', - title='May 2025 Calendar', - type='web_search_result', - url='https://www.calendar-365.com/calendar/2025/May.html', - ), - BetaWebSearchResultBlock( - encrypted_content='EuwCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDNOs+T2nScTnsxVJZRoM3g9Mm5RlKN0sgiPBIjC1PJPZRfoUgRpmpfVZcF8sBTMUr6Lu9BK9xOxTQ8nMMBGjC7kFOrwJZ3ENgXLhRzcq7wF51cgLQ+Pb0MiXBGozKXa1r7DbogMoIacrDz92bvzbwXbo4mTQMipnow47//PYVelJXipxVAA6ISswEiYPGXyCjqSy6QEIde1TOc8nvMpaM0Y4u3DdOXez5EsgP+ZxIYly/I7JS35h/azV0nbpzEKsptZwNWwuBtNIYbkklPaluda13QbkE0KK1Cl6PnkNMVbO0Uo9XURcwLn5aDLJol0GJGVpuiApXVJoMk7e7L/Ib+p1BE77VW619KzDmQvuAjQXZR28Fb5KEbRxXkSaq7xAZnYZyQFtOlqg/07Tv+V4g0WYZhI3tn0phBe0w+95NhgD', - title='May 26, 2025 Calendar with Holidays & Count Down - USA', - type='web_search_result', - url='https://www.wincalendar.com/Calendar/Date/May-26-2025', - ), - BetaWebSearchResultBlock( - encrypted_content='Es0ICioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDE+yP8aOxk+46r0AERoMFOlAyJD/AGdtDxeVIjDDhlbQbqqMmuMK9bN7ZNTwHWQwahkAaZd/LltU3eIPifLnfk4Apnck+mUOM61zRiQq0Ac12DCFUzhrlxvkXqpK3gWjgosGbUyzt8WbmwSaEmCbXf9F4bNc7+LKvQUtEceYmCesYcQa0lOT+88IhhRTxYBMyXo0Ws3Pw1yrLJi9P1JqfpcnWebg8McOGY/pD/MFeJORQvH+0UvGjBoMD0uaPPY1U6cFC7EWL+IebMjjmpj80RqAi/xjOOnU2XO8N98dFCzW4GiI9IWut8OBv8u3kLpmyYOV6cVxr3WTEntDv3onveQvTIyJFiDG8bmOKK72ONWrevnrKGQ7JY2gPYp5CakS+SYahIKiJOOY3cWQfUEheIfEZeuGadI907uvREyb1bf4h/0KsFjnOBWrHXdl7LIDRSfz8OIwfJufTERGCfG0vzMiHzFJbFcezciz3K9m25QjxL676NcrYbgZGFhIXar9jNvPAjGcUecpaOLAEztHx7pd0nHMsW5KKUTS0yU5sMFNY1+RMSKk8kVoCcBtOuOsiegf+BJV/J997IvbQG5A7h/72VsVyUbiBDT1z77VjKTPcerZr4EReCobAoyGdMKt1mihwvYvsyvZepAkvrxOoKnb+2pkzhZQtxGt0ub23yhSZyLgi0frVSS04KeYncVWW7cQJJygzfDS37pdSPnU0wZmAgZLzQ3X1NVmR9AQVSQ+IcIoVSCuru/WiBcS7aJPC4uh6cn5sB9C6yThrD8i7T7DJGbR/uutIADP9IgGUzdoppStgQugx4TwnQI9SC6e36zjfsK6NeUkxLi2b4T1uuRDvjgUDc0OXGZdoGQgc8nHoe7rexoLJqeWat19KNwy4DqnM7oywivVJWDJ2ThV4863f3+hYRlXeuxnojBsmENJsSxZtF46ye1gfPSvBYlEpO/Uu9FzR3yy4bB3b/qOh2+JMTLkk3R5u4C6Ca/Nye0bpnsKG7xjW2cKguqfKhUuUFaSucCCJqg/hT21DlUiHXZQ6wq6Ywi9C9l+wJbzfJWWHczjkTJvWhFq8saXSAzfWDd8tTKH1zje7NN38jRQPUDxS0CWMM78/+BgWoqsB5+IjkEl5QHV55GSCg+05HQPLyHQWWjBdMLWr+Uu3T0kKI0B/QDJPHO1mSX5AsGot5HZzva5qEPzn3vGly1n1vs14JWE+RrtIJTBHi0ypFhaO6oCRGejMRDbZhotP4gWW1VW0gLNikgfW0Z5waOb8wmLcN4vQhsHRFfZiXsqUF0dTXsme8+kF8qcVZNnPtghyf1ACvFgZ8TAF4PaM1wzpa8kDeBFvyp14U39R8XDJ3T6lGWR2rpv0WjS8d5h0RCZ3XlFuqPUXWEQ89OpEH8vEiYXGAM=', - title='Daily Calendar for Monday, May 26, 2025 | Almanac.com', - type='web_search_result', - url='https://www.almanac.com/calendar/date/2025-05-26', - ), - BetaWebSearchResultBlock( - encrypted_content='EpoFCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDClGwxB0YzJdub7VGhoMASvr8D1KqeBCa4knIjAV1lHpDjDIw6nag+Y/ax/aq2LhfZ1/CXJoRyRFiUGLVQHpERodH6/Kg+l8aLy01gAqnQQR8cCm+MlfMM3pSSNah8dZ0m5wam3enQ+5A3VLu0P/CF/TlwL5yB21pfaiu0lad9Ee99YFvs7LInvXpyFcUgLuhankIzNNZZbUIeS4sZIK39RrN+pmifOl6KQqT1f2tpJE6x7erDlAscnMvbRIr9U8Pwf8Au709bI6zcHqCg4GNJk2CqDf6kAXRHRRhcWYFtm8b0wvg9HaWVYZFOunZMJ1gFD3D82dSm3m4awyDSZm54A/9hmzE/lcQyiSVBC73NOmJMBxbNec16qaeJdUTZp33JYk0Fdro1VnkUiJyq5Kb2W7VYvfeQ1a2dLXPTYIsXeQXLHesmVTe7m0X70w0BgCAC+yKZPp68bbsEbsbjwxaWOxQ50seu8kkXDiEgscUK5e4N5YnPXMNjyMNZmlbhmFtw3abOmOCVdpcDORXGOgJZBWBkEqQ4mE8b+aEzXMGRqLzYjDKZHx11wolF3MGu/V/+f4lWEyNwR2Kipp67teOx1ypvl4DiZiPVkZwx9lt08u+TJGEGbTYtdPMQRLVX1K2K4YOEcP5/abNrdT9KdYH7dNscRDqDY04gi+47JyyTSRObcCjQun9LUqh0q6/NfIIWQwjguZ6dbYL67ymiuRgHJDXsPnc/P58qP4kRsClz9lu/XPTFuAzCQwaXioK3XiBNW73nSKyRaxm6/OxbYetPGIG2JUTkQtrmGL5AYJTfFbI6XOB1AFDcsoSC7nGAM=', - title='How long ago was May 26th 2025? | howlongagogo.com', - type='web_search_result', - url='https://howlongagogo.com/date/2025/may/26', - ), - BetaWebSearchResultBlock( - encrypted_content='Eq0DCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDDT/5zRyvf5kzhhLgxoM5vWn/Zjmu43rvWgPIjCf4z9SIoZxgNKyiLOqk422DLmHbFXGX+mhy6FPo43NOogfLhu/a3F3EPkiMxfd0UMqsAKIhRJKuEhfoi2saPCA3LpNhJ3YPO2NZyYL75SJdCbkfACe2YJOcCXHmt4hkrbA98Mrvh9DmtP6HNA9iYdsotXkDi0BuTlmiIcspblXnkpXLIURVpNYqqZ2jbjBEmi/mVlTonm9NJwx1rZHzwciKhaIrz440Vk/uTIqpiMb22U00hWrQ563gNlMSXpvIpyayhJcCnNEjQybJjQUsKaMqb/3Xbp8NUoWtidUb4ARNeoNe4BlzMEEcIPc0QWi1CKoQJH3JazxAhMSqvc4SVWXRyspZZP6lSHhMcIYlf/yorVYVF3FmL1djZfxXbVnI/VbFbpoNejvnOh5QIdbDrHu6UN3u2iGZBUJLgs6i9OUwMWw8kpi2WUm+3JeRkdyThE0M9WAhK+4qYD3UHgFCcucX7ZeGAM=', - title='How many days until 26th May 2025?', - type='web_search_result', - url='https://days.to/26-may/2025', - ), - BetaWebSearchResultBlock( - encrypted_content='EpACCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDNXuvVNnWjvXgGql0RoMXwqBXk4fJbTzoM0pIjC1HFbYVJOlp39xpYzw/uJVUO6cC2L9ScOu9ceP2MDjyBWuE0X2LxBsyFjM3ZwzQtYqkwHukWybclFQu5CuM7gntDFNVYsSAVDbslXo5WwOlljEXnC7ohNjuB4lJfXS5HomdOmnUs0/thHHvR5mvCvHt5o+XrnTV8PSOXJvZonVctfjBeMe/3VWaQX2Pr8F71hiBVghYnc4lqnvA/nebBXcqdz2VTlG7V2/u+KCGVfR27l0+BX9s8vroR6dZ7flEBZBSDDzt3QYAw==', - title='What day of the week will May 26th 2025 be on? | howlongagogo.com', - type='web_search_result', - url='https://howlongagogo.com/day-of-the-week/2025-05-26', - ), - BetaWebSearchResultBlock( - encrypted_content='EtkGCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDNqnvrEdyAJMqZiouRoMl3zAD6YOqFa5Y+LGIjCFzjG2cb9Uv/fUGE2iFHKU3CP5i7yVrpvusD4UBOrARkME7qTDdfIczSbj1PvU7ygq3AUQ9yGVSgg9AB7qawws2Zx43sVi5sDW/thrC8owactbSzc2qE9IsmucxwknSZXemJFSMW3I2vWhlpJVcfipESwRyVSnVNoTivU7/aIbnI15/NOGATtd/TR0mkyO2MMMAFIHiEfq0iuvMUX/EmnEqlSzDngrlWdPvb0qDrZIkSVEYFE5FEPHXuXEFEWZ/yLs7rUK7M9kc161gTbQ/NMALrWDjKtFtgI20Wf2luvbfX8G8kivyPttdUk9aiBxStWetpJZqsBEGT1auj3hk7FaHU2FTNW0LGvIe++QZNL+w/nKa+YuNGpJCxAiLt3X+2hnZmz8Mskfyfl5I5EWt7eOQmoR0qStl7Fh9Myb3vZ0rpZ8gZeaLd1xn6pKKa+tBonm1Oq1zQvsoMkMwTcMRK3LA53dF3rtkgSFyBAWis/tenbdrRVUGlicecn/bSd9FVFoGM5RWYvXR9/3zr3SBf2qNTT2jmeLqcl07LYUk+WDGcas6vAVGDXxVoAh+uAC0WziUtKfv//V4IeleGEOLJNdX1jDC8uQMKyGuRCXNRJAoHRhgUr2F46Ax9xJOHWXKDheklfqTFff0wf93d5U/d4p52RaeM7jcBexjz0wMQRBL91ZOZVweRHbV2BVTBpPH79Y9W/UmBEycRnTmurJJspZre10EVH7MIX/4DRhxBipdZrQFgqTrCgbN6dRFLlQR9w1n+Y2pSEXnSeHdwOTPVHSKBKQO43XCKWmJPgNFELcRBZdVxGcE9xd2/dzs0C6Aa7vXZ/5ZPx9rgis1TY2UegdpiyWmKV0yw1K2LKpq8BOdH4t3OPDTPvJrymaZwldTb+w6rLGf0p1YAkZIBPpUX9tAstQ1HAz58zHnLhQfUzpm5ft4S3m2i+WkyjzIkh4F2Y1bIvbwQvqT2x3rGJRRWJGyg9PDEVCY4gjKObhjkQbanRG58uPuf7mBofFqKbUBJOngnAvSmGibWNn9uSftf8YAw==', - title='Calendar 2025', - type='web_search_result', - url='https://www.timeanddate.com/calendar/', - ), - BetaWebSearchResultBlock( - encrypted_content='Eq0CCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDJI9LlFy1IIRylVnDxoMIXCLnspt86G8qxeIIjD0AiJH0r4ULSsSOXmrBj0ntQEjeADrBeCC4P53iCMga7fv0Uxic9EYRY73zIkr7aAqsAFql3nOsfaopCrkf/WC9qvKgDAeuBfKcTNjj+rfHn5HXgVM4BOpomSXxBc0CHUe3Heqw2mD9+Hy99flWI60pgPB+umunXeOjz5HC4W1q39ROTzvMkdpJzvXoUgG/dbgjJ9vEvZ0VC4z+ZwRAYSNgOgiRt3zApcZJ4iSsF/XgrQNs2L2ThcQyc84+lKKAaKPrSl6Lwm1bH+HTFYIm9KPyhvlbfEbp5buj/wQgn4Na/3qrhgD', - title='May 26', - type='web_search_result', - url='https://www.nationaldaycalendar.com/may/may-26', - ), - BetaWebSearchResultBlock( - encrypted_content='Eo0NCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDGEwwt/jePgh2l4e2BoMXI0/IICuWUmpN2DNIjD9RSXx/WUV2tcUa8Agn8pOgQlObg5w5bcSlXKUK5FRojDqDl+fe1KL3Jb8EFqgICwqkAygqwIv4g1/aXTTf/O3ro/pVB8lEgHU+ulrBftA92NmhTN2joJhUyPhgs4CxlWyBe/N5+e8ek4DwRwhNwSfIOOFObfL5+QoAT5Fu9K0CtYwbW0iMM0aPYQOnlg4jk3cZ2fk1igsokuhkq9jh7alCsgB0HR2WOsP+VT9Oa25QZ+kWR8ap6MRvaQRAe3O/+FqwTb9OW3GSe73P4XfEjCaIMLidmTMb97XX1I5P8Z8aKngUPQxOTny11sYNG+FiwTO0/Ekjn4TC5Rvxqf8TeHKB1WKWZydnzKLcUeAjTMCubhNYP5VV2zmS30FNaN+R9K/R07LhlXyUBo+SAyTw+1FRQQeqpFes7qoJvFjadWRCjXuSb89WNYH9yGh9jhx2JPfuvyrKvzGvBhz6Efs8fti8ZzIpI2RO6Dom2zIyvkUFQ3UH5KH7EEaEF03W+vuCwqn3qWMlJKDA5iVtn9FvIarX7O6Sma05oBN90xWih7WVRk1AcMpf92RyJAT5Kq8yYqvagnbguWelPQRomBfuNgVbh5P8eV7JLCfPTXLvHFFcU8Z1TC4mILzY4K9C+F6dizoAdSOjjRyKofY2o3xML1HaqxUvePWcMLaEr6wsa9D+s+dobYDweEpaEm5NPg3LmYSLH7ZEnDnwEzqZUEqjE07GXhKl6VkAE1gT3rjS87oSR2F3EOxWRcO2dSkyAev/1zK1GzAMU4M8AdHoMEhSMThQEQxc8eFM1kep4gwx9uHm/q9ZU6qe2RHe97bUriArRRGi0sZxM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LsifuEBeDw10LAh0z72x++EYaygGyQvVzQTId7QwsN6Cjoo7Z+Zfnw9t4S5kA8V1w3J3L0feCqynQthIupll6+cIywju5gYMPR2PTsvOdN1xmiyW1b7Cy8Rrsa5txCZHSvz4yqfwZ84r0NX46E0mupmGyHxIlwllEIx7FsDNnJBARKaqv3fYRA+uQPq7DdaY+cRJpRIQ4o90XQCS+rLdgDO+qFoD0N0pl7GAM=', - title='Day Numbers for 2025', - type='web_search_result', - url='https://www.epochconverter.com/days/2025', - ), - BetaWebSearchResultBlock( - encrypted_content='EosGCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDDVXhko+GaoaARLiWxoMhhwixTlmn7YeimyXIjBqLMdGYisjngIKCxw2kKV4whivBWinF+rFSah3+1JUtoRUor9o+HmU0StGZxaPydsqjgUGl0OUiZ7Dlc0YqCN8bOGaoUeUv7MpoODHTH97tj67PKZmSbEkDp0J1bJzxHd4WeL1SdNnExDsDcSk4joJFA4lBVAAgxvBogir7w/ws8fRoANAp3F4T9IoZHSQVR2PhtRpymmT1JIaelypYDnda1cLVKrOhF26o8zSp3sDKsilZRW7TSGG1YmzEEKdFK0h/jrGO9yr35kL8vzIF1vdXeJbJa79pFo8e1OLxq9Z2e3y5thBAB3aMK+WMT6n3vRaaRpG4/sqL69lUB/J8Ju1X2VAqfUhYe1GbTKVwAqv+Fllq/NQfZywAaqkHF0YqzMFNYYNB0KTpzrPetfmvXMvog2I0qn8Xuuefw6ROAgsUJaIbyY2b2AbO9Ohxlqv08Lgt/CEmghIi2I/zvt4Y5AjUZzpRUqYAomrkagze50qj5P5Mj191pU+SLehkArpjDp131C5k3jhJ/6m7EaRpv7R4JWxWZCETvqonBRkooPRYqTZkHAD61WjNrFzDOn3fOHjrK9XjQMYE6C9rLOQf/Cy3XdlJgmSa6OKzak0NhRzIA8h7O16Mlf5kaMz5gW4vhIY/luKVQCgo7O39nxitIw94BlW0u0qT0XzCFgS05ADWdIC7SHJaU8NB4x2h0zQTTX2P5m0U2giLYPO86lUWicae08l14+JUB+uPlpDhNU7UQl29SM77+XnzdGiX/Kk99k8FcMrgp6+X5riQWuE0+rBhuDzOnVhGOgFCazxWCIpXIAvYqin429shbJtttU/upLPrbj9HsXpCJjOPI7+FLK7JXH5tH3rz1OCa/14jkNd4GTg5eGNnJSDgSJ2dWxC9oRQyFub6rPc58n9BCkHzcqrF502Q4TTEfNUuQsqBMJL8yEYAw==', - title='Countdown to May 26, 2025 in Washington DC, District of Columbia', - type='web_search_result', - url="https://www.timeanddate.com/countdown/to?msg=Cressida_Glitter's+birthday&year=2025&month=5&day=26&hour=0&min=0&sec=0&fromtheme=birthday", - ), - ], - tool_call_id=IsStr(), - timestamp=IsDatetime(), - ), - TextPart( - content="""\ - - -Based on the search results, \ -""" - ), - TextPart(content='today is Monday, May 26, 2025 (Week 22)'), - TextPart(content='. This is notably '), - TextPart(content='Memorial Day, which was originally known as Decoration Day'), - TextPart(content='. '), - TextPart(content='The year 2025 is a regular year with 365 days'), - TextPart(content='.'), - ], - usage=Usage( - requests=1, - request_tokens=9582, - response_tokens=178, - total_tokens=9760, - details={ - 'cache_creation_input_tokens': 0, - 'cache_read_input_tokens': 0, - 'input_tokens': 9582, - 'output_tokens': 178, - }, - ), - model_name='claude-3-5-sonnet-20241022', - timestamp=IsDatetime(), - vendor_id=IsStr(), - ), ModelRequest(parts=[UserPromptPart(content='What day is tomorrow?', timestamp=IsDatetime())]), ModelResponse( parts=[TextPart(content='Tomorrow will be **Tuesday, May 27, 2025**.')], From 13d7433f1018a0c341a8f4139f349262f1166975 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Tue, 27 May 2025 19:32:01 +0200 Subject: [PATCH 07/34] Add support on Groq --- .pre-commit-config.yaml | 2 +- pydantic_ai_slim/pydantic_ai/models/groq.py | 16 ++- pydantic_ai_slim/pyproject.toml | 2 +- tests/models/test_groq.py | 104 ++++++++++++++++++++ uv.lock | 8 +- 5 files changed, 123 insertions(+), 9 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b2b440ec0..9c7927295 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -60,6 +60,6 @@ repos: rev: v2.3.0 hooks: - id: codespell - args: ['--skip', 'tests/models/cassettes/*,docs/a2a/fasta2a.md'] + args: ['--skip', 'tests/models/cassettes/*,docs/a2a/fasta2a.md,tests/models/test_groq.py'] additional_dependencies: - tomli diff --git a/pydantic_ai_slim/pydantic_ai/models/groq.py b/pydantic_ai_slim/pydantic_ai/models/groq.py index a440e891b..e8961bba7 100644 --- a/pydantic_ai_slim/pydantic_ai/models/groq.py +++ b/pydantic_ai_slim/pydantic_ai/models/groq.py @@ -10,7 +10,7 @@ from typing_extensions import assert_never from .. import ModelHTTPError, UnexpectedModelBehavior, _utils, usage -from .._utils import guard_tool_call_id as _guard_tool_call_id +from .._utils import generate_tool_call_id, guard_tool_call_id as _guard_tool_call_id from ..messages import ( BinaryContent, DocumentUrl, @@ -21,6 +21,8 @@ ModelResponsePart, ModelResponseStreamEvent, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ToolCallPart, @@ -205,7 +207,7 @@ async def _completions_create( extra_headers = model_settings.get('extra_headers', {}) extra_headers.setdefault('User-Agent', get_user_agent()) return await self.client.chat.completions.create( - model=str(self._model_name), + model=self._model_name, messages=groq_messages, n=1, parallel_tool_calls=model_settings.get('parallel_tool_calls', NOT_GIVEN), @@ -234,7 +236,15 @@ def _process_response(self, response: chat.ChatCompletion) -> ModelResponse: timestamp = datetime.fromtimestamp(response.created, tz=timezone.utc) choice = response.choices[0] items: list[ModelResponsePart] = [] - # TODO(Marcelo): The `choice.message.executed_tools` has the server tools executed by Groq. + if choice.message.executed_tools: + for tool in choice.message.executed_tools: + tool_call_id = generate_tool_call_id() + items.append( + ServerToolCallPart( + tool_name=tool.type, args=tool.arguments, model_name='groq', tool_call_id=tool_call_id + ) + ) + items.append(ServerToolReturnPart(tool_name=tool.type, content=tool.output, tool_call_id=tool_call_id)) if choice.message.content is not None: items.append(TextPart(content=choice.message.content)) if choice.message.tool_calls is not None: diff --git a/pydantic_ai_slim/pyproject.toml b/pydantic_ai_slim/pyproject.toml index 32c30eaa6..631251e06 100644 --- a/pydantic_ai_slim/pyproject.toml +++ b/pydantic_ai_slim/pyproject.toml @@ -66,7 +66,7 @@ cohere = ["cohere>=5.13.11; platform_system != 'Emscripten'"] vertexai = ["google-auth>=2.36.0", "requests>=2.32.2"] google = ["google-genai>=1.15.0"] anthropic = ["anthropic>=0.52.0"] -groq = ["groq>=0.15.0"] +groq = ["groq>=0.25.0"] mistral = ["mistralai>=1.2.5"] bedrock = ["boto3>=1.35.74"] # Tools diff --git a/tests/models/test_groq.py b/tests/models/test_groq.py index 89e1d8b94..ff8cda1a4 100644 --- a/tests/models/test_groq.py +++ b/tests/models/test_groq.py @@ -22,6 +22,8 @@ ModelRequest, ModelResponse, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ToolCallPart, @@ -692,3 +694,105 @@ async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_k result = await agent.run('What day is today?') assert result.output == snapshot('The current day is Tuesday.') + assert result.all_messages() == snapshot( + [ + ModelRequest(parts=[UserPromptPart(content='What day is today?', timestamp=IsDatetime())]), + ModelResponse( + parts=[ + ServerToolCallPart( + tool_name='search', + args='{"query": "What is the current date?"}', + tool_call_id='0', + model_name='groq', + ), + ServerToolReturnPart( + tool_name='search', + content="""\ +Title: Today's Date - Find Out Quickly What's The Date Today ️ +URL: https://calendarhours.com/todays-date/ +Content: The current date in RFC 2822 Format with shortened day of week, numerical date, three-letter month abbreviation, year, time, and time zone is: Tue, 13 May 2025 06:07:56 -0400; The current date in Unix Epoch Format with number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT) is: +Score: 0.8299 + +Title: Today's Date | Current date now - MaxTables +URL: https://maxtables.com/tools/todays-date.html +Content: The current date, including day of the week, month, day, and year. The exact time, down to seconds. Details on the time zone, its location, and its GMT difference. A tool to select the present date. A visual calendar chart. Why would I need to check Today's Date on this platform instead of my device? +Score: 0.7223 + +Title: Current Time and Date - Exact Time! +URL: https://time-and-calendar.com/ +Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchonizing in real time with our server clock. +Score: 0.6799 + +Title: Today's Date - CalendarDate.com +URL: https://www.calendardate.com/todays.htm +Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemishpere flip seasons - i.e. Winter is Summer. +Score: 0.6416 + +Title: What is the date today | Today's Date +URL: https://www.datetoday.info/ +Content: Master time tracking with Today's Date. Stay updated with real-time information on current date, time, day of the week, days left in the week, current day and remaining days of the year. Explore time in globally accepted formats. Keep up with the current week and month, along with the remaining weeks and months for the year. Embrace efficient time tracking with Today's Date. +Score: 0.6282 + +Title: Explore Today's Date, Time Zones, Holidays & More +URL: https://whatdateis.today/ +Content: Check what date and time it is today (May 8, 2025). View current time across different time zones, upcoming holidays, and use our date calculator. Your one-stop destination for all date and time information. +Score: 0.6181 + +Title: Today's Date and Time - Date and Time Tools +URL: https://todaysdatetime.com/ +Content: Discover today's exact date and time, learn about time zones, date formats, and explore our comprehensive collection of date and time tools including calculators, converters, and calendars. ... Get the exact current date and time, along with powerful calculation tools for all your scheduling needs. 12h. Today. Day 76 of year (366) Yesterday +Score: 0.5456 + +Title: Current Time Now - What time is it? - RapidTables.com +URL: https://www.rapidtables.com/tools/current-time.html +Content: This page includes the following information: Current time: hours, minutes, seconds. Today's date: day of week, month, day, year. Time zone with location and GMT offset. +Score: 0.4255 + +Title: Current Time +URL: https://www.timeanddate.com/ +Content: Welcome to the world's top site for time, time zones, and astronomy. Organize your life with free online info and tools you can rely on. No sign-up needed. Sign in. News. News Home; Astronomy News; ... Current Time. Monday May 12, 2025 Roanoke Rapids, North Carolina, USA. Set home location. 11:27: 03 pm. World Clock. +Score: 0.3876 + +Title: Current local time in the United States - World clock +URL: https://dateandtime.info/country.php?code=US +Content: Time and Date of DST Change Time Change; DST started: Sunday, March 9, 2025 at 2:00 AM: The clocks were put forward an hour to 3:00 AM. DST ends: Sunday, November 2, 2025 at 2:00 AM: The clocks will be put back an hour to 1:00 AM. DST starts: Sunday, March 8, 2026 at 2:00 AM: The clocks will be put forward an hour to 3:00 AM. +Score: 0.3042 + +Title: Time.is - exact time, any time zone +URL: https://time.is/ +Content: 7 million locations, 58 languages, synchronized with atomic clock time. Time.is. Get Time.is Ad-free! Exact time now: 05:08:45. Tuesday, 13 May, 2025, week 20. Sun: ↑ 05:09 ↓ 20:45 (15h 36m) - More info - Make London time default - Remove from favorite locations +Score: 0.2796 + +Title: Time in United States now +URL: https://time.is/United_States +Content: Exact time now, time zone, time difference, sunrise/sunset time and key facts for United States. Time.is. Get Time.is Ad-free! Time in United States now . 11:17:42 PM. Monday, May 12, 2025. United States (incl. dependent territories) has 11 time zones. The time zone for the capital Washington, D.C. is used here. +Score: 0.2726 + +Title: Current Local Time in the United States - timeanddate.com +URL: https://www.timeanddate.com/worldclock/usa +Content: United States time now. USA time zones and time zone map with current time in each state. +Score: 0.2519 + +Title: Current local time in United States - World Time Clock & Map +URL: https://24timezones.com/United-States/time +Content: Check the current time in United States and time zone information, the UTC offset and daylight saving time dates in 2025. +Score: 0.2221 + +Title: The World Clock — Worldwide - timeanddate.com +URL: https://www.timeanddate.com/worldclock/ +Content: World time and date for cities in all time zones. International time right now. Takes into account all DST clock changes. +Score: 0.2134 + +""", + tool_call_id='0', + timestamp=IsDatetime(), + ), + TextPart(content='The current day is Tuesday.'), + ], + usage=Usage(requests=1, request_tokens=4287, response_tokens=117, total_tokens=4404), + model_name='compound-beta', + timestamp=IsDatetime(), + vendor_id='stub', + ), + ] + ) diff --git a/uv.lock b/uv.lock index 7430a3533..c90962185 100644 --- a/uv.lock +++ b/uv.lock @@ -1288,7 +1288,7 @@ wheels = [ [[package]] name = "groq" -version = "0.18.0" +version = "0.25.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio" }, @@ -1298,9 +1298,9 @@ dependencies = [ { name = "sniffio" }, { name = "typing-extensions" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/40/8c/e72c164474a88dfed6c7327ad53cb87ff11566b74b3a76d41dc7b94fc51c/groq-0.18.0.tar.gz", hash = "sha256:8e2ccfea406d68b3525af4b7c0e321fcb3d2a73fc60bb70b4156e6cd88c72f03", size = 117322, upload-time = "2025-02-05T01:30:14.551Z" } +sdist = { url = "https://files.pythonhosted.org/packages/a4/fc/29e9c24ab59602747027f41b9d761d24cf9e5771014c9a731137f51e9cce/groq-0.25.0.tar.gz", hash = "sha256:6e1c7466b0da0130498187b825bd239f86fb77bf7551eacfbfa561d75048746a", size = 128199, upload-time = "2025-05-16T19:57:43.381Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/b0/6c/5a53d632b44ef7655ac8d9b34432e13160917f9307c94b1467efd34e336e/groq-0.18.0-py3-none-any.whl", hash = "sha256:81d5ac00057a45d8ce559d23ab5d3b3893011d1f12c35187ab35a9182d826ea6", size = 121911, upload-time = "2025-02-05T01:30:12.504Z" }, + { url = "https://files.pythonhosted.org/packages/4d/11/1019a6cfdb2e520cb461cf70d859216be8ca122ddf5ad301fc3b0ee45fd4/groq-0.25.0-py3-none-any.whl", hash = "sha256:aadc78b40b1809cdb196b1aa8c7f7293108767df1508cafa3e0d5045d9328e7a", size = 129371, upload-time = "2025-05-16T19:57:41.786Z" }, ] [[package]] @@ -3081,7 +3081,7 @@ requires-dist = [ { name = "google-auth", marker = "extra == 'vertexai'", specifier = ">=2.36.0" }, { name = "google-genai", marker = "extra == 'google'", specifier = ">=1.15.0" }, { name = "griffe", specifier = ">=1.3.2" }, - { name = "groq", marker = "extra == 'groq'", specifier = ">=0.15.0" }, + { name = "groq", marker = "extra == 'groq'", specifier = ">=0.25.0" }, { name = "httpx", specifier = ">=0.27" }, { name = "logfire", marker = "extra == 'logfire'", specifier = ">=3.11.0" }, { name = "mcp", marker = "python_full_version >= '3.10' and extra == 'mcp'", specifier = ">=1.6.0" }, From ac852052b581a767f31c85fe088e1fa38e8dfde1 Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Wed, 28 May 2025 11:59:40 +0200 Subject: [PATCH 08/34] Add support for Google --- pydantic_ai_slim/pydantic_ai/builtin_tools.py | 6 +- pydantic_ai_slim/pydantic_ai/models/google.py | 11 + ...test_google_model_code_execution_tool.yaml | 71 +++++++ .../test_google_model_web_search_tool.yaml | 199 ++++++++++++++++++ tests/models/test_google.py | 17 ++ 5 files changed, 302 insertions(+), 2 deletions(-) create mode 100644 tests/models/cassettes/test_google/test_google_model_code_execution_tool.yaml create mode 100644 tests/models/cassettes/test_google/test_google_model_web_search_tool.yaml diff --git a/pydantic_ai_slim/pydantic_ai/builtin_tools.py b/pydantic_ai_slim/pydantic_ai/builtin_tools.py index 82bb33e5f..46cc7b628 100644 --- a/pydantic_ai_slim/pydantic_ai/builtin_tools.py +++ b/pydantic_ai_slim/pydantic_ai/builtin_tools.py @@ -2,7 +2,7 @@ from abc import ABC from dataclasses import dataclass -from typing import Literal +from typing import Any, Literal from typing_extensions import TypedDict @@ -15,9 +15,11 @@ class AbstractBuiltinTool(ABC): This class is abstract and cannot be instantiated directly. - The builtin tools are are passed to the model as part of the `ModelRequestParameters`. + The builtin tools are passed to the model as part of the `ModelRequestParameters`. """ + def handle_custom_tool_definition(self, model: str) -> Any: ... + @dataclass class WebSearchTool(AbstractBuiltinTool): diff --git a/pydantic_ai_slim/pydantic_ai/models/google.py b/pydantic_ai_slim/pydantic_ai/models/google.py index 0310d9c27..2360c5946 100644 --- a/pydantic_ai_slim/pydantic_ai/models/google.py +++ b/pydantic_ai_slim/pydantic_ai/models/google.py @@ -11,6 +11,7 @@ from typing_extensions import assert_never +from pydantic_ai.builtin_tools import CodeExecutionTool, WebSearchTool from pydantic_ai.providers import Provider from .. import UnexpectedModelBehavior, UserError, _utils, usage @@ -55,10 +56,12 @@ FunctionDeclarationDict, GenerateContentConfigDict, GenerateContentResponse, + GoogleSearchDict, Part, PartDict, SafetySettingDict, ThinkingConfigDict, + ToolCodeExecutionDict, ToolConfigDict, ToolDict, ToolListUnionDict, @@ -192,6 +195,7 @@ def _customize_tool_def(t: ToolDefinition): return ModelRequestParameters( function_tools=[_customize_tool_def(tool) for tool in model_request_parameters.function_tools], + builtin_tools=model_request_parameters.builtin_tools, allow_text_output=model_request_parameters.allow_text_output, output_tools=[_customize_tool_def(tool) for tool in model_request_parameters.output_tools], ) @@ -216,6 +220,13 @@ def _get_tools(self, model_request_parameters: ModelRequestParameters) -> list[T ToolDict(function_declarations=[_function_declaration_from_tool(t)]) for t in model_request_parameters.output_tools ] + for tool in model_request_parameters.builtin_tools: + if isinstance(tool, WebSearchTool): + tools.append(ToolDict(google_search=GoogleSearchDict())) + elif isinstance(tool, CodeExecutionTool): + tools.append(ToolDict(code_execution=ToolCodeExecutionDict())) + else: + raise UserError(f'Unsupported builtin tool: {tool}') return tools or None def _get_tool_config( diff --git a/tests/models/cassettes/test_google/test_google_model_code_execution_tool.yaml b/tests/models/cassettes/test_google/test_google_model_code_execution_tool.yaml new file mode 100644 index 000000000..18aac0b64 --- /dev/null +++ b/tests/models/cassettes/test_google/test_google_model_code_execution_tool.yaml @@ -0,0 +1,71 @@ +interactions: +- request: + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '234' + content-type: + - application/json + host: + - generativelanguage.googleapis.com + method: POST + parsed_body: + contents: + - parts: + - text: What day is today in Utrecht? + role: user + generationConfig: {} + systemInstruction: + parts: + - text: You are a helpful chatbot. + role: user + tools: + - codeExecution: {} + uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent + response: + headers: + alt-svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + content-length: + - '824' + content-type: + - application/json; charset=UTF-8 + server-timing: + - gfet4t7; dur=634 + transfer-encoding: + - chunked + vary: + - Origin + - X-Origin + - Referer + parsed_body: + candidates: + - content: + parts: + - text: | + To give you the exact day in Utrecht, I need to know the current date. Can you please provide the date? I can then determine the day. + role: model + finishReason: STOP + modelVersion: gemini-2.0-flash + responseId: WN42aLH_CoKZgLUP97W1wQg + usageMetadata: + candidatesTokenCount: 32 + candidatesTokensDetails: + - modality: TEXT + tokenCount: 32 + promptTokenCount: 13 + promptTokensDetails: + - modality: TEXT + tokenCount: 13 + toolUsePromptTokensDetails: + - modality: TEXT + totalTokenCount: 45 + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/cassettes/test_google/test_google_model_web_search_tool.yaml b/tests/models/cassettes/test_google/test_google_model_web_search_tool.yaml new file mode 100644 index 000000000..e880750ac --- /dev/null +++ b/tests/models/cassettes/test_google/test_google_model_web_search_tool.yaml @@ -0,0 +1,199 @@ +interactions: +- request: + headers: + accept: + - '*/*' + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '233' + content-type: + - application/json + host: + - generativelanguage.googleapis.com + method: POST + parsed_body: + contents: + - parts: + - text: What day is today in Utrecht? + role: user + generationConfig: {} + systemInstruction: + parts: + - text: You are a helpful chatbot. + role: user + tools: + - googleSearch: {} + uri: https://generativelanguage.googleapis.com/v1beta/models/gemini-2.0-flash:generateContent + response: + headers: + alt-svc: + - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 + content-length: + - '5991' + content-type: + - application/json; charset=UTF-8 + server-timing: + - gfet4t7; dur=1340 + transfer-encoding: + - chunked + vary: + - Origin + - X-Origin + - Referer + parsed_body: + candidates: + - content: + parts: + - text: | + Today is Wednesday, May 28, 2025, in Utrecht. + role: model + finishReason: STOP + groundingMetadata: + retrievalMetadata: {} + searchEntryPoint: + renderedContent: | + +
+
+ + + + + + + + + + + + + +
+
+ +
+ webSearchQueries: + - current date Utrecht + modelVersion: gemini-2.0-flash + responseId: LN42aKzNCaqvgLUP1Lz-8As + usageMetadata: + candidatesTokenCount: 19 + candidatesTokensDetails: + - modality: TEXT + tokenCount: 19 + promptTokenCount: 13 + promptTokensDetails: + - modality: TEXT + tokenCount: 13 + totalTokenCount: 32 + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/test_google.py b/tests/models/test_google.py index 7e17454c6..0338b4571 100644 --- a/tests/models/test_google.py +++ b/tests/models/test_google.py @@ -13,6 +13,7 @@ from typing_extensions import TypedDict from pydantic_ai.agent import Agent +from pydantic_ai.builtin_tools import CodeExecutionTool, WebSearchTool from pydantic_ai.exceptions import ModelRetry, UnexpectedModelBehavior from pydantic_ai.messages import ( BinaryContent, @@ -529,3 +530,19 @@ async def test_google_model_safety_settings(allow_model_requests: None, google_p with pytest.raises(UnexpectedModelBehavior, match='Safety settings triggered'): await agent.run('Tell me a joke about a Brazilians.') + + +async def test_google_model_web_search_tool(allow_model_requests: None, google_provider: GoogleProvider): + m = GoogleModel('gemini-2.0-flash', provider=google_provider) + agent = Agent(m, system_prompt='You are a helpful chatbot.', builtin_tools=[WebSearchTool()]) + + result = await agent.run('What day is today in Utrecht?') + assert result.output == snapshot('Today is Wednesday, May 28, 2025, in Utrecht.\n') + + +async def test_google_model_code_execution_tool(allow_model_requests: None, google_provider: GoogleProvider): + m = GoogleModel('gemini-2.0-flash', provider=google_provider) + agent = Agent(m, system_prompt='You are a helpful chatbot.', builtin_tools=[CodeExecutionTool()]) + + result = await agent.run('What day is today in Utrecht?') + assert result.output == snapshot('Today is Wednesday, May 28, 2025, in Utrecht.\n') From c93633f13469c1623544d226cb900f1273ee3d53 Mon Sep 17 00:00:00 2001 From: Brandon Shar <6599653+BrandonShar@users.noreply.github.com> Date: Mon, 26 May 2025 13:49:53 -0400 Subject: [PATCH 09/34] Add support for MCP's Streamable HTTP transport (#1716) --- docs/mcp/client.md | 15 +++-- pydantic_ai_slim/pydantic_ai/mcp.py | 91 ++++++++++++++++++----------- pydantic_ai_slim/pyproject.toml | 2 +- tests/test_mcp.py | 43 +++++++++----- uv.lock | 11 ++-- 5 files changed, 101 insertions(+), 61 deletions(-) diff --git a/docs/mcp/client.md b/docs/mcp/client.md index 4b643d493..b1a5994d8 100644 --- a/docs/mcp/client.md +++ b/docs/mcp/client.md @@ -18,24 +18,23 @@ pip/uv-add "pydantic-ai-slim[mcp]" PydanticAI comes with two ways to connect to MCP servers: -- [`MCPServerHTTP`][pydantic_ai.mcp.MCPServerHTTP] which connects to an MCP server using the [HTTP SSE](https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#http-with-sse) transport +- [`MCPServerHTTP`][pydantic_ai.mcp.MCPServerHTTP] which connects to an MCP server using the [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) transport - [`MCPServerStdio`][pydantic_ai.mcp.MCPServerStdio] which runs the server as a subprocess and connects to it using the [stdio](https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#stdio) transport Examples of both are shown below; [mcp-run-python](run-python.md) is used as the MCP server in both examples. -### SSE Client +### HTTP Client -[`MCPServerHTTP`][pydantic_ai.mcp.MCPServerHTTP] connects over HTTP using the [HTTP + Server Sent Events transport](https://spec.modelcontextprotocol.io/specification/2024-11-05/basic/transports/#http-with-sse) to a server. +[`MCPServerHTTP`][pydantic_ai.mcp.MCPServerHTTP] connects over HTTP using the [Streamable HTTP transport](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports#streamable-http) to a server. !!! note [`MCPServerHTTP`][pydantic_ai.mcp.MCPServerHTTP] requires an MCP server to be running and accepting HTTP connections before calling [`agent.run_mcp_servers()`][pydantic_ai.Agent.run_mcp_servers]. Running the server is not managed by PydanticAI. -The name "HTTP" is used since this implemented will be adapted in future to use the new -[Streamable HTTP](https://github.com/modelcontextprotocol/specification/pull/206) currently in development. +The StreamableHTTP Transport is able to connect to both stateless HTTP and older Server Sent Events (SSE) servers. -Before creating the SSE client, we need to run the server (docs [here](run-python.md)): +Before creating the HTTP client, we need to run the server (docs [here](run-python.md)): -```bash {title="terminal (run sse server)"} +```bash {title="terminal (run http server)"} deno run \ -N -R=node_modules -W=node_modules --node-modules-dir=auto \ jsr:@pydantic/mcp-run-python sse @@ -56,7 +55,7 @@ async def main(): #> There are 9,208 days between January 1, 2000, and March 18, 2025. ``` -1. Define the MCP server with the URL used to connect. +1. Define the MCP server with the URL used to connect. This will typically end in `/mcp` for HTTP servers and `/sse` for SSE. 2. Create an agent with the MCP server attached. 3. Create a client session to connect to the server. diff --git a/pydantic_ai_slim/pydantic_ai/mcp.py b/pydantic_ai_slim/pydantic_ai/mcp.py index 3be1146ad..d4402f125 100644 --- a/pydantic_ai_slim/pydantic_ai/mcp.py +++ b/pydantic_ai_slim/pydantic_ai/mcp.py @@ -2,20 +2,22 @@ import base64 import json +import warnings from abc import ABC, abstractmethod from collections.abc import AsyncIterator, Sequence from contextlib import AsyncExitStack, asynccontextmanager from dataclasses import dataclass +from datetime import timedelta from pathlib import Path from types import TracebackType from typing import Any from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream +from mcp.shared.message import SessionMessage from mcp.types import ( BlobResourceContents, EmbeddedResource, ImageContent, - JSONRPCMessage, LoggingLevel, TextContent, TextResourceContents, @@ -28,8 +30,8 @@ try: from mcp.client.session import ClientSession - from mcp.client.sse import sse_client from mcp.client.stdio import StdioServerParameters, stdio_client + from mcp.client.streamable_http import streamablehttp_client except ImportError as _import_error: raise ImportError( 'Please install the `mcp` package to use the MCP server, ' @@ -55,8 +57,8 @@ class MCPServer(ABC): """ _client: ClientSession - _read_stream: MemoryObjectReceiveStream[JSONRPCMessage | Exception] - _write_stream: MemoryObjectSendStream[JSONRPCMessage] + _read_stream: MemoryObjectReceiveStream[SessionMessage | Exception] + _write_stream: MemoryObjectSendStream[SessionMessage] _exit_stack: AsyncExitStack @abstractmethod @@ -64,10 +66,7 @@ class MCPServer(ABC): async def client_streams( self, ) -> AsyncIterator[ - tuple[ - MemoryObjectReceiveStream[JSONRPCMessage | Exception], - MemoryObjectSendStream[JSONRPCMessage], - ] + tuple[MemoryObjectReceiveStream[SessionMessage | Exception], MemoryObjectSendStream[SessionMessage]] ]: """Create the streams for the MCP server.""" raise NotImplementedError('MCP Server subclasses must implement this method.') @@ -256,10 +255,7 @@ async def main(): async def client_streams( self, ) -> AsyncIterator[ - tuple[ - MemoryObjectReceiveStream[JSONRPCMessage | Exception], - MemoryObjectSendStream[JSONRPCMessage], - ] + tuple[MemoryObjectReceiveStream[SessionMessage | Exception], MemoryObjectSendStream[SessionMessage]] ]: server = StdioServerParameters(command=self.command, args=list(self.args), env=self.env, cwd=self.cwd) async with stdio_client(server=server) as (read_stream, write_stream): @@ -276,11 +272,11 @@ def __repr__(self) -> str: class MCPServerHTTP(MCPServer): """An MCP server that connects over streamable HTTP connections. - This class implements the SSE transport from the MCP specification. - See for more information. + This class implements the Streamable HTTP transport from the MCP specification. + See for more information. - The name "HTTP" is used since this implemented will be adapted in future to use the new - [Streamable HTTP](https://github.com/modelcontextprotocol/specification/pull/206) currently in development. + The Streamable HTTP transport is intended to replace the SSE transport from the previous protocol, but it is fully + backwards compatible with SSE-based servers. !!! note Using this class as an async context manager will create a new pool of HTTP connections to connect @@ -291,7 +287,7 @@ class MCPServerHTTP(MCPServer): from pydantic_ai import Agent from pydantic_ai.mcp import MCPServerHTTP - server = MCPServerHTTP('http://localhost:3001/sse') # (1)! + server = MCPServerHTTP('http://localhost:3001/mcp') # (1)! agent = Agent('openai:gpt-4o', mcp_servers=[server]) async def main(): @@ -304,27 +300,27 @@ async def main(): """ url: str - """The URL of the SSE endpoint on the MCP server. + """The URL of the SSE or MCP endpoint on the MCP server. - For example for a server running locally, this might be `http://localhost:3001/sse`. + For example for a server running locally, this might be `http://localhost:3001/mcp`. """ headers: dict[str, Any] | None = None - """Optional HTTP headers to be sent with each request to the SSE endpoint. + """Optional HTTP headers to be sent with each request to the endpoint. These headers will be passed directly to the underlying `httpx.AsyncClient`. Useful for authentication, custom headers, or other HTTP-specific configurations. """ - timeout: float = 5 - """Initial connection timeout in seconds for establishing the SSE connection. + timeout: timedelta | float = timedelta(seconds=5) + """Initial connection timeout as a timedelta for establishing the connection. This timeout applies to the initial connection setup and handshake. If the connection cannot be established within this time, the operation will fail. """ - sse_read_timeout: float = 60 * 5 - """Maximum time in seconds to wait for new SSE messages before timing out. + sse_read_timeout: timedelta | float = timedelta(minutes=5) + """Maximum time as a timedelta to wait for new SSE messages before timing out. This timeout applies to the long-lived SSE connection after it's established. If no new messages are received within this time, the connection will be considered stale @@ -346,21 +342,48 @@ async def main(): For example, if `tool_prefix='foo'`, then a tool named `bar` will be registered as `foo_bar` """ + def __post_init__(self): + if not isinstance(self.timeout, timedelta): + warnings.warn( + 'Passing timeout as a float has been deprecated, please use a timedelta instead.', + DeprecationWarning, + stacklevel=2, + ) + self.timeout = timedelta(seconds=self.timeout) + + if not isinstance(self.sse_read_timeout, timedelta): + warnings.warn( + 'Passing sse_read_timeout as a float has been deprecated, please use a timedelta instead.', + DeprecationWarning, + stacklevel=2, + ) + self.sse_read_timeout = timedelta(seconds=self.sse_read_timeout) + @asynccontextmanager async def client_streams( self, ) -> AsyncIterator[ - tuple[ - MemoryObjectReceiveStream[JSONRPCMessage | Exception], - MemoryObjectSendStream[JSONRPCMessage], - ] + tuple[MemoryObjectReceiveStream[SessionMessage | Exception], MemoryObjectSendStream[SessionMessage]] ]: # pragma: no cover - async with sse_client( - url=self.url, - headers=self.headers, - timeout=self.timeout, - sse_read_timeout=self.sse_read_timeout, - ) as (read_stream, write_stream): + if not isinstance(self.timeout, timedelta): + warnings.warn( + 'Passing timeout as a float has been deprecated, please use a timedelta instead.', + DeprecationWarning, + stacklevel=2, + ) + self.timeout = timedelta(seconds=self.timeout) + + if not isinstance(self.sse_read_timeout, timedelta): + warnings.warn( + 'Passing sse_read_timeout as a float has been deprecated, please use a timedelta instead.', + DeprecationWarning, + stacklevel=2, + ) + self.sse_read_timeout = timedelta(seconds=self.sse_read_timeout) + + async with streamablehttp_client( + url=self.url, headers=self.headers, timeout=self.timeout, sse_read_timeout=self.sse_read_timeout + ) as (read_stream, write_stream, _): yield read_stream, write_stream def _get_log_level(self) -> LoggingLevel | None: diff --git a/pydantic_ai_slim/pyproject.toml b/pydantic_ai_slim/pyproject.toml index 631251e06..5ae4850ec 100644 --- a/pydantic_ai_slim/pyproject.toml +++ b/pydantic_ai_slim/pyproject.toml @@ -75,7 +75,7 @@ tavily = ["tavily-python>=0.5.0"] # CLI cli = ["rich>=13", "prompt-toolkit>=3", "argcomplete>=3.5.0"] # MCP -mcp = ["mcp>=1.6.0; python_version >= '3.10'"] +mcp = ["mcp>=1.8.0; python_version >= '3.10'"] # Evals evals = ["pydantic-evals=={{ version }}"] # A2A diff --git a/tests/test_mcp.py b/tests/test_mcp.py index 735f76e55..ab3d9b9db 100644 --- a/tests/test_mcp.py +++ b/tests/test_mcp.py @@ -1,6 +1,7 @@ """Tests for the MCP (Model Context Protocol) server implementation.""" import re +from datetime import timedelta from pathlib import Path import pytest @@ -70,25 +71,41 @@ async def test_stdio_server_with_cwd(): assert len(tools) == 10 -def test_sse_server(): - sse_server = MCPServerHTTP(url='http://localhost:8000/sse') - assert sse_server.url == 'http://localhost:8000/sse' - assert sse_server._get_log_level() is None # pyright: ignore[reportPrivateUsage] +def test_http_server(): + http_server = MCPServerHTTP(url='http://localhost:8000/sse') + assert http_server.url == 'http://localhost:8000/sse' + assert http_server._get_log_level() is None # pyright: ignore[reportPrivateUsage] -def test_sse_server_with_header_and_timeout(): - sse_server = MCPServerHTTP( +def test_http_server_with_header_and_timeout(): + http_server = MCPServerHTTP( url='http://localhost:8000/sse', headers={'my-custom-header': 'my-header-value'}, - timeout=10, - sse_read_timeout=100, + timeout=timedelta(seconds=10), + sse_read_timeout=timedelta(seconds=100), log_level='info', ) - assert sse_server.url == 'http://localhost:8000/sse' - assert sse_server.headers is not None and sse_server.headers['my-custom-header'] == 'my-header-value' - assert sse_server.timeout == 10 - assert sse_server.sse_read_timeout == 100 - assert sse_server._get_log_level() == 'info' # pyright: ignore[reportPrivateUsage] + assert http_server.url == 'http://localhost:8000/sse' + assert http_server.headers is not None and http_server.headers['my-custom-header'] == 'my-header-value' + assert http_server.timeout == timedelta(seconds=10) + assert http_server.sse_read_timeout == timedelta(seconds=100) + assert http_server._get_log_level() == 'info' # pyright: ignore[reportPrivateUsage] + + +def test_http_server_with_deprecated_arguments(): + with pytest.warns(DeprecationWarning): + http_server = MCPServerHTTP( + url='http://localhost:8000/sse', + headers={'my-custom-header': 'my-header-value'}, + timeout=10, + sse_read_timeout=100, + log_level='info', + ) + assert http_server.url == 'http://localhost:8000/sse' + assert http_server.headers is not None and http_server.headers['my-custom-header'] == 'my-header-value' + assert http_server.timeout == timedelta(seconds=10) + assert http_server.sse_read_timeout == timedelta(seconds=100) + assert http_server._get_log_level() == 'info' # pyright: ignore[reportPrivateUsage] @pytest.mark.vcr() diff --git a/uv.lock b/uv.lock index c90962185..971ba7868 100644 --- a/uv.lock +++ b/uv.lock @@ -1748,7 +1748,7 @@ wheels = [ [[package]] name = "mcp" -version = "1.6.0" +version = "1.9.0" source = { registry = "https://pypi.org/simple" } dependencies = [ { name = "anyio", marker = "python_full_version >= '3.10'" }, @@ -1756,13 +1756,14 @@ dependencies = [ { name = "httpx-sse", marker = "python_full_version >= '3.10'" }, { name = "pydantic", marker = "python_full_version >= '3.10'" }, { name = "pydantic-settings", marker = "python_full_version >= '3.10'" }, + { name = "python-multipart", marker = "python_full_version >= '3.10'" }, { name = "sse-starlette", marker = "python_full_version >= '3.10'" }, { name = "starlette", marker = "python_full_version >= '3.10'" }, - { name = "uvicorn", marker = "python_full_version >= '3.10'" }, + { name = "uvicorn", marker = "python_full_version >= '3.10' and sys_platform != 'emscripten'" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/95/d2/f587cb965a56e992634bebc8611c5b579af912b74e04eb9164bd49527d21/mcp-1.6.0.tar.gz", hash = "sha256:d9324876de2c5637369f43161cd71eebfd803df5a95e46225cab8d280e366723", size = 200031, upload-time = "2025-03-27T16:46:32.336Z" } +sdist = { url = "https://files.pythonhosted.org/packages/bc/8d/0f4468582e9e97b0a24604b585c651dfd2144300ecffd1c06a680f5c8861/mcp-1.9.0.tar.gz", hash = "sha256:905d8d208baf7e3e71d70c82803b89112e321581bcd2530f9de0fe4103d28749", size = 281432, upload-time = "2025-05-15T18:51:06.615Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/10/30/20a7f33b0b884a9d14dd3aa94ff1ac9da1479fe2ad66dd9e2736075d2506/mcp-1.6.0-py3-none-any.whl", hash = "sha256:7bd24c6ea042dbec44c754f100984d186620d8b841ec30f1b19eda9b93a634d0", size = 76077, upload-time = "2025-03-27T16:46:29.919Z" }, + { url = "https://files.pythonhosted.org/packages/a5/d5/22e36c95c83c80eb47c83f231095419cf57cf5cca5416f1c960032074c78/mcp-1.9.0-py3-none-any.whl", hash = "sha256:9dfb89c8c56f742da10a5910a1f64b0d2ac2c3ed2bd572ddb1cfab7f35957178", size = 125082, upload-time = "2025-05-15T18:51:04.916Z" }, ] [package.optional-dependencies] @@ -3084,7 +3085,7 @@ requires-dist = [ { name = "groq", marker = "extra == 'groq'", specifier = ">=0.25.0" }, { name = "httpx", specifier = ">=0.27" }, { name = "logfire", marker = "extra == 'logfire'", specifier = ">=3.11.0" }, - { name = "mcp", marker = "python_full_version >= '3.10' and extra == 'mcp'", specifier = ">=1.6.0" }, + { name = "mcp", marker = "python_full_version >= '3.10' and extra == 'mcp'", specifier = ">=1.8.0" }, { name = "mistralai", marker = "extra == 'mistral'", specifier = ">=1.2.5" }, { name = "openai", marker = "extra == 'openai'", specifier = ">=1.75.0" }, { name = "opentelemetry-api", specifier = ">=1.28.0" }, From 3a8b640947e987401b63c3e813fb64f4bb79eb6e Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Tue, 27 May 2025 15:24:21 +0200 Subject: [PATCH 10/34] Timeout for initializing MCP client (#1833) --- pydantic_ai_slim/pydantic_ai/mcp.py | 68 +++++++++++++---------------- tests/test_mcp.py | 29 ++++++------ 2 files changed, 45 insertions(+), 52 deletions(-) diff --git a/pydantic_ai_slim/pydantic_ai/mcp.py b/pydantic_ai_slim/pydantic_ai/mcp.py index d4402f125..d062fd938 100644 --- a/pydantic_ai_slim/pydantic_ai/mcp.py +++ b/pydantic_ai_slim/pydantic_ai/mcp.py @@ -2,7 +2,6 @@ import base64 import json -import warnings from abc import ABC, abstractmethod from collections.abc import AsyncIterator, Sequence from contextlib import AsyncExitStack, asynccontextmanager @@ -12,6 +11,7 @@ from types import TracebackType from typing import Any +import anyio from anyio.streams.memory import MemoryObjectReceiveStream, MemoryObjectSendStream from mcp.shared.message import SessionMessage from mcp.types import ( @@ -77,6 +77,9 @@ def _get_log_level(self) -> LoggingLevel | None: """Get the log level for the MCP server.""" raise NotImplementedError('MCP Server subclasses must implement this method.') + def _get_client_initialize_timeout(self) -> float: + return 5 # pragma: no cover + def get_prefixed_tool_name(self, tool_name: str) -> str: """Get the tool name with prefix if `tool_prefix` is set.""" return f'{self.tool_prefix}_{tool_name}' if self.tool_prefix else tool_name @@ -136,7 +139,9 @@ async def __aenter__(self) -> Self: client = ClientSession(read_stream=self._read_stream, write_stream=self._write_stream) self._client = await self._exit_stack.enter_async_context(client) - await self._client.initialize() + with anyio.fail_after(self._get_client_initialize_timeout()): + await self._client.initialize() + if log_level := self._get_log_level(): await self._client.set_logging_level(log_level) self.is_running = True @@ -251,6 +256,9 @@ async def main(): e.g. if `tool_prefix='foo'`, then a tool named `bar` will be registered as `foo_bar` """ + timeout: float = 5 + """ The timeout in seconds to wait for the client to initialize.""" + @asynccontextmanager async def client_streams( self, @@ -267,6 +275,9 @@ def _get_log_level(self) -> LoggingLevel | None: def __repr__(self) -> str: return f'MCPServerStdio(command={self.command!r}, args={self.args!r}, tool_prefix={self.tool_prefix!r})' + def _get_client_initialize_timeout(self) -> float: + return self.timeout + @dataclass class MCPServerHTTP(MCPServer): @@ -312,15 +323,15 @@ async def main(): Useful for authentication, custom headers, or other HTTP-specific configurations. """ - timeout: timedelta | float = timedelta(seconds=5) - """Initial connection timeout as a timedelta for establishing the connection. + timeout: float = 5 + """Initial connection timeout in seconds for establishing the connection. This timeout applies to the initial connection setup and handshake. If the connection cannot be established within this time, the operation will fail. """ - sse_read_timeout: timedelta | float = timedelta(minutes=5) - """Maximum time as a timedelta to wait for new SSE messages before timing out. + sse_read_timeout: float = 300 + """Maximum time as in seconds to wait for new SSE messages before timing out. This timeout applies to the long-lived SSE connection after it's established. If no new messages are received within this time, the connection will be considered stale @@ -343,21 +354,14 @@ async def main(): """ def __post_init__(self): - if not isinstance(self.timeout, timedelta): - warnings.warn( - 'Passing timeout as a float has been deprecated, please use a timedelta instead.', - DeprecationWarning, - stacklevel=2, - ) - self.timeout = timedelta(seconds=self.timeout) + # streamablehttp_client expects timedeltas, so we accept them too to match, + # but primarily work with floats for a simpler user API. - if not isinstance(self.sse_read_timeout, timedelta): - warnings.warn( - 'Passing sse_read_timeout as a float has been deprecated, please use a timedelta instead.', - DeprecationWarning, - stacklevel=2, - ) - self.sse_read_timeout = timedelta(seconds=self.sse_read_timeout) + if isinstance(self.timeout, timedelta): + self.timeout = self.timeout.total_seconds() + + if isinstance(self.sse_read_timeout, timedelta): + self.sse_read_timeout = self.sse_read_timeout.total_seconds() @asynccontextmanager async def client_streams( @@ -365,24 +369,11 @@ async def client_streams( ) -> AsyncIterator[ tuple[MemoryObjectReceiveStream[SessionMessage | Exception], MemoryObjectSendStream[SessionMessage]] ]: # pragma: no cover - if not isinstance(self.timeout, timedelta): - warnings.warn( - 'Passing timeout as a float has been deprecated, please use a timedelta instead.', - DeprecationWarning, - stacklevel=2, - ) - self.timeout = timedelta(seconds=self.timeout) - - if not isinstance(self.sse_read_timeout, timedelta): - warnings.warn( - 'Passing sse_read_timeout as a float has been deprecated, please use a timedelta instead.', - DeprecationWarning, - stacklevel=2, - ) - self.sse_read_timeout = timedelta(seconds=self.sse_read_timeout) - async with streamablehttp_client( - url=self.url, headers=self.headers, timeout=self.timeout, sse_read_timeout=self.sse_read_timeout + url=self.url, + headers=self.headers, + timeout=timedelta(seconds=self.timeout), + sse_read_timeout=timedelta(self.sse_read_timeout), ) as (read_stream, write_stream, _): yield read_stream, write_stream @@ -391,3 +382,6 @@ def _get_log_level(self) -> LoggingLevel | None: def __repr__(self) -> str: # pragma: no cover return f'MCPServerHTTP(url={self.url!r}, tool_prefix={self.tool_prefix!r})' + + def _get_client_initialize_timeout(self) -> float: # pragma: no cover + return self.timeout diff --git a/tests/test_mcp.py b/tests/test_mcp.py index ab3d9b9db..ee95885ff 100644 --- a/tests/test_mcp.py +++ b/tests/test_mcp.py @@ -81,30 +81,29 @@ def test_http_server_with_header_and_timeout(): http_server = MCPServerHTTP( url='http://localhost:8000/sse', headers={'my-custom-header': 'my-header-value'}, - timeout=timedelta(seconds=10), - sse_read_timeout=timedelta(seconds=100), + timeout=10, + sse_read_timeout=100, log_level='info', ) assert http_server.url == 'http://localhost:8000/sse' assert http_server.headers is not None and http_server.headers['my-custom-header'] == 'my-header-value' - assert http_server.timeout == timedelta(seconds=10) - assert http_server.sse_read_timeout == timedelta(seconds=100) + assert http_server.timeout == 10 + assert http_server.sse_read_timeout == 100 assert http_server._get_log_level() == 'info' # pyright: ignore[reportPrivateUsage] -def test_http_server_with_deprecated_arguments(): - with pytest.warns(DeprecationWarning): - http_server = MCPServerHTTP( - url='http://localhost:8000/sse', - headers={'my-custom-header': 'my-header-value'}, - timeout=10, - sse_read_timeout=100, - log_level='info', - ) +def test_http_server_with_timedelta_arguments(): + http_server = MCPServerHTTP( + url='http://localhost:8000/sse', + headers={'my-custom-header': 'my-header-value'}, + timeout=timedelta(seconds=10), # type: ignore[arg-type] + sse_read_timeout=timedelta(seconds=100), # type: ignore[arg-type] + log_level='info', + ) assert http_server.url == 'http://localhost:8000/sse' assert http_server.headers is not None and http_server.headers['my-custom-header'] == 'my-header-value' - assert http_server.timeout == timedelta(seconds=10) - assert http_server.sse_read_timeout == timedelta(seconds=100) + assert http_server.timeout == 10 + assert http_server.sse_read_timeout == 100 assert http_server._get_log_level() == 'info' # pyright: ignore[reportPrivateUsage] From 360de874b7ec0ce2e35ba05688e11b7f839845f8 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Tue, 27 May 2025 15:36:32 +0200 Subject: [PATCH 11/34] Require mcp 1.9.0+ (#1840) --- pydantic_ai_slim/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydantic_ai_slim/pyproject.toml b/pydantic_ai_slim/pyproject.toml index 5ae4850ec..3625c392d 100644 --- a/pydantic_ai_slim/pyproject.toml +++ b/pydantic_ai_slim/pyproject.toml @@ -75,7 +75,7 @@ tavily = ["tavily-python>=0.5.0"] # CLI cli = ["rich>=13", "prompt-toolkit>=3", "argcomplete>=3.5.0"] # MCP -mcp = ["mcp>=1.8.0; python_version >= '3.10'"] +mcp = ["mcp>=1.9.0; python_version >= '3.10'"] # Evals evals = ["pydantic-evals=={{ version }}"] # A2A From cb4e539c278bfe5b63da43147ab559f384609810 Mon Sep 17 00:00:00 2001 From: oscar-broman Date: Tue, 27 May 2025 19:55:39 +0400 Subject: [PATCH 12/34] Don't send empty messages to Anthropic (#1027) Co-authored-by: Marcelo Trylesinski --- .../pydantic_ai/models/anthropic.py | 3 +- ...hropic_model_empty_message_on_history.yaml | 73 +++++++++++++++++++ tests/models/test_anthropic.py | 28 +++++++ uv.lock | 2 +- 4 files changed, 104 insertions(+), 2 deletions(-) create mode 100644 tests/models/cassettes/test_anthropic/test_anthropic_model_empty_message_on_history.yaml diff --git a/pydantic_ai_slim/pydantic_ai/models/anthropic.py b/pydantic_ai_slim/pydantic_ai/models/anthropic.py index 4c87d4aed..787cea029 100644 --- a/pydantic_ai_slim/pydantic_ai/models/anthropic.py +++ b/pydantic_ai_slim/pydantic_ai/models/anthropic.py @@ -373,7 +373,8 @@ async def _map_message(self, messages: list[ModelMessage]) -> tuple[str, list[Be is_error=True, ) user_content_params.append(retry_param) - anthropic_messages.append(BetaMessageParam(role='user', content=user_content_params)) + if len(user_content_params) > 0: + anthropic_messages.append(BetaMessageParam(role='user', content=user_content_params)) elif isinstance(m, ModelResponse): assistant_content_params: list[ BetaTextBlockParam diff --git a/tests/models/cassettes/test_anthropic/test_anthropic_model_empty_message_on_history.yaml b/tests/models/cassettes/test_anthropic/test_anthropic_model_empty_message_on_history.yaml new file mode 100644 index 000000000..3f6050385 --- /dev/null +++ b/tests/models/cassettes/test_anthropic/test_anthropic_model_empty_message_on_history.yaml @@ -0,0 +1,73 @@ +interactions: +- request: + headers: + accept: + - application/json + accept-encoding: + - gzip, deflate + connection: + - keep-alive + content-length: + - '281' + content-type: + - application/json + host: + - api.anthropic.com + method: POST + parsed_body: + max_tokens: 1024 + messages: + - content: + - text: Hello, how can I help you? + type: text + role: assistant + - content: + - text: I need a potato! + type: text + role: user + model: claude-3-5-sonnet-latest + stream: false + system: |+ + You are a helpful assistant. + + uri: https://api.anthropic.com/v1/messages?beta=true + response: + headers: + connection: + - keep-alive + content-length: + - '671' + content-type: + - application/json + strict-transport-security: + - max-age=31536000; includeSubDomains; preload + transfer-encoding: + - chunked + parsed_body: + content: + - text: |- + I can't physically give you a potato since I'm a computer program. However, I can: + + 1. Help you find recipes that use potatoes + 2. Give you tips on how to select, store, or cook potatoes + 3. Share information about different potato varieties + 4. Provide guidance on growing potatoes + + What specifically would you like to know about potatoes? + type: text + id: msg_01UjnDmX3B57Drosu49sMteT + model: claude-3-5-sonnet-20241022 + role: assistant + stop_reason: end_turn + stop_sequence: null + type: message + usage: + cache_creation_input_tokens: 0 + cache_read_input_tokens: 0 + input_tokens: 41 + output_tokens: 82 + service_tier: standard + status: + code: 200 + message: OK +version: 1 diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index 0832c2ebb..47e5ba5ed 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -1042,6 +1042,34 @@ def test_usage(message_callback: Callable[[], BetaMessage | BetaRawMessageStream assert _map_usage(message_callback()) == usage +@pytest.mark.vcr() +async def test_anthropic_model_empty_message_on_history(allow_model_requests: None, anthropic_api_key: str): + """The Anthropic API will error if you send an empty message on the history. + + Check for more details. + """ + m = AnthropicModel('claude-3-5-sonnet-latest', provider=AnthropicProvider(api_key=anthropic_api_key)) + agent = Agent(m, instructions='You are a helpful assistant.') + + result = await agent.run( + 'I need a potato!', + message_history=[ + ModelRequest(parts=[], instructions='You are a helpful assistant.', kind='request'), + ModelResponse(parts=[TextPart(content='Hello, how can I help you?')], kind='response'), + ], + ) + assert result.output == snapshot("""\ +I can't physically give you a potato since I'm a computer program. However, I can: + +1. Help you find recipes that use potatoes +2. Give you tips on how to select, store, or cook potatoes +3. Share information about different potato varieties +4. Provide guidance on growing potatoes + +What specifically would you like to know about potatoes?\ +""") + + @pytest.mark.vcr() async def test_anthropic_web_search_tool(allow_model_requests: None, anthropic_api_key: str): m = AnthropicModel('claude-3-5-sonnet-latest', provider=AnthropicProvider(api_key=anthropic_api_key)) diff --git a/uv.lock b/uv.lock index 971ba7868..da28ffdd1 100644 --- a/uv.lock +++ b/uv.lock @@ -3085,7 +3085,7 @@ requires-dist = [ { name = "groq", marker = "extra == 'groq'", specifier = ">=0.25.0" }, { name = "httpx", specifier = ">=0.27" }, { name = "logfire", marker = "extra == 'logfire'", specifier = ">=3.11.0" }, - { name = "mcp", marker = "python_full_version >= '3.10' and extra == 'mcp'", specifier = ">=1.8.0" }, + { name = "mcp", marker = "python_full_version >= '3.10' and extra == 'mcp'", specifier = ">=1.9.0" }, { name = "mistralai", marker = "extra == 'mistral'", specifier = ">=1.2.5" }, { name = "openai", marker = "extra == 'openai'", specifier = ">=1.75.0" }, { name = "opentelemetry-api", specifier = ">=1.28.0" }, From 4e3769a3203dfee1ed7fbc936576233f651d40c6 Mon Sep 17 00:00:00 2001 From: Davide Andreoli <116097137+davide-andreoli@users.noreply.github.com> Date: Tue, 27 May 2025 20:15:17 +0200 Subject: [PATCH 13/34] Add `vendor_id` and `finish_reason` to Gemini/Google model responses (#1800) --- pydantic_ai_slim/pydantic_ai/messages.py | 2 +- pydantic_ai_slim/pydantic_ai/models/gemini.py | 25 ++++++++++++++++--- pydantic_ai_slim/pydantic_ai/models/google.py | 23 ++++++++++++++--- tests/models/test_gemini.py | 25 +++++++++++++++++++ tests/models/test_google.py | 6 +++++ 5 files changed, 73 insertions(+), 8 deletions(-) diff --git a/pydantic_ai_slim/pydantic_ai/messages.py b/pydantic_ai_slim/pydantic_ai/messages.py index d03261be5..20257ab8e 100644 --- a/pydantic_ai_slim/pydantic_ai/messages.py +++ b/pydantic_ai_slim/pydantic_ai/messages.py @@ -620,7 +620,7 @@ class ModelResponse: kind: Literal['response'] = 'response' """Message type identifier, this is available on all parts as a discriminator.""" - vendor_details: dict[str, Any] | None = field(default=None, repr=False) + vendor_details: dict[str, Any] | None = field(default=None) """Additional vendor-specific details in a serializable format. This allows storing selected vendor-specific data that isn't mapped to standard ModelResponse fields. diff --git a/pydantic_ai_slim/pydantic_ai/models/gemini.py b/pydantic_ai_slim/pydantic_ai/models/gemini.py index 25e0c5df4..9ecf5da66 100644 --- a/pydantic_ai_slim/pydantic_ai/models/gemini.py +++ b/pydantic_ai_slim/pydantic_ai/models/gemini.py @@ -260,6 +260,8 @@ async def _make_request( yield r def _process_response(self, response: _GeminiResponse) -> ModelResponse: + vendor_details: dict[str, Any] | None = None + if len(response['candidates']) != 1: raise UnexpectedModelBehavior('Expected exactly one candidate in Gemini response') # pragma: no cover if 'content' not in response['candidates'][0]: @@ -270,9 +272,19 @@ def _process_response(self, response: _GeminiResponse) -> ModelResponse: 'Content field missing from Gemini response', str(response) ) parts = response['candidates'][0]['content']['parts'] + vendor_id = response.get('vendor_id', None) + finish_reason = response['candidates'][0].get('finish_reason') + if finish_reason: + vendor_details = {'finish_reason': finish_reason} usage = _metadata_as_usage(response) usage.requests = 1 - return _process_response_from_parts(parts, response.get('model_version', self._model_name), usage) + return _process_response_from_parts( + parts, + response.get('model_version', self._model_name), + usage, + vendor_id=vendor_id, + vendor_details=vendor_details, + ) async def _process_streamed_response(self, http_response: HTTPResponse) -> StreamedResponse: """Process a streamed response, and prepare a streaming response to return.""" @@ -612,7 +624,11 @@ def _function_call_part_from_call(tool: ToolCallPart) -> _GeminiFunctionCallPart def _process_response_from_parts( - parts: Sequence[_GeminiPartUnion], model_name: GeminiModelName, usage: usage.Usage + parts: Sequence[_GeminiPartUnion], + model_name: GeminiModelName, + usage: usage.Usage, + vendor_id: str | None, + vendor_details: dict[str, Any] | None = None, ) -> ModelResponse: items: list[ModelResponsePart] = [] for part in parts: @@ -624,7 +640,9 @@ def _process_response_from_parts( raise UnexpectedModelBehavior( f'Unsupported response from Gemini, expected all parts to be function calls or text, got: {part!r}' ) - return ModelResponse(parts=items, usage=usage, model_name=model_name) + return ModelResponse( + parts=items, usage=usage, model_name=model_name, vendor_id=vendor_id, vendor_details=vendor_details + ) class _GeminiFunctionCall(TypedDict): @@ -736,6 +754,7 @@ class _GeminiResponse(TypedDict): usage_metadata: NotRequired[Annotated[_GeminiUsageMetaData, pydantic.Field(alias='usageMetadata')]] prompt_feedback: NotRequired[Annotated[_GeminiPromptFeedback, pydantic.Field(alias='promptFeedback')]] model_version: NotRequired[Annotated[str, pydantic.Field(alias='modelVersion')]] + vendor_id: NotRequired[Annotated[str, pydantic.Field(alias='responseId')]] class _GeminiCandidates(TypedDict): diff --git a/pydantic_ai_slim/pydantic_ai/models/google.py b/pydantic_ai_slim/pydantic_ai/models/google.py index 2360c5946..0fbc42808 100644 --- a/pydantic_ai_slim/pydantic_ai/models/google.py +++ b/pydantic_ai_slim/pydantic_ai/models/google.py @@ -6,7 +6,7 @@ from contextlib import asynccontextmanager from dataclasses import dataclass, field, replace from datetime import datetime -from typing import Literal, Union, cast, overload +from typing import Any, Literal, Union, cast, overload from uuid import uuid4 from typing_extensions import assert_never @@ -302,9 +302,16 @@ def _process_response(self, response: GenerateContentResponse) -> ModelResponse: 'Content field missing from Gemini response', str(response) ) # pragma: no cover parts = response.candidates[0].content.parts or [] + vendor_id = response.response_id or None + vendor_details: dict[str, Any] | None = None + finish_reason = response.candidates[0].finish_reason + if finish_reason: # pragma: no branch + vendor_details = {'finish_reason': finish_reason.value} usage = _metadata_as_usage(response) usage.requests = 1 - return _process_response_from_parts(parts, response.model_version or self._model_name, usage) + return _process_response_from_parts( + parts, response.model_version or self._model_name, usage, vendor_id=vendor_id, vendor_details=vendor_details + ) async def _process_streamed_response(self, response: AsyncIterator[GenerateContentResponse]) -> StreamedResponse: """Process a streamed response, and prepare a streaming response to return.""" @@ -450,7 +457,13 @@ def _content_model_response(m: ModelResponse) -> ContentDict: return ContentDict(role='model', parts=parts) -def _process_response_from_parts(parts: list[Part], model_name: GoogleModelName, usage: usage.Usage) -> ModelResponse: +def _process_response_from_parts( + parts: list[Part], + model_name: GoogleModelName, + usage: usage.Usage, + vendor_id: str | None, + vendor_details: dict[str, Any] | None = None, +) -> ModelResponse: items: list[ModelResponsePart] = [] for part in parts: if part.text: @@ -465,7 +478,9 @@ def _process_response_from_parts(parts: list[Part], model_name: GoogleModelName, raise UnexpectedModelBehavior( f'Unsupported response from Gemini, expected all parts to be function calls or text, got: {part!r}' ) - return ModelResponse(parts=items, model_name=model_name, usage=usage) + return ModelResponse( + parts=items, model_name=model_name, usage=usage, vendor_id=vendor_id, vendor_details=vendor_details + ) def _function_declaration_from_tool(tool: ToolDefinition) -> FunctionDeclarationDict: diff --git a/tests/models/test_gemini.py b/tests/models/test_gemini.py index a27cc875e..17b63c316 100644 --- a/tests/models/test_gemini.py +++ b/tests/models/test_gemini.py @@ -540,6 +540,7 @@ async def test_text_success(get_gemini_client: GetGeminiClient): usage=Usage(requests=1, request_tokens=1, response_tokens=2, total_tokens=3, details={}), model_name='gemini-1.5-flash-123', timestamp=IsNow(tz=timezone.utc), + vendor_details={'finish_reason': 'STOP'}, ), ] ) @@ -555,6 +556,7 @@ async def test_text_success(get_gemini_client: GetGeminiClient): usage=Usage(requests=1, request_tokens=1, response_tokens=2, total_tokens=3, details={}), model_name='gemini-1.5-flash-123', timestamp=IsNow(tz=timezone.utc), + vendor_details={'finish_reason': 'STOP'}, ), ModelRequest(parts=[UserPromptPart(content='Hello', timestamp=IsNow(tz=timezone.utc))]), ModelResponse( @@ -562,6 +564,7 @@ async def test_text_success(get_gemini_client: GetGeminiClient): usage=Usage(requests=1, request_tokens=1, response_tokens=2, total_tokens=3, details={}), model_name='gemini-1.5-flash-123', timestamp=IsNow(tz=timezone.utc), + vendor_details={'finish_reason': 'STOP'}, ), ] ) @@ -585,6 +588,7 @@ async def test_request_structured_response(get_gemini_client: GetGeminiClient): usage=Usage(requests=1, request_tokens=1, response_tokens=2, total_tokens=3, details={}), model_name='gemini-1.5-flash-123', timestamp=IsNow(tz=timezone.utc), + vendor_details={'finish_reason': 'STOP'}, ), ModelRequest( parts=[ @@ -647,6 +651,7 @@ async def get_location(loc_name: str) -> str: usage=Usage(requests=1, request_tokens=1, response_tokens=2, total_tokens=3, details={}), model_name='gemini-1.5-flash-123', timestamp=IsNow(tz=timezone.utc), + vendor_details={'finish_reason': 'STOP'}, ), ModelRequest( parts=[ @@ -666,6 +671,7 @@ async def get_location(loc_name: str) -> str: usage=Usage(requests=1, request_tokens=1, response_tokens=2, total_tokens=3, details={}), model_name='gemini-1.5-flash-123', timestamp=IsNow(tz=timezone.utc), + vendor_details={'finish_reason': 'STOP'}, ), ModelRequest( parts=[ @@ -688,6 +694,7 @@ async def get_location(loc_name: str) -> str: usage=Usage(requests=1, request_tokens=1, response_tokens=2, total_tokens=3, details={}), model_name='gemini-1.5-flash-123', timestamp=IsNow(tz=timezone.utc), + vendor_details={'finish_reason': 'STOP'}, ), ] ) @@ -1099,6 +1106,7 @@ async def get_image() -> BinaryContent: usage=Usage(requests=1, request_tokens=38, response_tokens=28, total_tokens=427, details={}), model_name='gemini-2.5-pro-preview-03-25', timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, ), ModelRequest( parts=[ @@ -1122,6 +1130,7 @@ async def get_image() -> BinaryContent: usage=Usage(requests=1, request_tokens=360, response_tokens=11, total_tokens=572, details={}), model_name='gemini-2.5-pro-preview-03-25', timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, ), ] ) @@ -1244,6 +1253,7 @@ async def test_gemini_model_instructions(allow_model_requests: None, gemini_api_ usage=Usage(requests=1, request_tokens=13, response_tokens=8, total_tokens=21, details={}), model_name='gemini-1.5-flash', timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, ), ] ) @@ -1284,3 +1294,18 @@ async def get_temperature(location: dict[str, CurrentLocation]) -> float: # pra assert result.output == snapshot( 'I need a location dictionary to use the `get_temperature` function. I cannot provide the temperature in Tokyo without more information.\n' ) + + +async def test_gemini_no_finish_reason(get_gemini_client: GetGeminiClient): + response = gemini_response( + _content_model_response(ModelResponse(parts=[TextPart('Hello world')])), finish_reason=None + ) + gemini_client = get_gemini_client(response) + m = GeminiModel('gemini-1.5-flash', provider=GoogleGLAProvider(http_client=gemini_client)) + agent = Agent(m) + + result = await agent.run('Hello World') + + for message in result.all_messages(): + if isinstance(message, ModelResponse): + assert message.vendor_details is None diff --git a/tests/models/test_google.py b/tests/models/test_google.py index 0338b4571..f67fee08c 100644 --- a/tests/models/test_google.py +++ b/tests/models/test_google.py @@ -86,6 +86,7 @@ async def test_google_model(allow_model_requests: None, google_provider: GoogleP usage=Usage(requests=1, request_tokens=7, response_tokens=11, total_tokens=18, details={}), model_name='gemini-1.5-flash', timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, ), ] ) @@ -139,6 +140,7 @@ async def temperature(city: str, date: datetime.date) -> str: usage=Usage(requests=1, request_tokens=101, response_tokens=14, total_tokens=115, details={}), model_name='gemini-1.5-flash', timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, ), ModelRequest( parts=[ @@ -158,6 +160,7 @@ async def temperature(city: str, date: datetime.date) -> str: usage=Usage(requests=1, request_tokens=123, response_tokens=21, total_tokens=144, details={}), model_name='gemini-1.5-flash', timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, ), ModelRequest( parts=[ @@ -216,6 +219,7 @@ async def get_capital(country: str) -> str: ), model_name='models/gemini-2.5-pro-preview-05-06', timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, ), ModelRequest( parts=[ @@ -236,6 +240,7 @@ async def get_capital(country: str) -> str: usage=Usage(requests=1, request_tokens=104, response_tokens=18, total_tokens=122, details={}), model_name='models/gemini-2.5-pro-preview-05-06', timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, ), ] ) @@ -492,6 +497,7 @@ def instructions() -> str: usage=Usage(requests=1, request_tokens=13, response_tokens=8, total_tokens=21, details={}), model_name='gemini-2.0-flash', timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, ), ] ) From ebb536fa4adb555b1eaba2fc572141b090690601 Mon Sep 17 00:00:00 2001 From: Alex Hall Date: Tue, 27 May 2025 21:21:29 +0200 Subject: [PATCH 14/34] Fix units of `sse_read_timeout` `timedelta` (#1843) --- pydantic_ai_slim/pydantic_ai/mcp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydantic_ai_slim/pydantic_ai/mcp.py b/pydantic_ai_slim/pydantic_ai/mcp.py index d062fd938..2aae85a6c 100644 --- a/pydantic_ai_slim/pydantic_ai/mcp.py +++ b/pydantic_ai_slim/pydantic_ai/mcp.py @@ -373,7 +373,7 @@ async def client_streams( url=self.url, headers=self.headers, timeout=timedelta(seconds=self.timeout), - sse_read_timeout=timedelta(self.sse_read_timeout), + sse_read_timeout=timedelta(seconds=self.sse_read_timeout), ) as (read_stream, write_stream, _): yield read_stream, write_stream From c8bb611ed2a9233a07ade2b0fc1736d82a70f4f0 Mon Sep 17 00:00:00 2001 From: Douwe Maan Date: Wed, 28 May 2025 00:48:19 +0200 Subject: [PATCH 15/34] Support functions as output_type, as well as lists of functions and other types (#1785) --- docs/multi-agent-applications.md | 1 + docs/output.md | 168 ++++- docs/tools.md | 4 +- examples/pydantic_ai_examples/sql_gen.py | 2 +- pydantic_ai_slim/pydantic_ai/_agent_graph.py | 64 +- .../{_pydantic.py => _function_schema.py} | 56 +- pydantic_ai_slim/pydantic_ai/_output.py | 383 +++++++---- pydantic_ai_slim/pydantic_ai/agent.py | 30 +- pydantic_ai_slim/pydantic_ai/result.py | 137 +--- pydantic_ai_slim/pydantic_ai/tools.py | 86 +-- tests/test_agent.py | 604 +++++++++++++++++- tests/test_examples.py | 95 ++- tests/test_tools.py | 2 +- tests/typed_agent.py | 72 ++- 14 files changed, 1321 insertions(+), 383 deletions(-) rename pydantic_ai_slim/pydantic_ai/{_pydantic.py => _function_schema.py} (83%) diff --git a/docs/multi-agent-applications.md b/docs/multi-agent-applications.md index 33299a776..7a2ce36f3 100644 --- a/docs/multi-agent-applications.md +++ b/docs/multi-agent-applications.md @@ -12,6 +12,7 @@ Of course, you can combine multiple strategies in a single application. ## Agent delegation "Agent delegation" refers to the scenario where an agent delegates work to another agent, then takes back control when the delegate agent (the agent called from within a tool) finishes. +If you want to hand off control to another agent completely, without coming back to the first agent, you can use an [output function](output.md#output-functions). Since agents are stateless and designed to be global, you do not need to include the agent itself in agent [dependencies](dependencies.md). diff --git a/docs/output.md b/docs/output.md index 09eeb2758..7eac789c4 100644 --- a/docs/output.md +++ b/docs/output.md @@ -1,9 +1,13 @@ -"Output" refers to the final value returned from [running an agent](agents.md#running-agents) these can be either plain text or structured data. +"Output" refers to the final value returned from [running an agent](agents.md#running-agents). This can be either plain text, [structured data](#structured-output), or the result of a [function](#output-functions) called with arguments provided by the model. -The output is wrapped in [`AgentRunResult`][pydantic_ai.agent.AgentRunResult] or [`StreamedRunResult`][pydantic_ai.result.StreamedRunResult] so you can access other data like [usage][pydantic_ai.usage.Usage] of the run and [message history](message-history.md#accessing-messages-from-results) +The output is wrapped in [`AgentRunResult`][pydantic_ai.agent.AgentRunResult] or [`StreamedRunResult`][pydantic_ai.result.StreamedRunResult] so that you can access other data, like [usage][pydantic_ai.usage.Usage] of the run and [message history](message-history.md#accessing-messages-from-results). Both `AgentRunResult` and `StreamedRunResult` are generic in the data they wrap, so typing information about the data returned by the agent is preserved. +A run ends when a plain text response is received (assuming no output type is specified or `str` is one of the allowed options), or when the model responds with one of the structured output types by calling a special output tool. A run can also be cancelled if usage limits are exceeded, see [Usage Limits](agents.md#usage-limits). + +Here's an example using a Pydantic model as the `output_type`, forcing the model to respond with data matching our specification: + ```python {title="olympics.py" line_length="90"} from pydantic import BaseModel @@ -25,27 +29,32 @@ print(result.usage()) _(This example is complete, it can be run "as is")_ -Runs end when either a plain text response is received or the model calls a tool associated with one of the structured output types (run can also be cancelled if usage limits are exceeded, see [Usage Limits](agents.md#usage-limits)). - ## Output data {#structured-output} -When the output type is `str`, or a union including `str`, plain text responses are enabled on the model, and the raw text response from the model is used as the response data. +The [`Agent`][pydantic_ai.Agent] class constructor takes an `output_type` argument that takes one or more types or [output functions](#output-functions). It supports both type unions and lists of types and functions. + +When no output type is specified, or when the output type is `str` or a union or list of types including `str`, the model is allowed to respond with plain text, and this text is used as the output data. +If `str` is not among the allowed output types, the model is not allowed to respond with plain text and is forced to return structured data (or arguments to an output function). -If the output type is a union with multiple members (after removing `str` from the members), each member is registered as a separate tool with the model in order to reduce the complexity of the tool schemas and maximise the chances a model will respond correctly. +If the output type is a union or list with multiple members, each member (except for `str`, if it is a member) is registered with the model as a separate output tool in order to reduce the complexity of the tool schemas and maximise the chances a model will respond correctly. If the output type schema is not of type `"object"` (e.g. it's `int` or `list[int]`), the output type is wrapped in a single element object, so the schema of all tools registered with the model are object schemas. Structured outputs (like tools) use Pydantic to build the JSON schema used for the tool, and to validate the data returned by the model. -!!! note "Bring on PEP-747" - Until [PEP-747](https://peps.python.org/pep-0747/) "Annotating Type Forms" lands, unions are not valid as `type`s in Python. +!!! note "Type checking considerations" + The Agent class is generic in its output type, and this type is carried through to `AgentRunResult.output` and `StreamedRunResult.output` so that your IDE or static type checker can warn you when your code doesn't properly take into account all the possible values those outputs could have. - When creating the agent we need to `# type: ignore` the `output_type` argument, and add a type hint to tell type checkers about the type of the agent. + Static type checkers like pyright and mypy will do their best the infer the agent's output type from the `output_type` you've specified, but they're not always able to do so correctly when you provide functions or multiple types in a union or list, even though PydanticAI will behave correctly. When this happens, your type checker will complain even when you're confident you've passed a valid `output_type`, and you'll need to help the type checker by explicitly specifying the generic parameters on the `Agent` constructor. This is shown in the second example below and the output functions example further down. -Here's an example of returning either text or a structured value + Specifically, there are three valid uses of `output_type` where you'll need to do this: + 1. When using a union of types, e.g. `output_type=Foo | Bar` or in older Python, `output_type=Union[Foo, Bar]`. Until [PEP-747](https://peps.python.org/pep-0747/) "Annotating Type Forms" lands in Python 3.15, type checkers do not consider these a valid value for `output_type`. In addition to the generic parameters on the `Agent` constructor, you'll need to add `# type: ignore` to the line that passes the union to `output_type`. + 2. With mypy: When using a list, as a functionally equivalent alternative to a union, or because you're passing in [output functions](#output-functions). Pyright does handle this correctly, and we've filed [an issue](https://github.com/python/mypy/issues/19142) with mypy to try and get this fixed. + 3. With mypy: when using an async output function. Pyright does handle this correctly, and we've filed [an issue](https://github.com/python/mypy/issues/19143) with mypy to try and get this fixed. + +Here's an example of returning either text or structured data: ```python {title="box_or_error.py"} -from typing import Union from pydantic import BaseModel @@ -59,9 +68,9 @@ class Box(BaseModel): units: str -agent: Agent[None, Union[Box, str]] = Agent( +agent = Agent( 'openai:gpt-4o-mini', - output_type=Union[Box, str], # type: ignore + output_type=[Box, str], system_prompt=( "Extract me the dimensions of a box, " "if you can't extract all data, ask the user to try again." @@ -79,14 +88,14 @@ print(result.output) _(This example is complete, it can be run "as is")_ -Here's an example of using a union return type which registers multiple tools, and wraps non-object schemas in an object: +Here's an example of using a union return type, for which PydanticAI will register multiple tools and wraps non-object schemas in an object: ```python {title="colors_or_sizes.py"} from typing import Union from pydantic_ai import Agent -agent: Agent[None, Union[list[str], list[int]]] = Agent( +agent = Agent[None, Union[list[str], list[int]]]( 'openai:gpt-4o-mini', output_type=Union[list[str], list[int]], # type: ignore system_prompt='Extract either colors or sizes from the shapes provided.', @@ -103,10 +112,135 @@ print(result.output) _(This example is complete, it can be run "as is")_ -### Output validator functions +### Output functions + +Instead of plain text or structured data, you may want the output of your agent run to be the result of a function called with arguments provided by the model, for example to further process or validate the data provided through the arguments (with the option to tell the model to try again), or to hand off to another agent. + +Output functions are similar to [function tools](tools.md), but the model is forced to call one of them, the call ends the agent run, and the result is not passed back to the model. + +As with tool functions, output function arguments provided by the model are validated using Pydantic, they can optionally take [`RunContext`][pydantic_ai.tools.RunContext] as the first argument, and they can raise [`ModelRetry`][pydantic_ai.exceptions.ModelRetry] to ask the model to try again with modified arguments (or with a different output type). + +To specify output functions, you set the agent's `output_type` to either a single function (or bound instance method), or a list of functions. The list can also contain other output types like simple scalars or entire Pydantic models. +You typically do not want to also register your output function as a tool (using the `@agent.tool` decorator or `tools` argument), as this could confuse the model about which it should be calling. + +Here's an example of all of these features in action: + +```python {title="output_functions.py"} +import re +from typing import Union + +from pydantic import BaseModel + +from pydantic_ai import Agent, ModelRetry, RunContext +from pydantic_ai._output import ToolRetryError +from pydantic_ai.exceptions import UnexpectedModelBehavior + + +class Row(BaseModel): + name: str + country: str + + +tables = { + 'capital_cities': [ + Row(name='Amsterdam', country='Netherlands'), + Row(name='Mexico City', country='Mexico'), + ] +} + + +class SQLFailure(BaseModel): + """An unrecoverable failure. Only use this when you can't change the query to make it work.""" + + explanation: str + + +def run_sql_query(query: str) -> list[Row]: + """Run a SQL query on the database.""" + + select_table = re.match(r'SELECT (.+) FROM (\w+)', query) + if select_table: + column_names = select_table.group(1) + if column_names != '*': + raise ModelRetry("Only 'SELECT *' is supported, you'll have to do column filtering manually.") + + table_name = select_table.group(2) + if table_name not in tables: + raise ModelRetry( + f"Unknown table '{table_name}' in query '{query}'. Available tables: {', '.join(tables.keys())}." + ) + + return tables[table_name] + + raise ModelRetry(f"Unsupported query: '{query}'.") + + +sql_agent = Agent[None, Union[list[Row], SQLFailure]]( + 'openai:gpt-4o', + output_type=[run_sql_query, SQLFailure], + instructions='You are a SQL agent that can run SQL queries on a database.', +) + + +async def hand_off_to_sql_agent(ctx: RunContext, query: str) -> list[Row]: + """I take natural language queries, turn them into SQL, and run them on a database.""" + + # Drop the final message with the output tool call, as it shouldn't be passed on to the SQL agent + messages = ctx.messages[:-1] + try: + result = await sql_agent.run(query, message_history=messages) + output = result.output + if isinstance(output, SQLFailure): + raise ModelRetry(f'SQL agent failed: {output.explanation}') + return output + except UnexpectedModelBehavior as e: + # Bubble up potentially retryable errors to the router agent + if (cause := e.__cause__) and isinstance(cause, ToolRetryError): + raise ModelRetry(f'SQL agent failed: {cause.tool_retry.content}') from e + else: + raise + + +class RouterFailure(BaseModel): + """Use me when no appropriate agent is found or the used agent failed.""" + + explanation: str + + +router_agent = Agent[None, Union[list[Row], RouterFailure]]( + 'openai:gpt-4o', + output_type=[hand_off_to_sql_agent, RouterFailure], + instructions='You are a router to other agents. Never try to solve a problem yourself, just pass it on.', +) + +result = router_agent.run_sync('Select the names and countries of all capitals') +print(result.output) +""" +[ + Row(name='Amsterdam', country='Netherlands'), + Row(name='Mexico City', country='Mexico'), +] +""" + +result = router_agent.run_sync('Select all pets') +print(result.output) +""" +explanation = "The requested table 'pets' does not exist in the database. The only available table is 'capital_cities', which does not contain data about pets." +""" + +result = router_agent.run_sync('How do I fly from Amsterdam to Mexico City?') +print(result.output) +""" +explanation = 'I am not equipped to provide travel information, such as flights from Amsterdam to Mexico City.' +""" +``` + +### Output validators {#output-validator-functions} Some validation is inconvenient or impossible to do in Pydantic validators, in particular when the validation requires IO and is asynchronous. PydanticAI provides a way to add validation functions via the [`agent.output_validator`][pydantic_ai.Agent.output_validator] decorator. +If you want to implement separate validation logic for different output types, it's recommended to use [output functions](#output-functions) instead, to save you from having to do `isinstance` checks inside the output validator. + Here's a simplified variant of the [SQL Generation example](examples/sql-gen.md): ```python {title="sql_gen.py"} @@ -127,7 +261,7 @@ class InvalidRequest(BaseModel): Output = Union[Success, InvalidRequest] -agent: Agent[DatabaseConn, Output] = Agent( +agent = Agent[DatabaseConn, Output]( 'google-gla:gemini-1.5-flash', output_type=Output, # type: ignore deps_type=DatabaseConn, diff --git a/docs/tools.md b/docs/tools.md index 33bfdeb3a..921edd95e 100644 --- a/docs/tools.md +++ b/docs/tools.md @@ -2,7 +2,9 @@ Function tools provide a mechanism for models to retrieve extra information to help them generate a response. -They're useful when it is impractical or impossible to put all the context an agent might need into the system prompt, or when you want to make agents' behavior more deterministic or reliable by deferring some of the logic required to generate a response to another (not necessarily AI-powered) tool. +They're useful when you want to enable the model to take some action and use the result, when it is impractical or impossible to put all the context an agent might need into the system prompt, or when you want to make agents' behavior more deterministic or reliable by deferring some of the logic required to generate a response to another (not necessarily AI-powered) tool. + +If you want a model to be able to call a function as its final action, without the result being sent back to the model, you can use an [output function](output.md#output-functions) instead. !!! info "Function tools vs. RAG" Function tools are basically the "R" of RAG (Retrieval-Augmented Generation) — they augment what the model can do by letting it request extra information. diff --git a/examples/pydantic_ai_examples/sql_gen.py b/examples/pydantic_ai_examples/sql_gen.py index 28b5459fb..fdf8c5ff3 100644 --- a/examples/pydantic_ai_examples/sql_gen.py +++ b/examples/pydantic_ai_examples/sql_gen.py @@ -92,7 +92,7 @@ class InvalidRequest(BaseModel): Response: TypeAlias = Union[Success, InvalidRequest] -agent: Agent[Deps, Response] = Agent( +agent = Agent[Deps, Response]( 'google-gla:gemini-1.5-flash', # Type ignore while we wait for PEP-0747, nonetheless unions will work fine everywhere else output_type=Response, # type: ignore diff --git a/pydantic_ai_slim/pydantic_ai/_agent_graph.py b/pydantic_ai_slim/pydantic_ai/_agent_graph.py index 9fa0a5762..ecd72ec25 100644 --- a/pydantic_ai_slim/pydantic_ai/_agent_graph.py +++ b/pydantic_ai_slim/pydantic_ai/_agent_graph.py @@ -25,7 +25,7 @@ result, usage as _usage, ) -from .result import OutputDataT, ToolOutput +from .result import OutputDataT from .settings import ModelSettings, merge_model_settings from .tools import RunContext, Tool, ToolDefinition, ToolsPrepareFunc @@ -65,12 +65,14 @@ class GraphAgentState: retries: int run_step: int - def increment_retries(self, max_result_retries: int) -> None: + def increment_retries(self, max_result_retries: int, error: Exception | None = None) -> None: self.retries += 1 if self.retries > max_result_retries: - raise exceptions.UnexpectedModelBehavior( - f'Exceeded maximum retries ({max_result_retries}) for result validation' - ) + message = f'Exceeded maximum retries ({max_result_retries}) for result validation' + if error: + raise exceptions.UnexpectedModelBehavior(message) from error + else: + raise exceptions.UnexpectedModelBehavior(message) @dataclasses.dataclass @@ -267,7 +269,7 @@ async def add_mcp_server_tools(server: MCPServer) -> None: return models.ModelRequestParameters( function_tools=function_tool_defs, builtin_tools=ctx.deps.builtin_tools, - allow_text_output=allow_text_output(output_schema), + allow_text_output=_output.allow_text_output(output_schema), output_tools=output_schema.tool_defs() if output_schema is not None else [], ) @@ -457,7 +459,7 @@ async def _run_stream() -> AsyncIterator[_messages.HandleResponseEvent]: # when the model has already returned text along side tool calls # in this scenario, if text responses are allowed, we return text from the most recent model # response, if any - if allow_text_output(ctx.deps.output_schema): + if _output.allow_text_output(ctx.deps.output_schema): for message in reversed(ctx.state.message_history): if isinstance(message, _messages.ModelResponse): last_texts = [p.content for p in message.parts if isinstance(p, _messages.TextPart)] @@ -478,6 +480,7 @@ async def _handle_tool_calls( tool_calls: list[_messages.ToolCallPart], ) -> AsyncIterator[_messages.HandleResponseEvent]: output_schema = ctx.deps.output_schema + run_context = build_run_context(ctx) # first, look for the output tool call final_result: result.FinalResult[NodeRunEndT] | None = None @@ -485,12 +488,12 @@ async def _handle_tool_calls( if output_schema is not None: for call, output_tool in output_schema.find_tool(tool_calls): try: - result_data = output_tool.validate(call) + result_data = await output_tool.process(call, run_context) result_data = await _validate_output(result_data, ctx, call) except _output.ToolRetryError as e: # TODO: Should only increment retry stuff once per node execution, not for each tool call # Also, should increment the tool-specific retry count rather than the run retry count - ctx.state.increment_retries(ctx.deps.max_result_retries) + ctx.state.increment_retries(ctx.deps.max_result_retries, e) parts.append(e.tool_retry) else: final_result = result.FinalResult(result_data, call.tool_name, call.tool_call_id) @@ -512,7 +515,6 @@ async def _handle_tool_calls( else: if tool_responses: parts.extend(tool_responses) - run_context = build_run_context(ctx) instructions = await ctx.deps.get_instructions(run_context) self._next_node = ModelRequestNode[DepsT, NodeRunEndT]( _messages.ModelRequest(parts=parts, instructions=instructions) @@ -540,27 +542,22 @@ async def _handle_text_response( output_schema = ctx.deps.output_schema text = '\n\n'.join(texts) - if allow_text_output(output_schema): - # The following cast is safe because we know `str` is an allowed result type - result_data_input = cast(NodeRunEndT, text) - try: - result_data = await _validate_output(result_data_input, ctx, None) - except _output.ToolRetryError as e: - ctx.state.increment_retries(ctx.deps.max_result_retries) - return ModelRequestNode[DepsT, NodeRunEndT](_messages.ModelRequest(parts=[e.tool_retry])) + try: + if _output.allow_text_output(output_schema): + # The following cast is safe because we know `str` is an allowed result type + result_data = cast(NodeRunEndT, text) else: - return self._handle_final_result(ctx, result.FinalResult(result_data, None, None), []) - else: - ctx.state.increment_retries(ctx.deps.max_result_retries) - return ModelRequestNode[DepsT, NodeRunEndT]( - _messages.ModelRequest( - parts=[ - _messages.RetryPromptPart( - content='Plain text responses are not permitted, please include your response in a tool call', - ) - ] + m = _messages.RetryPromptPart( + content='Plain text responses are not permitted, please include your response in a tool call', ) - ) + raise _output.ToolRetryError(m) + + result_data = await _validate_output(result_data, ctx, None) + except _output.ToolRetryError as e: + ctx.state.increment_retries(ctx.deps.max_result_retries, e) + return ModelRequestNode[DepsT, NodeRunEndT](_messages.ModelRequest(parts=[e.tool_retry])) + else: + return self._handle_final_result(ctx, result.FinalResult(result_data, None, None), []) def build_run_context(ctx: GraphRunContext[GraphAgentState, GraphAgentDeps[DepsT, Any]]) -> RunContext[DepsT]: @@ -802,11 +799,6 @@ async def _validate_output( return result_data -def allow_text_output(output_schema: _output.OutputSchema[Any] | None) -> bool: - """Check if the result schema allows text results.""" - return output_schema is None or output_schema.allow_text_output - - @dataclasses.dataclass class _RunMessages: messages: list[_messages.ModelMessage] @@ -856,7 +848,9 @@ def get_captured_run_messages() -> _RunMessages: def build_agent_graph( - name: str | None, deps_type: type[DepsT], output_type: type[OutputT] | ToolOutput[OutputT] + name: str | None, + deps_type: type[DepsT], + output_type: _output.OutputType[OutputT], ) -> Graph[GraphAgentState, GraphAgentDeps[DepsT, result.FinalResult[OutputT]], result.FinalResult[OutputT]]: """Build the execution [Graph][pydantic_graph.Graph] for a given agent.""" nodes = ( diff --git a/pydantic_ai_slim/pydantic_ai/_pydantic.py b/pydantic_ai_slim/pydantic_ai/_function_schema.py similarity index 83% rename from pydantic_ai_slim/pydantic_ai/_pydantic.py rename to pydantic_ai_slim/pydantic_ai/_function_schema.py index f43935746..facca89aa 100644 --- a/pydantic_ai_slim/pydantic_ai/_pydantic.py +++ b/pydantic_ai_slim/pydantic_ai/_function_schema.py @@ -5,6 +5,9 @@ from __future__ import annotations as _annotations +import inspect +from collections.abc import Awaitable +from dataclasses import dataclass from inspect import Parameter, signature from typing import TYPE_CHECKING, Any, Callable, cast @@ -15,10 +18,12 @@ from pydantic.json_schema import GenerateJsonSchema from pydantic.plugin._schema_validator import create_schema_validator from pydantic_core import SchemaValidator, core_schema -from typing_extensions import TypedDict, get_origin +from typing_extensions import get_origin + +from pydantic_ai.tools import RunContext from ._griffe import doc_descriptions -from ._utils import check_object_json_schema, is_model_like +from ._utils import check_object_json_schema, is_model_like, run_in_executor if TYPE_CHECKING: from .tools import DocstringFormat, ObjectJsonSchema @@ -27,24 +32,53 @@ __all__ = ('function_schema',) -class FunctionSchema(TypedDict): +@dataclass +class FunctionSchema: """Internal information about a function schema.""" + function: Callable[..., Any] description: str validator: SchemaValidator json_schema: ObjectJsonSchema # if not None, the function takes a single by that name (besides potentially `info`) + takes_ctx: bool + is_async: bool single_arg_name: str | None positional_fields: list[str] var_positional_field: str | None + async def call(self, args_dict: dict[str, Any], ctx: RunContext[Any]) -> Any: + args, kwargs = self._call_args(args_dict, ctx) + if self.is_async: + function = cast(Callable[[Any], Awaitable[str]], self.function) + return await function(*args, **kwargs) + else: + function = cast(Callable[[Any], str], self.function) + return await run_in_executor(function, *args, **kwargs) + + def _call_args( + self, + args_dict: dict[str, Any], + ctx: RunContext[Any], + ) -> tuple[list[Any], dict[str, Any]]: + if self.single_arg_name: + args_dict = {self.single_arg_name: args_dict} + + args = [ctx] if self.takes_ctx else [] + for positional_field in self.positional_fields: + args.append(args_dict.pop(positional_field)) # pragma: no cover + if self.var_positional_field: + args.extend(args_dict.pop(self.var_positional_field)) + + return args, args_dict + def function_schema( # noqa: C901 function: Callable[..., Any], - takes_ctx: bool, - docstring_format: DocstringFormat, - require_parameter_descriptions: bool, schema_generator: type[GenerateJsonSchema], + takes_ctx: bool | None = None, + docstring_format: DocstringFormat = 'auto', + require_parameter_descriptions: bool = False, ) -> FunctionSchema: """Build a Pydantic validator and JSON schema from a tool function. @@ -58,6 +92,9 @@ def function_schema( # noqa: C901 Returns: A `FunctionSchema` instance. """ + if takes_ctx is None: + takes_ctx = _takes_ctx(function) + config = ConfigDict(title=function.__name__, use_attribute_docstrings=True) config_wrapper = ConfigWrapper(config) gen_schema = _generate_schema.GenerateSchema(config_wrapper) @@ -176,10 +213,13 @@ def function_schema( # noqa: C901 single_arg_name=single_arg_name, positional_fields=positional_fields, var_positional_field=var_positional_field, + takes_ctx=takes_ctx, + is_async=inspect.iscoroutinefunction(function), + function=function, ) -def takes_ctx(function: Callable[..., Any]) -> bool: +def _takes_ctx(function: Callable[..., Any]) -> bool: """Check if a function takes a `RunContext` first argument. Args: @@ -196,7 +236,7 @@ def takes_ctx(function: Callable[..., Any]) -> bool: else: type_hints = _typing_extra.get_function_type_hints(function) annotation = type_hints[first_param_name] - return annotation is not sig.empty and _is_call_ctx(annotation) + return True is not sig.empty and _is_call_ctx(annotation) def _build_schema( diff --git a/pydantic_ai_slim/pydantic_ai/_output.py b/pydantic_ai_slim/pydantic_ai/_output.py index 1641bf698..cfb0f8f0c 100644 --- a/pydantic_ai_slim/pydantic_ai/_output.py +++ b/pydantic_ai_slim/pydantic_ai/_output.py @@ -1,22 +1,55 @@ from __future__ import annotations as _annotations import inspect -from collections.abc import Awaitable, Iterable, Iterator +from collections.abc import Awaitable, Iterable, Iterator, Sequence from dataclasses import dataclass, field from typing import Any, Callable, Generic, Literal, Union, cast from pydantic import TypeAdapter, ValidationError -from typing_extensions import TypedDict, TypeVar, get_args, get_origin +from pydantic_core import SchemaValidator +from typing_extensions import TypeAliasType, TypedDict, TypeVar, get_args, get_origin from typing_inspection import typing_objects from typing_inspection.introspection import is_union_origin -from . import _utils, messages as _messages +from . import _function_schema, _utils, messages as _messages from .exceptions import ModelRetry -from .result import DEFAULT_OUTPUT_TOOL_NAME, OutputDataT, OutputDataT_inv, OutputValidatorFunc, ToolOutput -from .tools import AgentDepsT, GenerateToolJsonSchema, RunContext, ToolDefinition +from .tools import AgentDepsT, GenerateToolJsonSchema, ObjectJsonSchema, RunContext, ToolDefinition T = TypeVar('T') """An invariant TypeVar.""" +OutputDataT_inv = TypeVar('OutputDataT_inv', default=str) +""" +An invariant type variable for the result data of a model. + +We need to use an invariant typevar for `OutputValidator` and `OutputValidatorFunc` because the output data type is used +in both the input and output of a `OutputValidatorFunc`. This can theoretically lead to some issues assuming that types +possessing OutputValidator's are covariant in the result data type, but in practice this is rarely an issue, and +changing it would have negative consequences for the ergonomics of the library. + +At some point, it may make sense to change the input to OutputValidatorFunc to be `Any` or `object` as doing that would +resolve these potential variance issues. +""" +OutputDataT = TypeVar('OutputDataT', default=str, covariant=True) +"""Covariant type variable for the result data type of a run.""" + +OutputValidatorFunc = Union[ + Callable[[RunContext[AgentDepsT], OutputDataT_inv], OutputDataT_inv], + Callable[[RunContext[AgentDepsT], OutputDataT_inv], Awaitable[OutputDataT_inv]], + Callable[[OutputDataT_inv], OutputDataT_inv], + Callable[[OutputDataT_inv], Awaitable[OutputDataT_inv]], +] +""" +A function that always takes and returns the same type of data (which is the result type of an agent run), and: + +* may or may not take [`RunContext`][pydantic_ai.tools.RunContext] as a first argument +* may or may not be async + +Usage `OutputValidatorFunc[AgentDepsT, T]`. +""" + + +DEFAULT_OUTPUT_TOOL_NAME = 'final_result' +DEFAULT_OUTPUT_TOOL_DESCRIPTION = 'The final response which ends this conversation' @dataclass @@ -76,69 +109,135 @@ def __init__(self, tool_retry: _messages.RetryPromptPart): super().__init__() +@dataclass(init=False) +class ToolOutput(Generic[OutputDataT]): + """Marker class to use tools for outputs, and customize the tool.""" + + output_type: SimpleOutputType[OutputDataT] + name: str | None + description: str | None + max_retries: int | None + strict: bool | None + + def __init__( + self, + type_: SimpleOutputType[OutputDataT], + *, + name: str | None = None, + description: str | None = None, + max_retries: int | None = None, + strict: bool | None = None, + ): + self.output_type = type_ + self.name = name + self.description = description + self.max_retries = max_retries + self.strict = strict + + +T_co = TypeVar('T_co', covariant=True) +# output_type=Type or output_type=function or output_type=object.method +SimpleOutputType = TypeAliasType( + 'SimpleOutputType', Union[type[T_co], Callable[..., T_co], Callable[..., Awaitable[T_co]]], type_params=(T_co,) +) +# output_type=ToolOutput() or +SimpleOutputTypeOrMarker = TypeAliasType( + 'SimpleOutputTypeOrMarker', Union[SimpleOutputType[T_co], ToolOutput[T_co]], type_params=(T_co,) +) +# output_type= or [, ...] +OutputType = TypeAliasType( + 'OutputType', Union[SimpleOutputTypeOrMarker[T_co], Sequence[SimpleOutputTypeOrMarker[T_co]]], type_params=(T_co,) +) + + @dataclass class OutputSchema(Generic[OutputDataT]): - """Model the final response from an agent run. + """Model the final output from an agent run. Similar to `Tool` but for the final output of running an agent. """ - tools: dict[str, OutputSchemaTool[OutputDataT]] + tools: dict[str, OutputTool[OutputDataT]] allow_text_output: bool @classmethod def build( - cls: type[OutputSchema[T]], - output_type: type[T] | ToolOutput[T], + cls: type[OutputSchema[OutputDataT]], + output_type: OutputType[OutputDataT], name: str | None = None, description: str | None = None, strict: bool | None = None, - ) -> OutputSchema[T] | None: - """Build an OutputSchema dataclass from a response type.""" + ) -> OutputSchema[OutputDataT] | None: + """Build an OutputSchema dataclass from an output type.""" if output_type is str: return None - if isinstance(output_type, ToolOutput): - # do we need to error on conflicts here? (DavidM): If this is internal maybe doesn't matter, if public, use overloads - name = output_type.name - description = output_type.description - output_type_ = output_type.output_type - strict = output_type.strict + output_types: Sequence[SimpleOutputTypeOrMarker[OutputDataT]] + if isinstance(output_type, Sequence): + output_types = output_type else: - output_type_ = output_type + output_types = (output_type,) - if output_type_option := extract_str_from_union(output_type): - output_type_ = output_type_option.value + output_types_flat: list[SimpleOutputTypeOrMarker[OutputDataT]] = [] + for output_type in output_types: + if union_types := get_union_args(output_type): + output_types_flat.extend(union_types) + else: + output_types_flat.append(output_type) + + allow_text_output = False + if str in output_types_flat: allow_text_output = True - else: - allow_text_output = False - - tools: dict[str, OutputSchemaTool[T]] = {} - if args := get_union_args(output_type_): - for i, arg in enumerate(args, start=1): - tool_name = raw_tool_name = union_tool_name(name, arg) - while tool_name in tools: - tool_name = f'{raw_tool_name}_{i}' - tools[tool_name] = cast( - OutputSchemaTool[T], - OutputSchemaTool( - output_type=arg, name=tool_name, description=description, multiple=True, strict=strict - ), - ) - else: - name = name or DEFAULT_OUTPUT_TOOL_NAME - tools[name] = cast( - OutputSchemaTool[T], - OutputSchemaTool( - output_type=output_type_, name=name, description=description, multiple=False, strict=strict - ), + output_types_flat = [t for t in output_types_flat if t is not str] + + multiple = len(output_types_flat) > 1 + + default_tool_name = name or DEFAULT_OUTPUT_TOOL_NAME + default_tool_description = description + default_tool_strict = strict + + tools: dict[str, OutputTool[OutputDataT]] = {} + for output_type in output_types_flat: + tool_name = None + tool_description = None + tool_strict = None + if isinstance(output_type, ToolOutput): + tool_output_type = output_type.output_type + # do we need to error on conflicts here? (DavidM): If this is internal maybe doesn't matter, if public, use overloads + tool_name = output_type.name + tool_description = output_type.description + tool_strict = output_type.strict + else: + tool_output_type = output_type + + if tool_name is None: + tool_name = default_tool_name + if multiple: + tool_name += f'_{tool_output_type.__name__}' + + i = 1 + original_tool_name = tool_name + while tool_name in tools: + i += 1 + tool_name = f'{original_tool_name}_{i}' + + tool_description = tool_description or default_tool_description + if tool_strict is None: + tool_strict = default_tool_strict + + parameters_schema = OutputObjectSchema( + output_type=tool_output_type, description=tool_description, strict=tool_strict ) + tools[tool_name] = OutputTool(name=tool_name, parameters_schema=parameters_schema, multiple=multiple) - return cls(tools=tools, allow_text_output=allow_text_output) + return cls( + tools=tools, + allow_text_output=allow_text_output, + ) def find_named_tool( self, parts: Iterable[_messages.ModelResponsePart], tool_name: str - ) -> tuple[_messages.ToolCallPart, OutputSchemaTool[OutputDataT]] | None: + ) -> tuple[_messages.ToolCallPart, OutputTool[OutputDataT]] | None: """Find a tool that matches one of the calls, with a specific name.""" for part in parts: # pragma: no branch if isinstance(part, _messages.ToolCallPart): # pragma: no branch @@ -148,7 +247,7 @@ def find_named_tool( def find_tool( self, parts: Iterable[_messages.ModelResponsePart], - ) -> Iterator[tuple[_messages.ToolCallPart, OutputSchemaTool[OutputDataT]]]: + ) -> Iterator[tuple[_messages.ToolCallPart, OutputTool[OutputDataT]]]: """Find a tool that matches one of the calls.""" for part in parts: if isinstance(part, _messages.ToolCallPart): # pragma: no branch @@ -164,64 +263,138 @@ def tool_defs(self) -> list[ToolDefinition]: return [t.tool_def for t in self.tools.values()] -DEFAULT_DESCRIPTION = 'The final response which ends this conversation' +def allow_text_output(output_schema: OutputSchema[Any] | None) -> bool: + return output_schema is None or output_schema.allow_text_output + + +@dataclass +class OutputObjectDefinition: + name: str + json_schema: ObjectJsonSchema + description: str | None = None + strict: bool | None = None @dataclass(init=False) -class OutputSchemaTool(Generic[OutputDataT]): - tool_def: ToolDefinition - type_adapter: TypeAdapter[Any] +class OutputObjectSchema(Generic[OutputDataT]): + definition: OutputObjectDefinition + validator: SchemaValidator + function_schema: _function_schema.FunctionSchema | None = None + outer_typed_dict_key: str | None = None def __init__( - self, *, output_type: type[OutputDataT], name: str, description: str | None, multiple: bool, strict: bool | None + self, + *, + output_type: SimpleOutputType[OutputDataT], + name: str | None = None, + description: str | None = None, + strict: bool | None = None, ): - """Build a OutputSchemaTool from a response type.""" - if _utils.is_model_like(output_type): - self.type_adapter = TypeAdapter(output_type) - outer_typed_dict_key: str | None = None - # noinspection PyArgumentList - parameters_json_schema = _utils.check_object_json_schema( - self.type_adapter.json_schema(schema_generator=GenerateToolJsonSchema) - ) + if inspect.isfunction(output_type) or inspect.ismethod(output_type): + self.function_schema = _function_schema.function_schema(output_type, GenerateToolJsonSchema) + self.validator = self.function_schema.validator + json_schema = self.function_schema.json_schema + json_schema['description'] = self.function_schema.description else: - response_data_typed_dict = TypedDict( # noqa: UP013 - 'response_data_typed_dict', - {'response': output_type}, # pyright: ignore[reportInvalidTypeForm] - ) - self.type_adapter = TypeAdapter(response_data_typed_dict) - outer_typed_dict_key = 'response' - # noinspection PyArgumentList - parameters_json_schema = _utils.check_object_json_schema( - self.type_adapter.json_schema(schema_generator=GenerateToolJsonSchema) + type_adapter: TypeAdapter[Any] + if _utils.is_model_like(output_type): + type_adapter = TypeAdapter(output_type) + else: + self.outer_typed_dict_key = 'response' + response_data_typed_dict = TypedDict( # noqa: UP013 + 'response_data_typed_dict', + {'response': cast(type[OutputDataT], output_type)}, # pyright: ignore[reportInvalidTypeForm] + ) + type_adapter = TypeAdapter(response_data_typed_dict) + + # Really a PluggableSchemaValidator, but it's API-compatible + self.validator = cast(SchemaValidator, type_adapter.validator) + json_schema = _utils.check_object_json_schema( + type_adapter.json_schema(schema_generator=GenerateToolJsonSchema) ) - # including `response_data_typed_dict` as a title here doesn't add anything and could confuse the LLM - parameters_json_schema.pop('title') - if json_schema_description := parameters_json_schema.pop('description', None): + if self.outer_typed_dict_key: + # including `response_data_typed_dict` as a title here doesn't add anything and could confuse the LLM + json_schema.pop('title') + + if json_schema_description := json_schema.pop('description', None): if description is None: - tool_description = json_schema_description + description = json_schema_description else: - tool_description = f'{description}. {json_schema_description}' # pragma: no cover + description = f'{description}. {json_schema_description}' + + self.definition = OutputObjectDefinition( + name=name or getattr(output_type, '__name__', DEFAULT_OUTPUT_TOOL_NAME), + description=description, + json_schema=json_schema, + strict=strict, + ) + + async def process( + self, + data: str | dict[str, Any] | None, + run_context: RunContext[AgentDepsT], + allow_partial: bool = False, + ) -> OutputDataT: + """Process an output message, performing validation and (if necessary) calling the output function. + + Args: + data: The output data to validate. + run_context: The current run context. + allow_partial: If true, allow partial validation. + + Returns: + Either the validated output data (left) or a retry message (right). + """ + pyd_allow_partial: Literal['off', 'trailing-strings'] = 'trailing-strings' if allow_partial else 'off' + if isinstance(data, str): + output = self.validator.validate_json(data or '{}', allow_partial=pyd_allow_partial) else: - tool_description = description or DEFAULT_DESCRIPTION + output = self.validator.validate_python(data or {}, allow_partial=pyd_allow_partial) + + if self.function_schema: + output = await self.function_schema.call(output, run_context) + + if k := self.outer_typed_dict_key: + output = output[k] + return output + + +@dataclass(init=False) +class OutputTool(Generic[OutputDataT]): + parameters_schema: OutputObjectSchema[OutputDataT] + tool_def: ToolDefinition + + def __init__(self, *, name: str, parameters_schema: OutputObjectSchema[OutputDataT], multiple: bool): + self.parameters_schema = parameters_schema + definition = parameters_schema.definition + + description = definition.description + if not description: + description = DEFAULT_OUTPUT_TOOL_DESCRIPTION if multiple: - tool_description = f'{union_arg_name(output_type)}: {tool_description}' + description = f'{definition.name}: {description}' self.tool_def = ToolDefinition( name=name, - description=tool_description, - parameters_json_schema=parameters_json_schema, - outer_typed_dict_key=outer_typed_dict_key, - strict=strict, + description=description, + parameters_json_schema=definition.json_schema, + strict=definition.strict, + outer_typed_dict_key=parameters_schema.outer_typed_dict_key, ) - def validate( - self, tool_call: _messages.ToolCallPart, allow_partial: bool = False, wrap_validation_errors: bool = True + async def process( + self, + tool_call: _messages.ToolCallPart, + run_context: RunContext[AgentDepsT], + allow_partial: bool = False, + wrap_validation_errors: bool = True, ) -> OutputDataT: - """Validate an output message. + """Process an output message. Args: tool_call: The tool call from the LLM to validate. + run_context: The current run context. allow_partial: If true, allow partial validation. wrap_validation_errors: If true, wrap the validation errors in a retry message. @@ -229,15 +402,7 @@ def validate( Either the validated output data (left) or a retry message (right). """ try: - pyd_allow_partial: Literal['off', 'trailing-strings'] = 'trailing-strings' if allow_partial else 'off' - if isinstance(tool_call.args, str): - output = self.type_adapter.validate_json( - tool_call.args or '{}', experimental_allow_partial=pyd_allow_partial - ) - else: - output = self.type_adapter.validate_python( - tool_call.args or {}, experimental_allow_partial=pyd_allow_partial - ) + output = await self.parameters_schema.process(tool_call.args, run_context, allow_partial=allow_partial) except ValidationError as e: if wrap_validation_errors: m = _messages.RetryPromptPart( @@ -248,38 +413,20 @@ def validate( raise ToolRetryError(m) from e else: raise # pragma: lax no cover + except ModelRetry as r: + if wrap_validation_errors: + m = _messages.RetryPromptPart( + tool_name=tool_call.tool_name, + content=r.message, + tool_call_id=tool_call.tool_call_id, + ) + raise ToolRetryError(m) from r + else: + raise # pragma: lax no cover else: - if k := self.tool_def.outer_typed_dict_key: - output = output[k] return output -def union_tool_name(base_name: str | None, union_arg: Any) -> str: - return f'{base_name or DEFAULT_OUTPUT_TOOL_NAME}_{union_arg_name(union_arg)}' - - -def union_arg_name(union_arg: Any) -> str: - return union_arg.__name__ - - -def extract_str_from_union(output_type: Any) -> _utils.Option[Any]: - """Extract the string type from a Union, return the remaining union or remaining type.""" - union_args = get_union_args(output_type) - if any(t is str for t in union_args): - remain_args: list[Any] = [] - includes_str = False - for arg in union_args: - if arg is str: - includes_str = True - else: - remain_args.append(arg) - if includes_str: # pragma: no branch - if len(remain_args) == 1: - return _utils.Some(remain_args[0]) - else: - return _utils.Some(Union[tuple(remain_args)]) # pragma: no cover - - def get_union_args(tp: Any) -> tuple[Any, ...]: """Extract the arguments of a Union type if `output_type` is a union, otherwise return an empty tuple.""" if typing_objects.is_typealiastype(tp): diff --git a/pydantic_ai_slim/pydantic_ai/agent.py b/pydantic_ai_slim/pydantic_ai/agent.py index 9f4c9a6c8..c1a1eab38 100644 --- a/pydantic_ai_slim/pydantic_ai/agent.py +++ b/pydantic_ai_slim/pydantic_ai/agent.py @@ -30,7 +30,7 @@ usage as _usage, ) from .models.instrumented import InstrumentationSettings, InstrumentedModel, instrument_model -from .result import FinalResult, OutputDataT, StreamedRunResult, ToolOutput +from .result import FinalResult, OutputDataT, StreamedRunResult from .settings import ModelSettings, merge_model_settings from .tools import ( AgentDepsT, @@ -128,7 +128,7 @@ class Agent(Generic[AgentDepsT, OutputDataT]): be merged with this value, with the runtime argument taking priority. """ - output_type: type[OutputDataT] | ToolOutput[OutputDataT] + output_type: _output.OutputType[OutputDataT] """ The type of data output by agent runs, used to validate the data returned by the model, defaults to `str`. """ @@ -163,7 +163,7 @@ def __init__( self, model: models.Model | models.KnownModelName | str | None = None, *, - output_type: type[OutputDataT] | ToolOutput[OutputDataT] = str, + output_type: _output.OutputType[OutputDataT] = str, instructions: str | _system_prompt.SystemPromptFunc[AgentDepsT] | Sequence[str | _system_prompt.SystemPromptFunc[AgentDepsT]] @@ -201,7 +201,7 @@ def __init__( name: str | None = None, model_settings: ModelSettings | None = None, retries: int = 1, - result_tool_name: str = 'final_result', + result_tool_name: str = _output.DEFAULT_OUTPUT_TOOL_NAME, result_tool_description: str | None = None, result_retries: int | None = None, tools: Sequence[Tool[AgentDepsT] | ToolFuncEither[AgentDepsT, ...]] = (), @@ -217,7 +217,7 @@ def __init__( self, model: models.Model | models.KnownModelName | str | None = None, *, - # TODO change this back to `output_type: type[OutputDataT] | ToolOutput[OutputDataT] = str,` when we remove the overloads + # TODO change this back to `output_type: _output.OutputType[OutputDataT] = str,` when we remove the overloads output_type: Any = str, instructions: str | _system_prompt.SystemPromptFunc[AgentDepsT] @@ -388,7 +388,7 @@ async def run( self, user_prompt: str | Sequence[_messages.UserContent] | None = None, *, - output_type: type[RunOutputDataT] | ToolOutput[RunOutputDataT], + output_type: _output.OutputType[RunOutputDataT], message_history: list[_messages.ModelMessage] | None = None, model: models.Model | models.KnownModelName | str | None = None, deps: AgentDepsT = None, @@ -418,7 +418,7 @@ async def run( self, user_prompt: str | Sequence[_messages.UserContent] | None = None, *, - output_type: type[RunOutputDataT] | ToolOutput[RunOutputDataT] | None = None, + output_type: _output.OutputType[RunOutputDataT] | None = None, message_history: list[_messages.ModelMessage] | None = None, model: models.Model | models.KnownModelName | str | None = None, deps: AgentDepsT = None, @@ -506,7 +506,7 @@ def iter( self, user_prompt: str | Sequence[_messages.UserContent] | None, *, - output_type: type[RunOutputDataT] | ToolOutput[RunOutputDataT], + output_type: _output.OutputType[RunOutputDataT], message_history: list[_messages.ModelMessage] | None = None, model: models.Model | models.KnownModelName | str | None = None, deps: AgentDepsT = None, @@ -538,7 +538,7 @@ async def iter( self, user_prompt: str | Sequence[_messages.UserContent] | None = None, *, - output_type: type[RunOutputDataT] | ToolOutput[RunOutputDataT] | None = None, + output_type: _output.OutputType[RunOutputDataT] | None = None, message_history: list[_messages.ModelMessage] | None = None, model: models.Model | models.KnownModelName | str | None = None, deps: AgentDepsT = None, @@ -785,7 +785,7 @@ def run_sync( self, user_prompt: str | Sequence[_messages.UserContent] | None = None, *, - output_type: type[RunOutputDataT] | ToolOutput[RunOutputDataT] | None, + output_type: _output.OutputType[RunOutputDataT] | None = None, message_history: list[_messages.ModelMessage] | None = None, model: models.Model | models.KnownModelName | str | None = None, deps: AgentDepsT = None, @@ -815,7 +815,7 @@ def run_sync( self, user_prompt: str | Sequence[_messages.UserContent] | None = None, *, - output_type: type[RunOutputDataT] | ToolOutput[RunOutputDataT] | None = None, + output_type: _output.OutputType[RunOutputDataT] | None = None, message_history: list[_messages.ModelMessage] | None = None, model: models.Model | models.KnownModelName | str | None = None, deps: AgentDepsT = None, @@ -898,7 +898,7 @@ def run_stream( self, user_prompt: str | Sequence[_messages.UserContent], *, - output_type: type[RunOutputDataT] | ToolOutput[RunOutputDataT], + output_type: _output.OutputType[RunOutputDataT], message_history: list[_messages.ModelMessage] | None = None, model: models.Model | models.KnownModelName | str | None = None, deps: AgentDepsT = None, @@ -929,7 +929,7 @@ async def run_stream( # noqa C901 self, user_prompt: str | Sequence[_messages.UserContent] | None = None, *, - output_type: type[RunOutputDataT] | ToolOutput[RunOutputDataT] | None = None, + output_type: _output.OutputType[RunOutputDataT] | None = None, message_history: list[_messages.ModelMessage] | None = None, model: models.Model | models.KnownModelName | str | None = None, deps: AgentDepsT = None, @@ -1009,7 +1009,7 @@ async def stream_to_final( if isinstance(maybe_part_event, _messages.PartStartEvent): new_part = maybe_part_event.part if isinstance(new_part, _messages.TextPart): - if _agent_graph.allow_text_output(output_schema): + if _output.allow_text_output(output_schema): return FinalResult(s, None, None) elif isinstance(new_part, _messages.ToolCallPart) and output_schema: for call, _ in output_schema.find_tool([new_part]): @@ -1643,7 +1643,7 @@ def last_run_messages(self) -> list[_messages.ModelMessage]: raise AttributeError('The `last_run_messages` attribute has been removed, use `capture_run_messages` instead.') def _prepare_output_schema( - self, output_type: type[RunOutputDataT] | ToolOutput[RunOutputDataT] | None + self, output_type: _output.OutputType[RunOutputDataT] | None ) -> _output.OutputSchema[RunOutputDataT] | None: if output_type is not None: if self._output_validators: diff --git a/pydantic_ai_slim/pydantic_ai/result.py b/pydantic_ai_slim/pydantic_ai/result.py index 96c2f22d8..443e98b32 100644 --- a/pydantic_ai_slim/pydantic_ai/result.py +++ b/pydantic_ai_slim/pydantic_ai/result.py @@ -5,100 +5,35 @@ from copy import copy from dataclasses import dataclass, field from datetime import datetime -from typing import TYPE_CHECKING, Generic, Union, cast +from typing import Generic, cast from typing_extensions import TypeVar, assert_type, deprecated, overload -from . import _utils, exceptions, messages as _messages, models +from . import _output, _utils, exceptions, messages as _messages, models +from ._output import ( + OutputDataT, + OutputDataT_inv, + OutputSchema, + OutputValidator, + OutputValidatorFunc, + ToolOutput, +) from .messages import AgentStreamEvent, FinalResultEvent from .tools import AgentDepsT, RunContext from .usage import Usage, UsageLimits -if TYPE_CHECKING: - from . import _output - __all__ = 'OutputDataT', 'OutputDataT_inv', 'ToolOutput', 'OutputValidatorFunc' T = TypeVar('T') """An invariant TypeVar.""" -OutputDataT_inv = TypeVar('OutputDataT_inv', default=str) -""" -An invariant type variable for the result data of a model. - -We need to use an invariant typevar for `OutputValidator` and `OutputValidatorFunc` because the output data type is used -in both the input and output of a `OutputValidatorFunc`. This can theoretically lead to some issues assuming that types -possessing OutputValidator's are covariant in the result data type, but in practice this is rarely an issue, and -changing it would have negative consequences for the ergonomics of the library. - -At some point, it may make sense to change the input to OutputValidatorFunc to be `Any` or `object` as doing that would -resolve these potential variance issues. -""" -OutputDataT = TypeVar('OutputDataT', default=str, covariant=True) -"""Covariant type variable for the result data type of a run.""" - -OutputValidatorFunc = Union[ - Callable[[RunContext[AgentDepsT], OutputDataT_inv], OutputDataT_inv], - Callable[[RunContext[AgentDepsT], OutputDataT_inv], Awaitable[OutputDataT_inv]], - Callable[[OutputDataT_inv], OutputDataT_inv], - Callable[[OutputDataT_inv], Awaitable[OutputDataT_inv]], -] -""" -A function that always takes and returns the same type of data (which is the result type of an agent run), and: - -* may or may not take [`RunContext`][pydantic_ai.tools.RunContext] as a first argument -* may or may not be async - -Usage `OutputValidatorFunc[AgentDepsT, T]`. -""" - -DEFAULT_OUTPUT_TOOL_NAME = 'final_result' - - -@dataclass(init=False) -class ToolOutput(Generic[OutputDataT]): - """Marker class to use tools for structured outputs, and customize the tool.""" - - output_type: type[OutputDataT] - # TODO: Add `output_call` support, for calling a function to get the output - # output_call: Callable[..., OutputDataT] | None - name: str - description: str | None - max_retries: int | None - strict: bool | None - - def __init__( - self, - *, - type_: type[OutputDataT], - # call: Callable[..., OutputDataT] | None = None, - name: str = 'final_result', - description: str | None = None, - max_retries: int | None = None, - strict: bool | None = None, - ): - self.output_type = type_ - self.name = name - self.description = description - self.max_retries = max_retries - self.strict = strict - - # TODO: add support for call and make type_ optional, with the following logic: - # if type_ is None and call is None: - # raise ValueError('Either type_ or call must be provided') - # if call is not None: - # if type_ is None: - # type_ = get_type_hints(call).get('return') - # if type_ is None: - # raise ValueError('Unable to determine type_ from call signature; please provide it explicitly') - # self.output_call = call @dataclass class AgentStream(Generic[AgentDepsT, OutputDataT]): _raw_stream_response: models.StreamedResponse - _output_schema: _output.OutputSchema[OutputDataT] | None - _output_validators: list[_output.OutputValidator[AgentDepsT, OutputDataT]] + _output_schema: OutputSchema[OutputDataT] | None + _output_validators: list[OutputValidator[AgentDepsT, OutputDataT]] _run_ctx: RunContext[AgentDepsT] _usage_limits: UsageLimits | None @@ -144,6 +79,7 @@ async def _validate_response( self, message: _messages.ModelResponse, output_tool_name: str | None, *, allow_partial: bool = False ) -> OutputDataT: """Validate a structured result message.""" + call = None if self._output_schema is not None and output_tool_name is not None: match = self._output_schema.find_named_tool(message.parts, output_tool_name) if match is None: @@ -152,21 +88,17 @@ async def _validate_response( ) call, output_tool = match - result_data = output_tool.validate(call, allow_partial=allow_partial, wrap_validation_errors=False) - - for validator in self._output_validators: - result_data = await validator.validate(result_data, call, self._run_ctx) - return result_data + result_data = await output_tool.process( + call, self._run_ctx, allow_partial=allow_partial, wrap_validation_errors=False + ) else: text = '\n\n'.join(x.content for x in message.parts if isinstance(x, _messages.TextPart)) - for validator in self._output_validators: - text = await validator.validate( - text, - None, - self._run_ctx, - ) - # Since there is no output tool, we can assume that str is compatible with OutputDataT - return cast(OutputDataT, text) + # The following cast is safe because we know `str` is an allowed output type + result_data = cast(OutputDataT, text) + + for validator in self._output_validators: + result_data = await validator.validate(result_data, call, self._run_ctx) + return result_data def __aiter__(self) -> AsyncIterator[AgentStreamEvent]: """Stream [`AgentStreamEvent`][pydantic_ai.messages.AgentStreamEvent]s. @@ -180,7 +112,6 @@ def __aiter__(self) -> AsyncIterator[AgentStreamEvent]: async def aiter(): output_schema = self._output_schema - allow_text_output = output_schema is None or output_schema.allow_text_output def _get_final_result_event(e: _messages.ModelResponseStreamEvent) -> _messages.FinalResultEvent | None: """Return an appropriate FinalResultEvent if `e` corresponds to a part that will produce a final result.""" @@ -192,7 +123,7 @@ def _get_final_result_event(e: _messages.ModelResponseStreamEvent) -> _messages. return _messages.FinalResultEvent( tool_name=call.tool_name, tool_call_id=call.tool_call_id ) - elif allow_text_output: # pragma: no branch + elif _output.allow_text_output(output_schema): # pragma: no branch assert_type(e, _messages.PartStartEvent) return _messages.FinalResultEvent(tool_name=None, tool_call_id=None) @@ -224,9 +155,9 @@ class StreamedRunResult(Generic[AgentDepsT, OutputDataT]): _usage_limits: UsageLimits | None _stream_response: models.StreamedResponse - _output_schema: _output.OutputSchema[OutputDataT] | None + _output_schema: OutputSchema[OutputDataT] | None _run_ctx: RunContext[AgentDepsT] - _output_validators: list[_output.OutputValidator[AgentDepsT, OutputDataT]] + _output_validators: list[OutputValidator[AgentDepsT, OutputDataT]] _output_tool_name: str | None _on_complete: Callable[[], Awaitable[None]] @@ -458,6 +389,7 @@ async def validate_structured_output( self, message: _messages.ModelResponse, *, allow_partial: bool = False ) -> OutputDataT: """Validate a structured result message.""" + call = None if self._output_schema is not None and self._output_tool_name is not None: match = self._output_schema.find_named_tool(message.parts, self._output_tool_name) if match is None: @@ -466,17 +398,16 @@ async def validate_structured_output( ) call, output_tool = match - result_data = output_tool.validate(call, allow_partial=allow_partial, wrap_validation_errors=False) - - for validator in self._output_validators: - result_data = await validator.validate(result_data, call, self._run_ctx) # pragma: no cover - return result_data + result_data = await output_tool.process( + call, self._run_ctx, allow_partial=allow_partial, wrap_validation_errors=False + ) else: text = '\n\n'.join(x.content for x in message.parts if isinstance(x, _messages.TextPart)) - for validator in self._output_validators: - text = await validator.validate(text, None, self._run_ctx) # pragma: no cover - # Since there is no output tool, we can assume that str is compatible with OutputDataT - return cast(OutputDataT, text) + result_data = cast(OutputDataT, text) + + for validator in self._output_validators: + result_data = await validator.validate(result_data, call, self._run_ctx) # pragma: no cover + return result_data async def _validate_text_output(self, text: str) -> str: for validator in self._output_validators: diff --git a/pydantic_ai_slim/pydantic_ai/tools.py b/pydantic_ai_slim/pydantic_ai/tools.py index 7d174ba7d..db232ca75 100644 --- a/pydantic_ai_slim/pydantic_ai/tools.py +++ b/pydantic_ai_slim/pydantic_ai/tools.py @@ -1,22 +1,22 @@ from __future__ import annotations as _annotations import dataclasses -import inspect import json from collections.abc import Awaitable, Sequence from dataclasses import dataclass, field -from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, Union, cast +from typing import TYPE_CHECKING, Any, Callable, Generic, Literal, Union from opentelemetry.trace import Tracer from pydantic import ValidationError from pydantic.json_schema import GenerateJsonSchema, JsonSchemaValue -from pydantic_core import SchemaValidator, core_schema +from pydantic_core import core_schema from typing_extensions import Concatenate, ParamSpec, TypeAlias, TypeVar -from . import _pydantic, _utils, messages as _messages, models +from . import _function_schema, _utils, messages as _messages from .exceptions import ModelRetry, UnexpectedModelBehavior if TYPE_CHECKING: + from .models import Model from .result import Usage __all__ = ( @@ -45,7 +45,7 @@ class RunContext(Generic[AgentDepsT]): deps: AgentDepsT """Dependencies for the agent.""" - model: models.Model + model: Model """The model used in this run.""" usage: Usage """LLM usage associated with the run.""" @@ -208,12 +208,7 @@ class Tool(Generic[AgentDepsT]): docstring_format: DocstringFormat require_parameter_descriptions: bool strict: bool | None - _is_async: bool = field(init=False) - _single_arg_name: str | None = field(init=False) - _positional_fields: list[str] = field(init=False) - _var_positional_field: str | None = field(init=False) - _validator: SchemaValidator = field(init=False, repr=False) - _base_parameters_json_schema: ObjectJsonSchema = field(init=False) + function_schema: _function_schema.FunctionSchema """ The base JSON schema for the tool's parameters. @@ -237,6 +232,7 @@ def __init__( require_parameter_descriptions: bool = False, schema_generator: type[GenerateJsonSchema] = GenerateToolJsonSchema, strict: bool | None = None, + function_schema: _function_schema.FunctionSchema | None = None, ): """Create a new tool instance. @@ -289,28 +285,24 @@ async def prep_my_tool( schema_generator: The JSON schema generator class to use. Defaults to `GenerateToolJsonSchema`. strict: Whether to enforce JSON schema compliance (only affects OpenAI). See [`ToolDefinition`][pydantic_ai.tools.ToolDefinition] for more info. + function_schema: The function schema to use for the tool. If not provided, it will be generated. """ - if takes_ctx is None: - takes_ctx = _pydantic.takes_ctx(function) - - f = _pydantic.function_schema( - function, takes_ctx, docstring_format, require_parameter_descriptions, schema_generator - ) self.function = function - self.takes_ctx = takes_ctx + self.function_schema = function_schema or _function_schema.function_schema( + function, + schema_generator, + takes_ctx=takes_ctx, + docstring_format=docstring_format, + require_parameter_descriptions=require_parameter_descriptions, + ) + self.takes_ctx = self.function_schema.takes_ctx self.max_retries = max_retries self.name = name or function.__name__ - self.description = description or f['description'] + self.description = description or self.function_schema.description self.prepare = prepare self.docstring_format = docstring_format self.require_parameter_descriptions = require_parameter_descriptions self.strict = strict - self._is_async = inspect.iscoroutinefunction(self.function) - self._single_arg_name = f['single_arg_name'] - self._positional_fields = f['positional_fields'] - self._var_positional_field = f['var_positional_field'] - self._validator = f['validator'] - self._base_parameters_json_schema = f['json_schema'] async def prepare_tool_def(self, ctx: RunContext[AgentDepsT]) -> ToolDefinition | None: """Get the tool definition. @@ -324,7 +316,7 @@ async def prepare_tool_def(self, ctx: RunContext[AgentDepsT]) -> ToolDefinition tool_def = ToolDefinition( name=self.name, description=self.description, - parameters_json_schema=self._base_parameters_json_schema, + parameters_json_schema=self.function_schema.json_schema, strict=self.strict, ) if self.prepare is not None: @@ -366,21 +358,22 @@ async def _run( self, message: _messages.ToolCallPart, run_context: RunContext[AgentDepsT] ) -> _messages.ToolReturnPart | _messages.RetryPromptPart: try: + validator = self.function_schema.validator if isinstance(message.args, str): - args_dict = self._validator.validate_json(message.args or '{}') + args_dict = validator.validate_json(message.args or '{}') else: - args_dict = self._validator.validate_python(message.args or {}) + args_dict = validator.validate_python(message.args or {}) except ValidationError as e: return self._on_error(e, message) - args, kwargs = self._call_args(args_dict, message, run_context) + ctx = dataclasses.replace( + run_context, + retry=self.current_retry, + tool_name=message.tool_name, + tool_call_id=message.tool_call_id, + ) try: - if self._is_async: - function = cast(Callable[[Any], Awaitable[str]], self.function) - response_content = await function(*args, **kwargs) - else: - function = cast(Callable[[Any], str], self.function) - response_content = await _utils.run_in_executor(function, *args, **kwargs) + response_content = await self.function_schema.call(args_dict, ctx) except ModelRetry as e: return self._on_error(e, message) @@ -391,29 +384,6 @@ async def _run( tool_call_id=message.tool_call_id, ) - def _call_args( - self, - args_dict: dict[str, Any], - message: _messages.ToolCallPart, - run_context: RunContext[AgentDepsT], - ) -> tuple[list[Any], dict[str, Any]]: - if self._single_arg_name: - args_dict = {self._single_arg_name: args_dict} - - ctx = dataclasses.replace( - run_context, - retry=self.current_retry, - tool_name=message.tool_name, - tool_call_id=message.tool_call_id, - ) - args = [ctx] if self.takes_ctx else [] - for positional_field in self._positional_fields: - args.append(args_dict.pop(positional_field)) # pragma: no cover - if self._var_positional_field: - args.extend(args_dict.pop(self._var_positional_field)) - - return args, args_dict - def _on_error( self, exc: ValidationError | ModelRetry, call_message: _messages.ToolCallPart ) -> _messages.RetryPromptPart: diff --git a/tests/test_agent.py b/tests/test_agent.py index 215ae4bf9..68804fe52 100644 --- a/tests/test_agent.py +++ b/tests/test_agent.py @@ -10,6 +10,7 @@ from inline_snapshot import snapshot from pydantic import BaseModel, TypeAdapter, field_validator from pydantic_core import to_json +from typing_extensions import Self from pydantic_ai import Agent, ModelRetry, RunContext, UnexpectedModelBehavior, UserError, capture_run_messages from pydantic_ai.agent import AgentRunResult @@ -29,7 +30,7 @@ ) from pydantic_ai.models.function import AgentInfo, FunctionModel from pydantic_ai.models.test import TestModel -from pydantic_ai.result import Usage +from pydantic_ai.result import ToolOutput, Usage from pydantic_ai.tools import ToolDefinition from .conftest import IsDatetime, IsNow, IsStr, TestEnv @@ -389,8 +390,8 @@ def test_response_tuple(): @pytest.mark.parametrize( 'input_union_callable', - [lambda: Union[str, Foo], lambda: Union[Foo, str], lambda: str | Foo, lambda: Foo | str], - ids=['Union[str, Foo]', 'Union[Foo, str]', 'str | Foo', 'Foo | str'], + [lambda: Union[str, Foo], lambda: Union[Foo, str], lambda: str | Foo, lambda: Foo | str, lambda: [Foo, str]], + ids=['Union[str, Foo]', 'Union[Foo, str]', 'str | Foo', 'Foo | str', '[Foo, str]'], ) def test_response_union_allow_str(input_union_callable: Callable[[], Any]): try: @@ -446,6 +447,7 @@ def validate_output(ctx: RunContext[None], o: Any) -> Any: 'union_code', [ pytest.param('OutputType = Union[Foo, Bar]'), + pytest.param('OutputType = [Foo, Bar]'), pytest.param('OutputType = Foo | Bar', marks=pytest.mark.skipif(sys.version_info < (3, 10), reason='3.10+')), pytest.param( 'OutputType: TypeAlias = Foo | Bar', @@ -461,6 +463,7 @@ def test_response_multiple_return_tools(create_module: Callable[[str], Any], uni from pydantic import BaseModel from typing import Union from typing_extensions import TypeAlias +from pydantic_ai import ToolOutput class Foo(BaseModel): a: int @@ -531,6 +534,601 @@ def validate_output(ctx: RunContext[None], o: Any) -> Any: assert got_tool_call_name == snapshot('final_result_Bar') +def test_output_type_with_two_descriptions(): + class MyOutput(BaseModel): + """Description from docstring""" + + valid: bool + + m = TestModel() + agent = Agent(m, output_type=ToolOutput(MyOutput, description='Description from ToolOutput')) + result = agent.run_sync('Hello') + assert result.output == snapshot(MyOutput(valid=False)) + assert m.last_model_request_parameters is not None + assert m.last_model_request_parameters.output_tools == snapshot( + [ + ToolDefinition( + name='final_result', + description='Description from ToolOutput. Description from docstring', + parameters_json_schema={ + 'properties': {'valid': {'type': 'boolean'}}, + 'required': ['valid'], + 'title': 'MyOutput', + 'type': 'object', + }, + ) + ] + ) + + +def test_output_type_tool_output_union(): + class Foo(BaseModel): + a: int + b: str + + class Bar(BaseModel): + c: bool + + m = TestModel() + marker: ToolOutput[Union[Foo, Bar]] = ToolOutput(Union[Foo, Bar], strict=False) # type: ignore + agent = Agent(m, output_type=marker) + result = agent.run_sync('Hello') + assert result.output == snapshot(Foo(a=0, b='a')) + assert m.last_model_request_parameters is not None + assert m.last_model_request_parameters.output_tools == snapshot( + [ + ToolDefinition( + name='final_result', + description='The final response which ends this conversation', + parameters_json_schema={ + '$defs': { + 'Bar': { + 'properties': {'c': {'type': 'boolean'}}, + 'required': ['c'], + 'title': 'Bar', + 'type': 'object', + }, + 'Foo': { + 'properties': {'a': {'type': 'integer'}, 'b': {'type': 'string'}}, + 'required': ['a', 'b'], + 'title': 'Foo', + 'type': 'object', + }, + }, + 'additionalProperties': False, + 'properties': {'response': {'anyOf': [{'$ref': '#/$defs/Foo'}, {'$ref': '#/$defs/Bar'}]}}, + 'required': ['response'], + 'type': 'object', + }, + outer_typed_dict_key='response', + strict=False, + ) + ] + ) + + +def test_output_type_function(): + class Weather(BaseModel): + temperature: float + description: str + + def get_weather(city: str) -> Weather: + return Weather(temperature=28.7, description='sunny') + + output_tools = None + + def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + nonlocal output_tools + output_tools = info.output_tools + + args_json = '{"city": "Mexico City"}' + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + agent = Agent(FunctionModel(call_tool), output_type=get_weather) + result = agent.run_sync('Mexico City') + assert result.output == snapshot(Weather(temperature=28.7, description='sunny')) + assert output_tools == snapshot( + [ + ToolDefinition( + name='final_result', + description='The final response which ends this conversation', + parameters_json_schema={ + 'additionalProperties': False, + 'properties': {'city': {'type': 'string'}}, + 'required': ['city'], + 'type': 'object', + }, + ) + ] + ) + + +def test_output_type_function_with_run_context(): + class Weather(BaseModel): + temperature: float + description: str + + def get_weather(ctx: RunContext[None], city: str) -> Weather: + assert ctx is not None + return Weather(temperature=28.7, description='sunny') + + output_tools = None + + def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + nonlocal output_tools + output_tools = info.output_tools + + args_json = '{"city": "Mexico City"}' + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + agent = Agent(FunctionModel(call_tool), output_type=get_weather) + result = agent.run_sync('Mexico City') + assert result.output == snapshot(Weather(temperature=28.7, description='sunny')) + assert output_tools == snapshot( + [ + ToolDefinition( + name='final_result', + description='The final response which ends this conversation', + parameters_json_schema={ + 'additionalProperties': False, + 'properties': {'city': {'type': 'string'}}, + 'required': ['city'], + 'type': 'object', + }, + ) + ] + ) + + +def test_output_type_bound_instance_method(): + class Weather(BaseModel): + temperature: float + description: str + + def get_weather(self, city: str) -> Self: + return self + + weather = Weather(temperature=28.7, description='sunny') + + output_tools = None + + def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + nonlocal output_tools + output_tools = info.output_tools + + args_json = '{"city": "Mexico City"}' + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + agent = Agent(FunctionModel(call_tool), output_type=weather.get_weather) + result = agent.run_sync('Mexico City') + assert result.output == snapshot(Weather(temperature=28.7, description='sunny')) + assert output_tools == snapshot( + [ + ToolDefinition( + name='final_result', + description='The final response which ends this conversation', + parameters_json_schema={ + 'additionalProperties': False, + 'properties': {'city': {'type': 'string'}}, + 'required': ['city'], + 'type': 'object', + }, + ) + ] + ) + + +def test_output_type_bound_instance_method_with_run_context(): + class Weather(BaseModel): + temperature: float + description: str + + def get_weather(self, ctx: RunContext[None], city: str) -> Self: + assert ctx is not None + return self + + weather = Weather(temperature=28.7, description='sunny') + + output_tools = None + + def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + nonlocal output_tools + output_tools = info.output_tools + + args_json = '{"city": "Mexico City"}' + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + agent = Agent(FunctionModel(call_tool), output_type=weather.get_weather) + result = agent.run_sync('Mexico City') + assert result.output == snapshot(Weather(temperature=28.7, description='sunny')) + assert output_tools == snapshot( + [ + ToolDefinition( + name='final_result', + description='The final response which ends this conversation', + parameters_json_schema={ + 'additionalProperties': False, + 'properties': {'city': {'type': 'string'}}, + 'required': ['city'], + 'type': 'object', + }, + ) + ] + ) + + +def test_output_type_function_with_retry(): + class Weather(BaseModel): + temperature: float + description: str + + def get_weather(city: str) -> Weather: + if city != 'Mexico City': + raise ModelRetry('City not found, I only know Mexico City') + return Weather(temperature=28.7, description='sunny') + + def call_tool(messages: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + if len(messages) == 1: + args_json = '{"city": "New York City"}' + else: + args_json = '{"city": "Mexico City"}' + + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + agent = Agent(FunctionModel(call_tool), output_type=get_weather) + result = agent.run_sync('New York City') + assert result.output == snapshot(Weather(temperature=28.7, description='sunny')) + assert result.all_messages() == snapshot( + [ + ModelRequest( + parts=[ + UserPromptPart( + content='New York City', + timestamp=IsDatetime(), + ) + ] + ), + ModelResponse( + parts=[ + ToolCallPart( + tool_name='final_result', + args='{"city": "New York City"}', + tool_call_id=IsStr(), + ) + ], + usage=Usage(requests=1, request_tokens=53, response_tokens=7, total_tokens=60), + model_name='function:call_tool:', + timestamp=IsDatetime(), + ), + ModelRequest( + parts=[ + RetryPromptPart( + content='City not found, I only know Mexico City', + tool_name='final_result', + tool_call_id=IsStr(), + timestamp=IsDatetime(), + ) + ] + ), + ModelResponse( + parts=[ + ToolCallPart( + tool_name='final_result', + args='{"city": "Mexico City"}', + tool_call_id=IsStr(), + ) + ], + usage=Usage(requests=1, request_tokens=68, response_tokens=13, total_tokens=81), + model_name='function:call_tool:', + timestamp=IsDatetime(), + ), + ModelRequest( + parts=[ + ToolReturnPart( + tool_name='final_result', + content='Final result processed.', + tool_call_id=IsStr(), + timestamp=IsDatetime(), + ) + ] + ), + ] + ) + + +def test_output_type_async_function(): + class Weather(BaseModel): + temperature: float + description: str + + async def get_weather(city: str) -> Weather: + return Weather(temperature=28.7, description='sunny') + + output_tools = None + + def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + nonlocal output_tools + output_tools = info.output_tools + + args_json = '{"city": "Mexico City"}' + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + agent = Agent(FunctionModel(call_tool), output_type=get_weather) + result = agent.run_sync('Mexico City') + assert result.output == snapshot(Weather(temperature=28.7, description='sunny')) + assert output_tools == snapshot( + [ + ToolDefinition( + name='final_result', + description='The final response which ends this conversation', + parameters_json_schema={ + 'additionalProperties': False, + 'properties': {'city': {'type': 'string'}}, + 'required': ['city'], + 'type': 'object', + }, + ) + ] + ) + + +def test_output_type_function_with_custom_tool_name(): + class Weather(BaseModel): + temperature: float + description: str + + def get_weather(city: str) -> Weather: + return Weather(temperature=28.7, description='sunny') + + output_tools = None + + def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + nonlocal output_tools + output_tools = info.output_tools + + args_json = '{"city": "Mexico City"}' + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + agent = Agent(FunctionModel(call_tool), output_type=ToolOutput(get_weather, name='get_weather')) + result = agent.run_sync('Mexico City') + assert result.output == snapshot(Weather(temperature=28.7, description='sunny')) + assert output_tools == snapshot( + [ + ToolDefinition( + name='get_weather', + description='The final response which ends this conversation', + parameters_json_schema={ + 'additionalProperties': False, + 'properties': {'city': {'type': 'string'}}, + 'required': ['city'], + 'type': 'object', + }, + ) + ] + ) + + +def test_output_type_function_or_model(): + class Weather(BaseModel): + temperature: float + description: str + + def get_weather(city: str) -> Weather: + return Weather(temperature=28.7, description='sunny') + + output_tools = None + + def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + nonlocal output_tools + output_tools = info.output_tools + + args_json = '{"city": "Mexico City"}' + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + agent = Agent(FunctionModel(call_tool), output_type=[get_weather, Weather]) + result = agent.run_sync('Mexico City') + assert result.output == snapshot(Weather(temperature=28.7, description='sunny')) + assert output_tools == snapshot( + [ + ToolDefinition( + name='final_result_get_weather', + description='get_weather: The final response which ends this conversation', + parameters_json_schema={ + 'additionalProperties': False, + 'properties': {'city': {'type': 'string'}}, + 'required': ['city'], + 'type': 'object', + }, + ), + ToolDefinition( + name='final_result_Weather', + description='Weather: The final response which ends this conversation', + parameters_json_schema={ + 'properties': {'temperature': {'type': 'number'}, 'description': {'type': 'string'}}, + 'required': ['temperature', 'description'], + 'title': 'Weather', + 'type': 'object', + }, + ), + ] + ) + + +def test_output_type_handoff_to_agent(): + class Weather(BaseModel): + temperature: float + description: str + + def get_weather(city: str) -> Weather: + return Weather(temperature=28.7, description='sunny') + + def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + args_json = '{"city": "Mexico City"}' + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + agent = Agent(FunctionModel(call_tool), output_type=get_weather) + + handoff_result = None + + async def handoff(city: str) -> Weather: + result = await agent.run(f'Get me the weather in {city}') + nonlocal handoff_result + handoff_result = result + return result.output + + def call_handoff_tool(messages: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + args_json = '{"city": "Mexico City"}' + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + supervisor_agent = Agent(FunctionModel(call_handoff_tool), output_type=handoff) + + result = supervisor_agent.run_sync('Mexico City') + assert result.output == snapshot(Weather(temperature=28.7, description='sunny')) + assert result.all_messages() == snapshot( + [ + ModelRequest( + parts=[ + UserPromptPart( + content='Mexico City', + timestamp=IsDatetime(), + ) + ] + ), + ModelResponse( + parts=[ + ToolCallPart( + tool_name='final_result', + args='{"city": "Mexico City"}', + tool_call_id=IsStr(), + ) + ], + usage=Usage(requests=1, request_tokens=52, response_tokens=6, total_tokens=58), + model_name='function:call_handoff_tool:', + timestamp=IsDatetime(), + ), + ModelRequest( + parts=[ + ToolReturnPart( + tool_name='final_result', + content='Final result processed.', + tool_call_id=IsStr(), + timestamp=IsDatetime(), + ) + ] + ), + ] + ) + assert handoff_result is not None + assert handoff_result.all_messages() == snapshot( + [ + ModelRequest( + parts=[ + UserPromptPart( + content='Get me the weather in Mexico City', + timestamp=IsDatetime(), + ) + ] + ), + ModelResponse( + parts=[ + ToolCallPart( + tool_name='final_result', + args='{"city": "Mexico City"}', + tool_call_id=IsStr(), + ) + ], + usage=Usage(requests=1, request_tokens=57, response_tokens=6, total_tokens=63), + model_name='function:call_tool:', + timestamp=IsDatetime(), + ), + ModelRequest( + parts=[ + ToolReturnPart( + tool_name='final_result', + content='Final result processed.', + tool_call_id=IsStr(), + timestamp=IsDatetime(), + ) + ] + ), + ] + ) + + +def test_output_type_multiple_custom_tools(): + class Weather(BaseModel): + temperature: float + description: str + + def get_weather(city: str) -> Weather: + return Weather(temperature=28.7, description='sunny') + + output_tools = None + + def call_tool(_: list[ModelMessage], info: AgentInfo) -> ModelResponse: + assert info.output_tools is not None + + nonlocal output_tools + output_tools = info.output_tools + + args_json = '{"city": "Mexico City"}' + return ModelResponse(parts=[ToolCallPart(info.output_tools[0].name, args_json)]) + + agent = Agent( + FunctionModel(call_tool), + output_type=[ + ToolOutput(get_weather, name='get_weather'), + ToolOutput(Weather, name='return_weather'), + ], + ) + result = agent.run_sync('Mexico City') + assert result.output == snapshot(Weather(temperature=28.7, description='sunny')) + assert output_tools == snapshot( + [ + ToolDefinition( + name='get_weather', + description='get_weather: The final response which ends this conversation', + parameters_json_schema={ + 'additionalProperties': False, + 'properties': {'city': {'type': 'string'}}, + 'required': ['city'], + 'type': 'object', + }, + ), + ToolDefinition( + name='return_weather', + description='Weather: The final response which ends this conversation', + parameters_json_schema={ + 'properties': {'temperature': {'type': 'number'}, 'description': {'type': 'string'}}, + 'required': ['temperature', 'description'], + 'title': 'Weather', + 'type': 'object', + }, + ), + ] + ) + + def test_run_with_history_new(): m = TestModel() diff --git a/tests/test_examples.py b/tests/test_examples.py index ff74ff80c..ad377bedb 100644 --- a/tests/test_examples.py +++ b/tests/test_examples.py @@ -72,8 +72,12 @@ def find_filter_examples() -> Iterable[ParameterSet]: for ex in find_examples('docs', 'pydantic_ai_slim', 'pydantic_graph', 'pydantic_evals'): if ex.path.name != '_utils.py': + try: + path = ex.path.relative_to(Path.cwd()) + except ValueError: + path = ex.path + test_id = f'{path}:{ex.start_line}' prefix_settings = ex.prefix_settings() - test_id = str(ex) if opt_title := prefix_settings.get('title'): test_id += f':{opt_title}' yield pytest.param(ex, id=test_id) @@ -401,6 +405,32 @@ async def list_tools() -> list[None]: args={'numerator': '123', 'denominator': '456'}, tool_call_id='pyd_ai_2e0e396768a14fe482df90a29a78dc7b', ), + 'Select the names and countries of all capitals': ToolCallPart( + tool_name='final_result_hand_off_to_sql_agent', + args={'query': 'SELECT name, country FROM capitals;'}, + ), + 'SELECT name, country FROM capitals;': ToolCallPart( + tool_name='final_result_run_sql_query', + args={'query': 'SELECT name, country FROM capitals;'}, + ), + 'SELECT * FROM capital_cities;': ToolCallPart( + tool_name='final_result_run_sql_query', + args={'query': 'SELECT * FROM capital_cities;'}, + ), + 'Select all pets': ToolCallPart( + tool_name='final_result_hand_off_to_sql_agent', + args={'query': 'SELECT * FROM pets;'}, + ), + 'SELECT * FROM pets;': ToolCallPart( + tool_name='final_result_run_sql_query', + args={'query': 'SELECT * FROM pets;'}, + ), + 'How do I fly from Amsterdam to Mexico City?': ToolCallPart( + tool_name='final_result_RouterFailure', + args={ + 'explanation': 'I am not equipped to provide travel information, such as flights from Amsterdam to Mexico City.' + }, + ), } tool_responses: dict[tuple[str, str], str] = { @@ -582,6 +612,69 @@ async def model_logic( # noqa: C901 return ModelResponse( parts=[ToolCallPart(tool_name='get_document', args={}, tool_call_id='pyd_ai_tool_call_id')] ) + elif ( + isinstance(m, RetryPromptPart) + and m.tool_name == 'final_result_run_sql_query' + and m.content == "Only 'SELECT *' is supported, you'll have to do column filtering manually." + ): + return ModelResponse( + parts=[ + ToolCallPart( + tool_name='final_result_run_sql_query', + args={'query': 'SELECT * FROM capitals;'}, + tool_call_id='pyd_ai_tool_call_id', + ) + ] + ) + elif ( + isinstance(m, RetryPromptPart) + and m.tool_name == 'final_result_hand_off_to_sql_agent' + and m.content + == "SQL agent failed: Unknown table 'capitals' in query 'SELECT * FROM capitals;'. Available tables: capital_cities." + ): + return ModelResponse( + parts=[ + ToolCallPart( + tool_name='final_result_hand_off_to_sql_agent', + args={'query': 'SELECT * FROM capital_cities;'}, + tool_call_id='pyd_ai_tool_call_id', + ) + ] + ) + elif ( + isinstance(m, RetryPromptPart) + and m.tool_name == 'final_result_run_sql_query' + and m.content == "Unknown table 'pets' in query 'SELECT * FROM pets;'. Available tables: capital_cities." + ): + return ModelResponse( + parts=[ + ToolCallPart( + tool_name='final_result_SQLFailure', + args={ + 'explanation': "The table 'pets' does not exist in the database. Only the table 'capital_cities' is available." + }, + tool_call_id='pyd_ai_tool_call_id', + ) + ] + ) + # SQL agent failed: The table 'pets' does not exist in the database. Only the table 'capital_cities' is available. + elif ( + isinstance(m, RetryPromptPart) + and m.tool_name == 'final_result_hand_off_to_sql_agent' + and m.content + == "SQL agent failed: The table 'pets' does not exist in the database. Only the table 'capital_cities' is available." + ): + return ModelResponse( + parts=[ + ToolCallPart( + tool_name='final_result_RouterFailure', + args={ + 'explanation': "The requested table 'pets' does not exist in the database. The only available table is 'capital_cities', which does not contain data about pets." + }, + tool_call_id='pyd_ai_tool_call_id', + ) + ] + ) else: sys.stdout.write(str(debug.format(messages, info))) raise RuntimeError(f'Unexpected message: {m}') diff --git a/tests/test_tools.py b/tests/test_tools.py index ec2d9cfaf..218c564e4 100644 --- a/tests/test_tools.py +++ b/tests/test_tools.py @@ -572,7 +572,7 @@ def test_tool_return_conflict(): Agent('test', tools=[ctx_tool], deps_type=int, output_type=int) # this raises an error with pytest.raises(UserError, match="Tool name conflicts with result schema name: 'ctx_tool'"): - Agent('test', tools=[ctx_tool], deps_type=int, output_type=ToolOutput(type_=int, name='ctx_tool')) + Agent('test', tools=[ctx_tool], deps_type=int, output_type=ToolOutput(int, name='ctx_tool')) def test_init_ctx_tool_invalid(): diff --git a/tests/typed_agent.py b/tests/typed_agent.py index 676cb3422..180ce2b0d 100644 --- a/tests/typed_agent.py +++ b/tests/typed_agent.py @@ -1,16 +1,19 @@ """This file is used to test static typing, it's analyzed with pyright and mypy.""" -from collections.abc import Awaitable, Iterator -from contextlib import contextmanager +from collections.abc import Awaitable from dataclasses import dataclass from typing import Callable, TypeAlias, Union from typing_extensions import assert_type from pydantic_ai import Agent, ModelRetry, RunContext, Tool +from pydantic_ai._output import ToolOutput from pydantic_ai.agent import AgentRunResult from pydantic_ai.tools import ToolDefinition +# Define here so we can check `if MYPY` below. This will not be executed, MYPY will always set it to True +MYPY = False + @dataclass class MyDeps: @@ -37,16 +40,6 @@ def system_prompt_ok2() -> str: assert_type(system_prompt_ok2, Callable[[], str]) -@contextmanager -def expect_error(error_type: type[Exception]) -> Iterator[None]: - try: - yield None - except Exception as e: - assert isinstance(e, error_type), f'Expected {error_type}, got {type(e)}' - else: - raise AssertionError('Expected an error') - - @typed_agent.tool async def ok_tool(ctx: RunContext[MyDeps], x: str) -> str: assert_type(ctx.deps, MyDeps) @@ -108,13 +101,6 @@ async def bad_tool2(ctx: RunContext[int], x: str) -> str: return f'{x} {ctx.deps}' -with expect_error(ValueError): - - @typed_agent.tool # type: ignore[arg-type] - async def bad_tool3(x: str) -> str: - return x - - @typed_agent.output_validator def ok_validator_simple(data: str) -> str: return data @@ -187,8 +173,51 @@ def foobar_ctx(ctx: RunContext[int], x: str, y: int) -> str: return f'{x} {y}' -def foobar_plain(x: str, y: int) -> str: - return f'{x} {y}' +async def foobar_plain(x: int, y: int) -> int: + return x * y + + +class MyClass: + def my_method(self) -> bool: + return True + + +str_function_agent = Agent(output_type=foobar_ctx) +assert_type(str_function_agent, Agent[None, str]) + +bool_method_agent = Agent(output_type=MyClass().my_method) +assert_type(bool_method_agent, Agent[None, bool]) + +if MYPY: + # mypy requires the generic parameters to be specified explicitly to be happy here + async_int_function_agent = Agent[None, int](output_type=foobar_plain) + assert_type(async_int_function_agent, Agent[None, int]) + + two_models_output_agent = Agent[None, Foo | Bar](output_type=[Foo, Bar]) + assert_type(two_models_output_agent, Agent[None, Foo | Bar]) + + two_scalars_output_agent = Agent[None, int | str](output_type=[int, str]) + assert_type(two_scalars_output_agent, Agent[None, int | str]) + + marker: ToolOutput[bool | tuple[str, int]] = ToolOutput(bool | tuple[str, int]) # type: ignore + complex_output_agent = Agent[None, Foo | Bar | str | int | bool | tuple[str, int]]( + output_type=[Foo, Bar, foobar_ctx, ToolOutput[int](foobar_plain), marker] + ) + assert_type(complex_output_agent, Agent[None, Foo | Bar | str | int | bool | tuple[str, int]]) +else: + # pyright is able to correctly infer the type here + async_int_function_agent = Agent(output_type=foobar_plain) + assert_type(async_int_function_agent, Agent[None, int]) + + two_models_output_agent = Agent(output_type=[Foo, Bar]) + assert_type(two_models_output_agent, Agent[None, Foo | Bar]) + + two_scalars_output_agent = Agent(output_type=[int, str]) + assert_type(two_scalars_output_agent, Agent[None, int | str]) + + marker: ToolOutput[bool | tuple[str, int]] = ToolOutput(bool | tuple[str, int]) # type: ignore + complex_output_agent = Agent(output_type=[Foo, Bar, foobar_ctx, ToolOutput(foobar_plain), marker]) + assert_type(complex_output_agent, Agent[None, Foo | Bar | str | int | bool | tuple[str, int]]) Tool(foobar_ctx, takes_ctx=True) @@ -235,7 +264,6 @@ async def prepare_greet(ctx: RunContext[str], tool_def: ToolDefinition) -> ToolD result = greet_agent.run_sync('testing...', deps='human') assert result.output == '{"greet":"hello a"}' -MYPY = False if not MYPY: default_agent = Agent() assert_type(default_agent, Agent[None, str]) From 6bcc1a8656b894996492932a3b94613d804531ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ca=C3=ADque=20Ara=C3=BAjo=20Sp=C3=B3sito?= Date: Wed, 28 May 2025 09:59:26 -0300 Subject: [PATCH 16/34] Enhance Gemini usage tracking to collect comprehensive token data (#1752) Co-authored-by: Marcelo Trylesinski --- pydantic_ai_slim/pydantic_ai/models/gemini.py | 44 +++++++++++-- pydantic_ai_slim/pydantic_ai/models/google.py | 33 ++++++---- tests/models/test_gemini.py | 36 ++++++++--- tests/models/test_google.py | 62 ++++++++++++++++--- 4 files changed, 143 insertions(+), 32 deletions(-) diff --git a/pydantic_ai_slim/pydantic_ai/models/gemini.py b/pydantic_ai_slim/pydantic_ai/models/gemini.py index 9ecf5da66..53cba2494 100644 --- a/pydantic_ai_slim/pydantic_ai/models/gemini.py +++ b/pydantic_ai_slim/pydantic_ai/models/gemini.py @@ -464,13 +464,12 @@ async def _get_gemini_responses(self) -> AsyncIterator[_GeminiResponse]: responses_to_yield = gemini_responses[:-1] for r in responses_to_yield[current_gemini_response_index:]: current_gemini_response_index += 1 - self._usage += _metadata_as_usage(r) yield r # Now yield the final response, which should be complete if gemini_responses: # pragma: no branch r = gemini_responses[-1] - self._usage += _metadata_as_usage(r) + self._usage = _metadata_as_usage(r) yield r @property @@ -771,8 +770,17 @@ class _GeminiCandidates(TypedDict): safety_ratings: NotRequired[Annotated[list[_GeminiSafetyRating], pydantic.Field(alias='safetyRatings')]] +class _GeminiModalityTokenCount(TypedDict): + """See .""" + + modality: Annotated[ + Literal['MODALITY_UNSPECIFIED', 'TEXT', 'IMAGE', 'VIDEO', 'AUDIO', 'DOCUMENT'], pydantic.Field(alias='modality') + ] + token_count: Annotated[int, pydantic.Field(alias='tokenCount', default=0)] + + class _GeminiUsageMetaData(TypedDict, total=False): - """See . + """See . The docs suggest all fields are required, but some are actually not required, so we assume they are all optional. """ @@ -781,6 +789,20 @@ class _GeminiUsageMetaData(TypedDict, total=False): candidates_token_count: NotRequired[Annotated[int, pydantic.Field(alias='candidatesTokenCount')]] total_token_count: Annotated[int, pydantic.Field(alias='totalTokenCount')] cached_content_token_count: NotRequired[Annotated[int, pydantic.Field(alias='cachedContentTokenCount')]] + thoughts_token_count: NotRequired[Annotated[int, pydantic.Field(alias='thoughtsTokenCount')]] + tool_use_prompt_token_count: NotRequired[Annotated[int, pydantic.Field(alias='toolUsePromptTokenCount')]] + prompt_tokens_details: NotRequired[ + Annotated[list[_GeminiModalityTokenCount], pydantic.Field(alias='promptTokensDetails')] + ] + cache_tokens_details: NotRequired[ + Annotated[list[_GeminiModalityTokenCount], pydantic.Field(alias='cacheTokensDetails')] + ] + candidates_tokens_details: NotRequired[ + Annotated[list[_GeminiModalityTokenCount], pydantic.Field(alias='candidatesTokensDetails')] + ] + tool_use_prompt_tokens_details: NotRequired[ + Annotated[list[_GeminiModalityTokenCount], pydantic.Field(alias='toolUsePromptTokensDetails')] + ] def _metadata_as_usage(response: _GeminiResponse) -> usage.Usage: @@ -789,7 +811,21 @@ def _metadata_as_usage(response: _GeminiResponse) -> usage.Usage: return usage.Usage() # pragma: no cover details: dict[str, int] = {} if cached_content_token_count := metadata.get('cached_content_token_count'): - details['cached_content_token_count'] = cached_content_token_count # pragma: no cover + details['cached_content_tokens'] = cached_content_token_count # pragma: no cover + + if thoughts_token_count := metadata.get('thoughts_token_count'): + details['thoughts_tokens'] = thoughts_token_count + + if tool_use_prompt_token_count := metadata.get('tool_use_prompt_token_count'): + details['tool_use_prompt_tokens'] = tool_use_prompt_token_count # pragma: no cover + + for key, metadata_details in metadata.items(): + if key.endswith('_details') and metadata_details: + metadata_details = cast(list[_GeminiModalityTokenCount], metadata_details) + suffix = key.removesuffix('_details') + for detail in metadata_details: + details[f'{detail["modality"].lower()}_{suffix}'] = detail['token_count'] + return usage.Usage( request_tokens=metadata.get('prompt_token_count', 0), response_tokens=metadata.get('candidates_token_count', 0), diff --git a/pydantic_ai_slim/pydantic_ai/models/google.py b/pydantic_ai_slim/pydantic_ai/models/google.py index 0fbc42808..d79f4fd93 100644 --- a/pydantic_ai_slim/pydantic_ai/models/google.py +++ b/pydantic_ai_slim/pydantic_ai/models/google.py @@ -410,7 +410,7 @@ class GeminiStreamedResponse(StreamedResponse): async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]: async for chunk in self._response: - self._usage += _metadata_as_usage(chunk) + self._usage = _metadata_as_usage(chunk) assert chunk.candidates is not None candidate = chunk.candidates[0] @@ -501,17 +501,28 @@ def _metadata_as_usage(response: GenerateContentResponse) -> usage.Usage: metadata = response.usage_metadata if metadata is None: return usage.Usage() # pragma: no cover - # TODO(Marcelo): We exclude the `prompt_tokens_details` and `candidate_token_details` fields because on - # `usage.Usage.incr``, it will try to sum non-integer values with integers, which will fail. We should probably - # handle this in the `Usage` class. - details = metadata.model_dump( - exclude={'prompt_tokens_details', 'candidates_tokens_details', 'traffic_type'}, - exclude_defaults=True, - ) + metadata = metadata.model_dump(exclude_defaults=True) + + details: dict[str, int] = {} + if cached_content_token_count := metadata.get('cached_content_token_count'): + details['cached_content_tokens'] = cached_content_token_count # pragma: no cover + + if thoughts_token_count := metadata.get('thoughts_token_count'): + details['thoughts_tokens'] = thoughts_token_count + + if tool_use_prompt_token_count := metadata.get('tool_use_prompt_token_count'): + details['tool_use_prompt_tokens'] = tool_use_prompt_token_count # pragma: no cover + + for key, metadata_details in metadata.items(): + if key.endswith('_details') and metadata_details: + suffix = key.removesuffix('_details') + for detail in metadata_details: + details[f'{detail["modality"].lower()}_{suffix}'] = detail['token_count'] + return usage.Usage( - request_tokens=details.pop('prompt_token_count', 0), - response_tokens=details.pop('candidates_token_count', 0), - total_tokens=details.pop('total_token_count', 0), + request_tokens=metadata.get('prompt_token_count', 0), + response_tokens=metadata.get('candidates_token_count', 0), + total_tokens=metadata.get('total_token_count', 0), details=details, ) diff --git a/tests/models/test_gemini.py b/tests/models/test_gemini.py index 17b63c316..13d831e4b 100644 --- a/tests/models/test_gemini.py +++ b/tests/models/test_gemini.py @@ -739,12 +739,12 @@ async def test_stream_text(get_gemini_client: GetGeminiClient): 'Hello world', ] ) - assert result.usage() == snapshot(Usage(requests=1, request_tokens=2, response_tokens=4, total_tokens=6)) + assert result.usage() == snapshot(Usage(requests=1, request_tokens=1, response_tokens=2, total_tokens=3)) async with agent.run_stream('Hello') as result: chunks = [chunk async for chunk in result.stream_text(delta=True, debounce_by=None)] assert chunks == snapshot(['Hello ', 'world']) - assert result.usage() == snapshot(Usage(requests=1, request_tokens=2, response_tokens=4, total_tokens=6)) + assert result.usage() == snapshot(Usage(requests=1, request_tokens=1, response_tokens=2, total_tokens=3)) async def test_stream_invalid_unicode_text(get_gemini_client: GetGeminiClient): @@ -776,7 +776,7 @@ async def test_stream_invalid_unicode_text(get_gemini_client: GetGeminiClient): async with agent.run_stream('Hello') as result: chunks = [chunk async for chunk in result.stream(debounce_by=None)] assert chunks == snapshot(['abc', 'abc€def', 'abc€def']) - assert result.usage() == snapshot(Usage(requests=1, request_tokens=2, response_tokens=4, total_tokens=6)) + assert result.usage() == snapshot(Usage(requests=1, request_tokens=1, response_tokens=2, total_tokens=3)) async def test_stream_text_no_data(get_gemini_client: GetGeminiClient): @@ -847,7 +847,7 @@ async def bar(y: str) -> str: async with agent.run_stream('Hello') as result: response = await result.get_output() assert response == snapshot((1, 2)) - assert result.usage() == snapshot(Usage(requests=2, request_tokens=3, response_tokens=6, total_tokens=9)) + assert result.usage() == snapshot(Usage(requests=2, request_tokens=2, response_tokens=4, total_tokens=6)) assert result.all_messages() == snapshot( [ ModelRequest(parts=[UserPromptPart(content='Hello', timestamp=IsNow(tz=timezone.utc))]), @@ -856,7 +856,7 @@ async def bar(y: str) -> str: ToolCallPart(tool_name='foo', args={'x': 'a'}, tool_call_id=IsStr()), ToolCallPart(tool_name='bar', args={'y': 'b'}, tool_call_id=IsStr()), ], - usage=Usage(request_tokens=2, response_tokens=4, total_tokens=6), + usage=Usage(request_tokens=1, response_tokens=2, total_tokens=3, details={}), model_name='gemini-1.5-flash', timestamp=IsNow(tz=timezone.utc), ), @@ -872,7 +872,7 @@ async def bar(y: str) -> str: ), ModelResponse( parts=[ToolCallPart(tool_name='final_result', args={'response': [1, 2]}, tool_call_id=IsStr())], - usage=Usage(request_tokens=1, response_tokens=2, total_tokens=3), + usage=Usage(request_tokens=1, response_tokens=2, total_tokens=3, details={}), model_name='gemini-1.5-flash', timestamp=IsNow(tz=timezone.utc), ), @@ -1103,7 +1103,13 @@ async def get_image() -> BinaryContent: ), ToolCallPart(tool_name='get_image', args={}, tool_call_id=IsStr()), ], - usage=Usage(requests=1, request_tokens=38, response_tokens=28, total_tokens=427, details={}), + usage=Usage( + requests=1, + request_tokens=38, + response_tokens=28, + total_tokens=427, + details={'thoughts_tokens': 361, 'text_prompt_tokens': 38}, + ), model_name='gemini-2.5-pro-preview-03-25', timestamp=IsDatetime(), vendor_details={'finish_reason': 'STOP'}, @@ -1127,7 +1133,13 @@ async def get_image() -> BinaryContent: ), ModelResponse( parts=[TextPart(content='The image shows a kiwi fruit, sliced in half.')], - usage=Usage(requests=1, request_tokens=360, response_tokens=11, total_tokens=572, details={}), + usage=Usage( + requests=1, + request_tokens=360, + response_tokens=11, + total_tokens=572, + details={'thoughts_tokens': 201, 'text_prompt_tokens': 102, 'image_prompt_tokens': 258}, + ), model_name='gemini-2.5-pro-preview-03-25', timestamp=IsDatetime(), vendor_details={'finish_reason': 'STOP'}, @@ -1250,7 +1262,13 @@ async def test_gemini_model_instructions(allow_model_requests: None, gemini_api_ ), ModelResponse( parts=[TextPart(content='The capital of France is Paris.\n')], - usage=Usage(requests=1, request_tokens=13, response_tokens=8, total_tokens=21, details={}), + usage=Usage( + requests=1, + request_tokens=13, + response_tokens=8, + total_tokens=21, + details={'text_prompt_tokens': 13, 'text_candidates_tokens': 8}, + ), model_name='gemini-1.5-flash', timestamp=IsDatetime(), vendor_details={'finish_reason': 'STOP'}, diff --git a/tests/models/test_google.py b/tests/models/test_google.py index f67fee08c..9228eab07 100644 --- a/tests/models/test_google.py +++ b/tests/models/test_google.py @@ -66,7 +66,15 @@ async def test_google_model(allow_model_requests: None, google_provider: GoogleP result = await agent.run('Hello!') assert result.output == snapshot('Hello there! How can I help you today?\n') - assert result.usage() == snapshot(Usage(requests=1, request_tokens=7, response_tokens=11, total_tokens=18)) + assert result.usage() == snapshot( + Usage( + requests=1, + request_tokens=7, + response_tokens=11, + total_tokens=18, + details={'text_prompt_tokens': 7, 'text_candidates_tokens': 11}, + ) + ) assert result.all_messages() == snapshot( [ ModelRequest( @@ -83,7 +91,13 @@ async def test_google_model(allow_model_requests: None, google_provider: GoogleP ), ModelResponse( parts=[TextPart(content='Hello there! How can I help you today?\n')], - usage=Usage(requests=1, request_tokens=7, response_tokens=11, total_tokens=18, details={}), + usage=Usage( + requests=1, + request_tokens=7, + response_tokens=11, + total_tokens=18, + details={'text_prompt_tokens': 7, 'text_candidates_tokens': 11}, + ), model_name='gemini-1.5-flash', timestamp=IsDatetime(), vendor_details={'finish_reason': 'STOP'}, @@ -116,7 +130,15 @@ async def temperature(city: str, date: datetime.date) -> str: result = await agent.run('What was the temperature in London 1st January 2022?', output_type=Response) assert result.output == snapshot({'temperature': '30°C', 'date': datetime.date(2022, 1, 1), 'city': 'London'}) - assert result.usage() == snapshot(Usage(requests=2, request_tokens=224, response_tokens=35, total_tokens=259)) + assert result.usage() == snapshot( + Usage( + requests=2, + request_tokens=224, + response_tokens=35, + total_tokens=259, + details={'text_prompt_tokens': 224, 'text_candidates_tokens': 35}, + ) + ) assert result.all_messages() == snapshot( [ ModelRequest( @@ -137,7 +159,13 @@ async def temperature(city: str, date: datetime.date) -> str: tool_name='temperature', args={'date': '2022-01-01', 'city': 'London'}, tool_call_id=IsStr() ) ], - usage=Usage(requests=1, request_tokens=101, response_tokens=14, total_tokens=115, details={}), + usage=Usage( + requests=1, + request_tokens=101, + response_tokens=14, + total_tokens=115, + details={'text_prompt_tokens': 101, 'text_candidates_tokens': 14}, + ), model_name='gemini-1.5-flash', timestamp=IsDatetime(), vendor_details={'finish_reason': 'STOP'}, @@ -157,7 +185,13 @@ async def temperature(city: str, date: datetime.date) -> str: tool_call_id=IsStr(), ) ], - usage=Usage(requests=1, request_tokens=123, response_tokens=21, total_tokens=144, details={}), + usage=Usage( + requests=1, + request_tokens=123, + response_tokens=21, + total_tokens=144, + details={'text_prompt_tokens': 123, 'text_candidates_tokens': 21}, + ), model_name='gemini-1.5-flash', timestamp=IsDatetime(), vendor_details={'finish_reason': 'STOP'}, @@ -215,7 +249,7 @@ async def get_capital(country: str) -> str: request_tokens=57, response_tokens=15, total_tokens=173, - details={'thoughts_token_count': 101}, + details={'thoughts_tokens': 101, 'text_prompt_tokens': 57}, ), model_name='models/gemini-2.5-pro-preview-05-06', timestamp=IsDatetime(), @@ -237,7 +271,13 @@ async def get_capital(country: str) -> str: content='I am sorry, I cannot fulfill this request. The country you provided is not supported.' ) ], - usage=Usage(requests=1, request_tokens=104, response_tokens=18, total_tokens=122, details={}), + usage=Usage( + requests=1, + request_tokens=104, + response_tokens=18, + total_tokens=122, + details={'text_prompt_tokens': 104}, + ), model_name='models/gemini-2.5-pro-preview-05-06', timestamp=IsDatetime(), vendor_details={'finish_reason': 'STOP'}, @@ -494,7 +534,13 @@ def instructions() -> str: ), ModelResponse( parts=[TextPart(content='The capital of France is Paris.\n')], - usage=Usage(requests=1, request_tokens=13, response_tokens=8, total_tokens=21, details={}), + usage=Usage( + requests=1, + request_tokens=13, + response_tokens=8, + total_tokens=21, + details={'text_prompt_tokens': 13, 'text_candidates_tokens': 8}, + ), model_name='gemini-2.0-flash', timestamp=IsDatetime(), vendor_details={'finish_reason': 'STOP'}, From 97ff651af5fc5bfa7742c011473f3f4a540d40aa Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Fri, 30 May 2025 10:39:30 +0200 Subject: [PATCH 17/34] more --- pydantic_ai_slim/pydantic_ai/models/google.py | 14 ++++- ...test_google_model_code_execution_tool.yaml | 32 +++++++--- tests/models/test_google.py | 62 ++++++++++++++++++- tests/models/test_groq.py | 4 +- 4 files changed, 100 insertions(+), 12 deletions(-) diff --git a/pydantic_ai_slim/pydantic_ai/models/google.py b/pydantic_ai_slim/pydantic_ai/models/google.py index d79f4fd93..158160ff8 100644 --- a/pydantic_ai_slim/pydantic_ai/models/google.py +++ b/pydantic_ai_slim/pydantic_ai/models/google.py @@ -26,6 +26,8 @@ ModelResponsePart, ModelResponseStreamEvent, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ToolCallPart, @@ -466,7 +468,17 @@ def _process_response_from_parts( ) -> ModelResponse: items: list[ModelResponsePart] = [] for part in parts: - if part.text: + if part.executable_code is not None: + items.append(ServerToolCallPart(args=part.executable_code.model_dump(), tool_name='code_execution')) + elif part.code_execution_result is not None: + items.append( + ServerToolReturnPart( + tool_name='code_execution', + content=part.code_execution_result.output, + tool_call_id="It doesn't have.", + ) + ) + elif part.text: items.append(TextPart(content=part.text)) elif part.function_call: assert part.function_call.name is not None diff --git a/tests/models/cassettes/test_google/test_google_model_code_execution_tool.yaml b/tests/models/cassettes/test_google/test_google_model_code_execution_tool.yaml index 18aac0b64..7301ab260 100644 --- a/tests/models/cassettes/test_google/test_google_model_code_execution_tool.yaml +++ b/tests/models/cassettes/test_google/test_google_model_code_execution_tool.yaml @@ -32,11 +32,11 @@ interactions: alt-svc: - h3=":443"; ma=2592000,h3-29=":443"; ma=2592000 content-length: - - '824' + - '1462' content-type: - application/json; charset=UTF-8 server-timing: - - gfet4t7; dur=634 + - gfet4t7; dur=7674 transfer-encoding: - chunked vary: @@ -47,24 +47,42 @@ interactions: candidates: - content: parts: + - text: |+ + To determine the current day in Utrecht, I need to know the current date and time. I will use a tool to get this information. + + - executableCode: + code: | + import datetime + import pytz + + utrecht_timezone = pytz.timezone('Europe/Amsterdam') + now_utrecht = datetime.datetime.now(utrecht_timezone) + print(now_utrecht.strftime("%A, %Y-%m-%d")) + language: PYTHON + - codeExecutionResult: + outcome: OUTCOME_OK + output: | + Wednesday, 2025-05-28 - text: | - To give you the exact day in Utrecht, I need to know the current date. Can you please provide the date? I can then determine the day. + Today is Wednesday, May 28, 2025 in Utrecht. role: model finishReason: STOP modelVersion: gemini-2.0-flash - responseId: WN42aLH_CoKZgLUP97W1wQg + responseId: 8ww3aLDxJY24qsMP97vYeA usageMetadata: - candidatesTokenCount: 32 + candidatesTokenCount: 119 candidatesTokensDetails: - modality: TEXT - tokenCount: 32 + tokenCount: 119 promptTokenCount: 13 promptTokensDetails: - modality: TEXT tokenCount: 13 + toolUsePromptTokenCount: 114 toolUsePromptTokensDetails: - modality: TEXT - totalTokenCount: 45 + tokenCount: 114 + totalTokenCount: 246 status: code: 200 message: OK diff --git a/tests/models/test_google.py b/tests/models/test_google.py index 9228eab07..748507923 100644 --- a/tests/models/test_google.py +++ b/tests/models/test_google.py @@ -27,6 +27,8 @@ PartDeltaEvent, PartStartEvent, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, TextPartDelta, @@ -41,7 +43,7 @@ with try_import() as imports_successful: from google.genai import _api_client - from google.genai.types import HarmBlockThreshold, HarmCategory + from google.genai.types import HarmBlockThreshold, HarmCategory, Language from pydantic_ai.models.google import GoogleModel, GoogleModelSettings from pydantic_ai.providers.google import GoogleProvider @@ -597,4 +599,60 @@ async def test_google_model_code_execution_tool(allow_model_requests: None, goog agent = Agent(m, system_prompt='You are a helpful chatbot.', builtin_tools=[CodeExecutionTool()]) result = await agent.run('What day is today in Utrecht?') - assert result.output == snapshot('Today is Wednesday, May 28, 2025, in Utrecht.\n') + assert result.all_messages() == snapshot( + [ + ModelRequest( + parts=[ + SystemPromptPart(content='You are a helpful chatbot.', timestamp=IsDatetime()), + UserPromptPart(content='What day is today in Utrecht?', timestamp=IsDatetime()), + ] + ), + ModelResponse( + parts=[ + TextPart( + content="""\ +To determine the current day in Utrecht, I need to know the current date and time. I will use a tool to get this information. + +""" + ), + ServerToolCallPart( + tool_name='code_execution', + args={ + 'code': """\ +import datetime +import pytz + +utrecht_timezone = pytz.timezone('Europe/Amsterdam') +now_utrecht = datetime.datetime.now(utrecht_timezone) +print(now_utrecht.strftime("%A, %Y-%m-%d")) +""", + 'language': Language.PYTHON, + }, + tool_call_id='pyd_ai_8cc0806969e94245b2877a60fab8bf7e', + ), + ServerToolReturnPart( + tool_name='code_execution', + content='Wednesday, 2025-05-28\n', + tool_call_id="It doesn't have.", + timestamp=IsDatetime(), + ), + TextPart(content='Today is Wednesday, May 28, 2025 in Utrecht.\n'), + ], + usage=Usage( + requests=1, + request_tokens=13, + response_tokens=119, + total_tokens=246, + details={ + 'tool_use_prompt_tokens': 114, + 'text_candidates_tokens': 119, + 'text_prompt_tokens': 13, + 'text_tool_use_prompt_tokens': 114, + }, + ), + model_name='gemini-2.0-flash', + timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, + ), + ] + ) diff --git a/tests/models/test_groq.py b/tests/models/test_groq.py index ff8cda1a4..79e3de48c 100644 --- a/tests/models/test_groq.py +++ b/tests/models/test_groq.py @@ -702,7 +702,7 @@ async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_k ServerToolCallPart( tool_name='search', args='{"query": "What is the current date?"}', - tool_call_id='0', + tool_call_id=IsStr(), model_name='groq', ), ServerToolReturnPart( @@ -784,7 +784,7 @@ async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_k Score: 0.2134 """, - tool_call_id='0', + tool_call_id=IsStr(), timestamp=IsDatetime(), ), TextPart(content='The current day is Tuesday.'), From 800a71a4aa85d8fdc41c94391403b8624ca1e81f Mon Sep 17 00:00:00 2001 From: Marcelo Trylesinski Date: Fri, 20 Jun 2025 11:08:04 +0800 Subject: [PATCH 18/34] Pass tests --- tests/models/test_anthropic.py | 1 + tests/models/test_google.py | 148 ++++++++++++++++- tests/models/test_groq.py | 294 +++++++++++++++++++++++++-------- 3 files changed, 374 insertions(+), 69 deletions(-) diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index bbfe42c8c..58a38322f 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -1552,6 +1552,7 @@ async def test_anthropic_server_tool_pass_history_to_another_provider( ), model_name='gpt-4.1-2025-04-14', timestamp=IsDatetime(), + vendor_id='resp_6834631faf2481918638284f62855ddf040b4e5d7e74f261', ), ] ) diff --git a/tests/models/test_google.py b/tests/models/test_google.py index ef973f838..a65a4a83a 100644 --- a/tests/models/test_google.py +++ b/tests/models/test_google.py @@ -6,6 +6,7 @@ from typing import Any, Union import pytest +from google.genai.types import Language from httpx import Request, Timeout from inline_snapshot import Is, snapshot from pytest_mock import MockerFixture @@ -27,6 +28,8 @@ PartDeltaEvent, PartStartEvent, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, TextPartDelta, @@ -599,7 +602,63 @@ async def test_google_model_code_execution_tool(allow_model_requests: None, goog agent = Agent(m, system_prompt='You are a helpful chatbot.', builtin_tools=[CodeExecutionTool()]) result = await agent.run('What day is today in Utrecht?') - assert result.all_messages() == snapshot() + assert result.all_messages() == snapshot( + [ + ModelRequest( + parts=[ + SystemPromptPart(content='You are a helpful chatbot.', timestamp=IsDatetime()), + UserPromptPart(content='What day is today in Utrecht?', timestamp=IsDatetime()), + ] + ), + ModelResponse( + parts=[ + TextPart( + content="""\ +To determine the current day in Utrecht, I need to know the current date and time. I will use a tool to get this information. + +""" + ), + ServerToolCallPart( + tool_name='code_execution', + args={ + 'code': """\ +import datetime +import pytz + +utrecht_timezone = pytz.timezone('Europe/Amsterdam') +now_utrecht = datetime.datetime.now(utrecht_timezone) +print(now_utrecht.strftime("%A, %Y-%m-%d")) +""", + 'language': Language.PYTHON, + }, + tool_call_id=IsStr(), + ), + ServerToolReturnPart( + tool_name='code_execution', + content='Wednesday, 2025-05-28\n', + tool_call_id="It doesn't have.", + timestamp=IsDatetime(), + ), + TextPart(content='Today is Wednesday, May 28, 2025 in Utrecht.\n'), + ], + usage=Usage( + requests=1, + request_tokens=13, + response_tokens=119, + total_tokens=246, + details={ + 'tool_use_prompt_tokens': 114, + 'text_candidates_tokens': 119, + 'text_prompt_tokens': 13, + 'text_tool_use_prompt_tokens': 114, + }, + ), + model_name='gemini-2.0-flash', + timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, + ), + ] + ) async def test_google_model_empty_user_prompt(allow_model_requests: None, google_provider: GoogleProvider): @@ -617,7 +676,91 @@ async def test_google_model_thinking_part(allow_model_requests: None, google_pro settings = GoogleModelSettings(google_thinking_config={'include_thoughts': True}) agent = Agent(m, system_prompt='You are a helpful assistant.', model_settings=settings) result = await agent.run('How do I cross the street?') - assert result.all_messages() == snapshot() + assert result.all_messages() == snapshot( + [ + ModelRequest( + parts=[ + SystemPromptPart(content='You are a helpful assistant.', timestamp=IsDatetime()), + UserPromptPart(content='How do I cross the street?', timestamp=IsDatetime()), + ] + ), + ModelResponse( + parts=[ + ThinkingPart( + content="""\ +**My Approach to Street Crossing Advice** + +Okay, so the user wants to know how to cross the street. Simple question, right? But safety is paramount here. My brain immediately goes into problem-solving mode. First, I have to *deconstruct* the request. Then, I define the core *goal*: crossing safely. That means I need to brainstorm the key principles that make that possible. + +I'm thinking: **visibility**, **awareness**, **predictability**, **caution**, and using designated crossings. These are the building blocks. Now, how to structure this into a clear, helpful response? A step-by-step approach seems best. I'll break it down into *before*, *during*, and some *general tips*. + +Let's flesh this out. "Before" means finding a safe spot: marked **crosswalks**, intersections with signals, or pedestrian bridges/tunnels are ideal. Avoid darting out! Then, I need to *stop* at the curb, *look* and *listen* in all directions, and make eye contact with drivers, if possible. Wait for a *gap* or a signal. + +During crossing, the plan is to *walk*, not run. Keep looking and listening, stay in the crosswalk, and be visible. No distractions like phones. That's the basic framework. + +Now, for the "general tips." Teaching children how to do it is important. Extra caution at night or in bad weather is obvious. I should emphasize *never assume* drivers see you or will stop. Alcohol and drugs are a huge no-no. Watch out for parked cars, and turning vehicles are another common hazard. Always follow local laws! + +Okay, time to refine the language. I want clear, action-oriented verbs and maybe some bullet points for readability. Bolding key terms helps too. And then, I need to consider edge cases. What if there are no crosswalks? Well, find a spot with good visibility and wait for a large gap. What about different traffic rules? I'll just say to look in *all* directions. I want to make sure it covers all bases. + +Finally, a quick review to make sure it's logical, comprehensive, easy to understand, and not too complex. I think this is a good balance between thoroughness and conciseness. Hopefully, this will keep people safe! +""" + ), + TextPart( + content="""\ +Crossing the street safely is crucial! Here's a step-by-step guide: + +1. **Find a Safe Place to Cross:** + * **Best:** Use a designated pedestrian crossing (zebra stripes, crosswalk lines) or an intersection with traffic lights and pedestrian signals ("walk/don't walk" signs). + * **Good:** If no designated crossing is nearby, go to a street corner or an area where you have a clear view of traffic in all directions. + * **Avoid:** Crossing between parked cars, on a curve, or near the crest of a hill where drivers can't see you easily. + +2. **Stop at the Edge:** + * Stop at the curb or the edge of the road. Don't step into the street yet. + +3. **Look and Listen for Traffic:** + * **Look Left:** Check for oncoming traffic. + * **Look Right:** Check for oncoming traffic from the other direction. + * **Look Left Again:** Double-check the closest lane of traffic before stepping out. + * **Listen:** Sometimes you can hear traffic before you see it, especially large vehicles or motorcycles. + +4. **Wait for a Safe Gap (or the Signal):** + * **No Signal:** Wait until there's a large enough gap in traffic for you to cross safely without rushing. Make sure drivers have seen you and have time to stop if necessary. Try to make eye contact with drivers. + * **With Signal:** Wait for the "WALK" signal or the little green walking person symbol. Even with a green signal, quickly check for turning vehicles before stepping off the curb. + +5. **Cross Alertly:** + * **Walk, Don't Run:** Walking briskly is good, but running can increase your risk of tripping and falling. + * **Keep Looking and Listening:** Continue to check for traffic as you cross. The situation can change quickly. + * **Stay Visible:** If it's dark or visibility is poor (rain, fog), wear bright or reflective clothing. + * **Avoid Distractions:** Put away your phone, take off headphones, and focus on crossing safely. + +6. **If There's a Median Strip or Island:** + * Cross to the median, stop, and repeat the "Look Left, Right, Left" process for the next set of lanes before continuing. + +**Key Things to Remember:** + +* **Never assume a driver sees you.** Always try to make eye contact. +* **Be extra careful at night or in bad weather.** +* **Teach children these rules** and hold their hands when crossing. +* **Obey traffic signals and signs.** +* **Don't dart out** into the street. + +Stay safe!\ +""" + ), + ], + usage=Usage( + requests=1, + request_tokens=15, + response_tokens=606, + total_tokens=1704, + details={'thoughts_tokens': 1083, 'text_prompt_tokens': 15}, + ), + model_name='models/gemini-2.5-pro-preview-05-06', + timestamp=IsDatetime(), + vendor_details={'finish_reason': 'STOP'}, + ), + ] + ) async def test_google_model_thinking_part_iter(allow_model_requests: None, google_provider: GoogleProvider): @@ -766,7 +909,6 @@ async def test_google_url_input( @pytest.mark.skipif( not os.getenv('CI', False), reason='Requires properly configured local google vertex config to pass' ) -@pytest.mark.vcr() async def test_google_url_input_force_download(allow_model_requests: None) -> None: provider = GoogleProvider(project='pydantic-ai', location='us-central1') m = GoogleModel('gemini-2.0-flash', provider=provider) diff --git a/tests/models/test_groq.py b/tests/models/test_groq.py index 1153a48e7..2764a7bb6 100644 --- a/tests/models/test_groq.py +++ b/tests/models/test_groq.py @@ -22,6 +22,8 @@ ModelRequest, ModelResponse, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ThinkingPart, @@ -31,7 +33,7 @@ ) from pydantic_ai.usage import Usage -from ..conftest import IsDatetime, IsNow, IsStr, raise_if_exception, try_import +from ..conftest import IsDatetime, IsInstance, IsNow, IsStr, raise_if_exception, try_import from .mock_async_stream import MockAsyncStream with try_import() as imports_successful: @@ -522,7 +524,6 @@ async def test_no_delta(allow_model_requests: None): assert result.is_complete -@pytest.mark.vcr() async def test_extra_headers(allow_model_requests: None, groq_api_key: str): # This test doesn't do anything, it's just here to ensure that calls with `extra_headers` don't cause errors, including type. m = GroqModel('llama-3.3-70b-versatile', provider=GroqProvider(api_key=groq_api_key)) @@ -530,7 +531,6 @@ async def test_extra_headers(allow_model_requests: None, groq_api_key: str): await agent.run('hello') -@pytest.mark.vcr() async def test_image_url_input(allow_model_requests: None, groq_api_key: str): m = GroqModel('meta-llama/llama-4-scout-17b-16e-instruct', provider=GroqProvider(api_key=groq_api_key)) agent = Agent(m) @@ -546,7 +546,6 @@ async def test_image_url_input(allow_model_requests: None, groq_api_key: str): ) -@pytest.mark.vcr() async def test_image_as_binary_content_tool_response( allow_model_requests: None, groq_api_key: str, image_content: BinaryContent ): @@ -685,17 +684,207 @@ async def test_groq_model_instructions(allow_model_requests: None, groq_api_key: ) -@pytest.mark.vcr() async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_key: str): m = GroqModel('compound-beta', provider=GroqProvider(api_key=groq_api_key)) agent = Agent(m, builtin_tools=[WebSearchTool()]) result = await agent.run('What day is today?') assert result.output == snapshot('The current day is Tuesday.') - assert result.all_messages() == snapshot() + assert result.all_messages() == snapshot( + [ + ModelRequest(parts=[UserPromptPart(content='What day is today?', timestamp=IsDatetime())]), + ModelResponse( + parts=[ + ServerToolCallPart( + tool_name='search', + args='{"query": "What is the current date?"}', + tool_call_id=IsStr(), + model_name='groq', + ), + ServerToolReturnPart( + tool_name='search', + content="""\ +Title: Today's Date - Find Out Quickly What's The Date Today ️ +URL: https://calendarhours.com/todays-date/ +Content: The current date in RFC 2822 Format with shortened day of week, numerical date, three-letter month abbreviation, year, time, and time zone is: Tue, 13 May 2025 06:07:56 -0400; The current date in Unix Epoch Format with number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT) is: +Score: 0.8299 + +Title: Today's Date | Current date now - MaxTables +URL: https://maxtables.com/tools/todays-date.html +Content: The current date, including day of the week, month, day, and year. The exact time, down to seconds. Details on the time zone, its location, and its GMT difference. A tool to select the present date. A visual calendar chart. Why would I need to check Today's Date on this platform instead of my device? +Score: 0.7223 + +Title: Current Time and Date - Exact Time! +URL: https://time-and-calendar.com/ +Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchonizing in real time with our server clock. +Score: 0.6799 + +Title: Today's Date - CalendarDate.com +URL: https://www.calendardate.com/todays.htm +Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemishpere flip seasons - i.e. Winter is Summer. +Score: 0.6416 + +Title: What is the date today | Today's Date +URL: https://www.datetoday.info/ +Content: Master time tracking with Today's Date. Stay updated with real-time information on current date, time, day of the week, days left in the week, current day and remaining days of the year. Explore time in globally accepted formats. Keep up with the current week and month, along with the remaining weeks and months for the year. Embrace efficient time tracking with Today's Date. +Score: 0.6282 + +Title: Explore Today's Date, Time Zones, Holidays & More +URL: https://whatdateis.today/ +Content: Check what date and time it is today (May 8, 2025). View current time across different time zones, upcoming holidays, and use our date calculator. Your one-stop destination for all date and time information. +Score: 0.6181 + +Title: Today's Date and Time - Date and Time Tools +URL: https://todaysdatetime.com/ +Content: Discover today's exact date and time, learn about time zones, date formats, and explore our comprehensive collection of date and time tools including calculators, converters, and calendars. ... Get the exact current date and time, along with powerful calculation tools for all your scheduling needs. 12h. Today. Day 76 of year (366) Yesterday +Score: 0.5456 + +Title: Current Time Now - What time is it? - RapidTables.com +URL: https://www.rapidtables.com/tools/current-time.html +Content: This page includes the following information: Current time: hours, minutes, seconds. Today's date: day of week, month, day, year. Time zone with location and GMT offset. +Score: 0.4255 + +Title: Current Time +URL: https://www.timeanddate.com/ +Content: Welcome to the world's top site for time, time zones, and astronomy. Organize your life with free online info and tools you can rely on. No sign-up needed. Sign in. News. News Home; Astronomy News; ... Current Time. Monday May 12, 2025 Roanoke Rapids, North Carolina, USA. Set home location. 11:27: 03 pm. World Clock. +Score: 0.3876 + +Title: Current local time in the United States - World clock +URL: https://dateandtime.info/country.php?code=US +Content: Time and Date of DST Change Time Change; DST started: Sunday, March 9, 2025 at 2:00 AM: The clocks were put forward an hour to 3:00 AM. DST ends: Sunday, November 2, 2025 at 2:00 AM: The clocks will be put back an hour to 1:00 AM. DST starts: Sunday, March 8, 2026 at 2:00 AM: The clocks will be put forward an hour to 3:00 AM. +Score: 0.3042 + +Title: Time.is - exact time, any time zone +URL: https://time.is/ +Content: 7 million locations, 58 languages, synchronized with atomic clock time. Time.is. Get Time.is Ad-free! Exact time now: 05:08:45. Tuesday, 13 May, 2025, week 20. Sun: ↑ 05:09 ↓ 20:45 (15h 36m) - More info - Make London time default - Remove from favorite locations +Score: 0.2796 + +Title: Time in United States now +URL: https://time.is/United_States +Content: Exact time now, time zone, time difference, sunrise/sunset time and key facts for United States. Time.is. Get Time.is Ad-free! Time in United States now . 11:17:42 PM. Monday, May 12, 2025. United States (incl. dependent territories) has 11 time zones. The time zone for the capital Washington, D.C. is used here. +Score: 0.2726 + +Title: Current Local Time in the United States - timeanddate.com +URL: https://www.timeanddate.com/worldclock/usa +Content: United States time now. USA time zones and time zone map with current time in each state. +Score: 0.2519 + +Title: Current local time in United States - World Time Clock & Map +URL: https://24timezones.com/United-States/time +Content: Check the current time in United States and time zone information, the UTC offset and daylight saving time dates in 2025. +Score: 0.2221 + +Title: The World Clock — Worldwide - timeanddate.com +URL: https://www.timeanddate.com/worldclock/ +Content: World time and date for cities in all time zones. International time right now. Takes into account all DST clock changes. +Score: 0.2134 + +""", + tool_call_id=IsStr(), + timestamp=IsDatetime(), + ), + ThinkingPart( + content="""\ + +To determine the current day, I need to access real-time information. I will use the search tool to find out the current date. + + +search(What is the current date?) + +Title: Today's Date - Find Out Quickly What's The Date Today ️ +URL: https://calendarhours.com/todays-date/ +Content: The current date in RFC 2822 Format with shortened day of week, numerical date, three-letter month abbreviation, year, time, and time zone is: Tue, 13 May 2025 06:07:56 -0400; The current date in Unix Epoch Format with number of seconds that have elapsed since January 1, 1970 (midnight UTC/GMT) is: +Score: 0.8299 + +Title: Today's Date | Current date now - MaxTables +URL: https://maxtables.com/tools/todays-date.html +Content: The current date, including day of the week, month, day, and year. The exact time, down to seconds. Details on the time zone, its location, and its GMT difference. A tool to select the present date. A visual calendar chart. Why would I need to check Today's Date on this platform instead of my device? +Score: 0.7223 + +Title: Current Time and Date - Exact Time! +URL: https://time-and-calendar.com/ +Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchonizing in real time with our server clock. +Score: 0.6799 + +Title: Today's Date - CalendarDate.com +URL: https://www.calendardate.com/todays.htm +Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemishpere flip seasons - i.e. Winter is Summer. +Score: 0.6416 + +Title: What is the date today | Today's Date +URL: https://www.datetoday.info/ +Content: Master time tracking with Today's Date. Stay updated with real-time information on current date, time, day of the week, days left in the week, current day and remaining days of the year. Explore time in globally accepted formats. Keep up with the current week and month, along with the remaining weeks and months for the year. Embrace efficient time tracking with Today's Date. +Score: 0.6282 + +Title: Explore Today's Date, Time Zones, Holidays & More +URL: https://whatdateis.today/ +Content: Check what date and time it is today (May 8, 2025). View current time across different time zones, upcoming holidays, and use our date calculator. Your one-stop destination for all date and time information. +Score: 0.6181 + +Title: Today's Date and Time - Date and Time Tools +URL: https://todaysdatetime.com/ +Content: Discover today's exact date and time, learn about time zones, date formats, and explore our comprehensive collection of date and time tools including calculators, converters, and calendars. ... Get the exact current date and time, along with powerful calculation tools for all your scheduling needs. 12h. Today. Day 76 of year (366) Yesterday +Score: 0.5456 + +Title: Current Time Now - What time is it? - RapidTables.com +URL: https://www.rapidtables.com/tools/current-time.html +Content: This page includes the following information: Current time: hours, minutes, seconds. Today's date: day of week, month, day, year. Time zone with location and GMT offset. +Score: 0.4255 + +Title: Current Time +URL: https://www.timeanddate.com/ +Content: Welcome to the world's top site for time, time zones, and astronomy. Organize your life with free online info and tools you can rely on. No sign-up needed. Sign in. News. News Home; Astronomy News; ... Current Time. Monday May 12, 2025 Roanoke Rapids, North Carolina, USA. Set home location. 11:27: 03 pm. World Clock. +Score: 0.3876 + +Title: Current local time in the United States - World clock +URL: https://dateandtime.info/country.php?code=US +Content: Time and Date of DST Change Time Change; DST started: Sunday, March 9, 2025 at 2:00 AM: The clocks were put forward an hour to 3:00 AM. DST ends: Sunday, November 2, 2025 at 2:00 AM: The clocks will be put back an hour to 1:00 AM. DST starts: Sunday, March 8, 2026 at 2:00 AM: The clocks will be put forward an hour to 3:00 AM. +Score: 0.3042 + +Title: Time.is - exact time, any time zone +URL: https://time.is/ +Content: 7 million locations, 58 languages, synchronized with atomic clock time. Time.is. Get Time.is Ad-free! Exact time now: 05:08:45. Tuesday, 13 May, 2025, week 20. Sun: ↑ 05:09 ↓ 20:45 (15h 36m) - More info - Make London time default - Remove from favorite locations +Score: 0.2796 + +Title: Time in United States now +URL: https://time.is/United_States +Content: Exact time now, time zone, time difference, sunrise/sunset time and key facts for United States. Time.is. Get Time.is Ad-free! Time in United States now . 11:17:42 PM. Monday, May 12, 2025. United States (incl. dependent territories) has 11 time zones. The time zone for the capital Washington, D.C. is used here. +Score: 0.2726 + +Title: Current Local Time in the United States - timeanddate.com +URL: https://www.timeanddate.com/worldclock/usa +Content: United States time now. USA time zones and time zone map with current time in each state. +Score: 0.2519 + +Title: Current local time in United States - World Time Clock & Map +URL: https://24timezones.com/United-States/time +Content: Check the current time in United States and time zone information, the UTC offset and daylight saving time dates in 2025. +Score: 0.2221 + +Title: The World Clock — Worldwide - timeanddate.com +URL: https://www.timeanddate.com/worldclock/ +Content: World time and date for cities in all time zones. International time right now. Takes into account all DST clock changes. +Score: 0.2134 + + +The current date is Tuesday, May 13, 2025. + + + +The current day is Tuesday.\ +""" + ), + TextPart(content='The current day is Tuesday.'), + ], + usage=Usage(requests=1, request_tokens=4287, response_tokens=117, total_tokens=4404), + model_name='compound-beta', + timestamp=IsDatetime(), + vendor_id='stub', + ), + ] + ) -@pytest.mark.vcr() async def test_groq_model_thinking_part(allow_model_requests: None, groq_api_key: str): m = GroqModel('deepseek-r1-distill-llama-70b', provider=GroqProvider(api_key=groq_api_key)) settings = GroqModelSettings(groq_reasoning_format='raw') @@ -709,64 +898,7 @@ async def test_groq_model_thinking_part(allow_model_requests: None, groq_api_key instructions='You are a chef.', ), ModelResponse( - parts=[ - ThinkingPart(content=IsStr()), - TextPart( - content="""\ - - -To make Uruguayan alfajores, follow these organized steps for a delightful baking experience: - -### Ingredients: -- 2 cups all-purpose flour -- 1 cup cornstarch -- 1 tsp baking powder -- 1/2 tsp salt -- 1 cup unsalted butter, softened -- 1 cup powdered sugar -- 1 egg -- 1 tsp vanilla extract -- Dulce de leche (store-bought or homemade) -- Powdered sugar for coating - -### Instructions: - -1. **Preheat Oven:** - - Preheat your oven to 300°F (150°C). Line a baking sheet with parchment paper. - -2. **Prepare Dough:** - - In a bowl, whisk together flour, cornstarch, baking powder, and salt. - - In another bowl, cream butter and powdered sugar until smooth. Add egg and vanilla, mixing well. - - Gradually incorporate the dry ingredients into the wet mixture until a dough forms. Wrap and let rest for 30 minutes. - -3. **Roll and Cut:** - - Roll dough to 1/4 inch thickness. Cut into 2-inch circles using a cutter or glass. - -4. **Bake:** - - Place cookies on the prepared baking sheet, bake for 15-20 minutes until edges are lightly golden. Cool on the sheet for 5 minutes, then transfer to a wire rack to cool completely. - -5. **Assemble Alfajores:** - - Spread a layer of dulce de leche on one cookie half. Sandwich with another cookie. Handle gently to avoid breaking. - -6. **Coat with Powdered Sugar:** - - Roll each alfajor in powdered sugar, pressing gently to adhere. - -7. **Optional Chocolate Coating:** - - For a chocolate version, melt chocolate and dip alfajores, then chill to set. - -8. **Storage:** - - Store in an airtight container at room temperature for up to a week. Freeze for longer storage. - -### Tips: -- Ensure butter is softened for smooth creaming. -- Check cookies after 15 minutes to avoid over-browning. -- Allow cookies to cool completely before handling. -- Homemade dulce de leche can be made by heating condensed milk until thickened. - -Enjoy your traditional Uruguayan alfajores with a cup of coffee or tea!\ -""" - ), - ], + parts=[IsInstance(ThinkingPart), IsInstance(TextPart)], usage=Usage(requests=1, request_tokens=21, response_tokens=1414, total_tokens=1435), model_name='deepseek-r1-distill-llama-70b', timestamp=IsDatetime(), @@ -780,4 +912,34 @@ async def test_groq_model_thinking_part(allow_model_requests: None, groq_api_key message_history=result.all_messages(), model_settings=GroqModelSettings(groq_reasoning_format='parsed'), ) - assert result.all_messages() == snapshot() + assert result.all_messages() == snapshot( + [ + ModelRequest( + parts=[UserPromptPart(content='I want a recipe to cook Uruguayan alfajores.', timestamp=IsDatetime())], + instructions='You are a chef.', + ), + ModelResponse( + parts=[IsInstance(ThinkingPart), IsInstance(TextPart)], + usage=Usage(requests=1, request_tokens=21, response_tokens=1414, total_tokens=1435), + model_name='deepseek-r1-distill-llama-70b', + timestamp=IsDatetime(), + vendor_id='chatcmpl-9748c1af-1065-410a-969a-d7fb48039fbb', + ), + ModelRequest( + parts=[ + UserPromptPart( + content='Considering the Uruguayan recipe, how can I cook the Argentinian one?', + timestamp=IsDatetime(), + ) + ], + instructions='You are a chef.', + ), + ModelResponse( + parts=[IsInstance(ThinkingPart), IsInstance(TextPart)], + usage=Usage(requests=1, request_tokens=524, response_tokens=1590, total_tokens=2114), + model_name='deepseek-r1-distill-llama-70b', + timestamp=IsDatetime(), + vendor_id='chatcmpl-994aa228-883a-498c-8b20-9655d770b697', + ), + ] + ) From bc298d6025bb891cfcf7b9b9bce3199d647179f7 Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Mon, 30 Jun 2025 17:07:25 -0700 Subject: [PATCH 19/34] Fix remaining merge conflict markers in openai.py, anthropic.py, and test_google.py --- .../pydantic_ai/models/anthropic.py | 18 ++---------------- pydantic_ai_slim/pydantic_ai/models/openai.py | 3 --- tests/models/test_google.py | 4 ---- 3 files changed, 2 insertions(+), 23 deletions(-) diff --git a/pydantic_ai_slim/pydantic_ai/models/anthropic.py b/pydantic_ai_slim/pydantic_ai/models/anthropic.py index ee7a26ee9..510fe54fc 100644 --- a/pydantic_ai_slim/pydantic_ai/models/anthropic.py +++ b/pydantic_ai_slim/pydantic_ai/models/anthropic.py @@ -418,19 +418,6 @@ async def _map_message(self, messages: list[ModelMessage]) -> tuple[str, list[Be ) assistant_content_params.append(tool_use_block_param) elif isinstance(response_part, ThinkingPart): -<<<<<<< HEAD - # NOTE: We don't send ThinkingPart to the providers yet. If you are unsatisfied with this, - # please open an issue. The below code is the code to send thinking to the provider. - # assert response_part.signature is not None, 'Thinking part must have a signature' - # assistant_content_params.append( - # BetaThinkingBlockParam( - # thinking=response_part.content, signature=response_part.signature, type='thinking' - # ) - # ) - pass - elif isinstance(response_part, ServerToolCallPart): - server_tool_use_block_param = BetaServerToolUseBlockParam( -======= # NOTE: We only send thinking part back for Anthropic, otherwise they raise an error. if response_part.signature is not None: # pragma: no branch assistant_content_params.append( @@ -438,9 +425,8 @@ async def _map_message(self, messages: list[ModelMessage]) -> tuple[str, list[Be thinking=response_part.content, signature=response_part.signature, type='thinking' ) ) - else: - tool_use_block_param = BetaToolUseBlockParam( ->>>>>>> main + elif isinstance(response_part, ServerToolCallPart): + server_tool_use_block_param = BetaServerToolUseBlockParam( id=_guard_tool_call_id(t=response_part), type='server_tool_use', name=cast(Literal['web_search', 'code_execution'], response_part.tool_name), diff --git a/pydantic_ai_slim/pydantic_ai/models/openai.py b/pydantic_ai_slim/pydantic_ai/models/openai.py index 2d7a22802..c3e169b10 100644 --- a/pydantic_ai_slim/pydantic_ai/models/openai.py +++ b/pydantic_ai_slim/pydantic_ai/models/openai.py @@ -276,12 +276,9 @@ async def _completions_create( model_request_parameters: ModelRequestParameters, ) -> chat.ChatCompletion | AsyncStream[ChatCompletionChunk]: tools = self._get_tools(model_request_parameters) -<<<<<<< HEAD web_search_options = self._get_web_search_options(model_request_parameters) # standalone function to make it easier to override -======= ->>>>>>> main if not tools: tool_choice: Literal['none', 'required', 'auto'] | None = None elif not model_request_parameters.allow_text_output: diff --git a/tests/models/test_google.py b/tests/models/test_google.py index 72e929530..280c94a45 100644 --- a/tests/models/test_google.py +++ b/tests/models/test_google.py @@ -5,12 +5,8 @@ from typing import Any import pytest -<<<<<<< HEAD from google.genai.types import Language from httpx import Request, Timeout -======= -from httpx import Timeout ->>>>>>> main from inline_snapshot import Is, snapshot from pydantic import BaseModel from typing_extensions import TypedDict From 46c06c2af6b87aca5dcb562aeea346016c91848f Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Mon, 30 Jun 2025 17:58:04 -0700 Subject: [PATCH 20/34] add extra google --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 30c8c4584..3977bf1cb 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -154,7 +154,7 @@ jobs: - run: mkdir coverage # run tests with just `pydantic-ai-slim` dependencies - - run: uv run --package pydantic-ai-slim coverage run -m pytest + - run: uv run --package pydantic-ai-slim --extra google coverage run -m pytest env: COVERAGE_FILE: coverage/.coverage.${{ runner.os }}-py${{ matrix.python-version }}-slim From 349656730e2250f613a356f1ace23a45162ef898 Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Mon, 30 Jun 2025 18:12:53 -0700 Subject: [PATCH 21/34] fix formatting --- pydantic_ai_slim/pydantic_ai/models/google.py | 2 +- pydantic_ai_slim/pydantic_ai/models/openai.py | 2 +- tests/models/test_google.py | 2 +- tests/test_logfire.py | 9 ++++++++- 4 files changed, 11 insertions(+), 4 deletions(-) diff --git a/pydantic_ai_slim/pydantic_ai/models/google.py b/pydantic_ai_slim/pydantic_ai/models/google.py index 3d212c0e5..1756a8580 100644 --- a/pydantic_ai_slim/pydantic_ai/models/google.py +++ b/pydantic_ai_slim/pydantic_ai/models/google.py @@ -11,8 +11,8 @@ from typing_extensions import assert_never from .. import UnexpectedModelBehavior, _utils, usage -from ..builtin_tools import CodeExecutionTool, WebSearchTool from .._output import OutputObjectDefinition +from ..builtin_tools import CodeExecutionTool, WebSearchTool from ..exceptions import UserError from ..messages import ( BinaryContent, diff --git a/pydantic_ai_slim/pydantic_ai/models/openai.py b/pydantic_ai_slim/pydantic_ai/models/openai.py index c3e169b10..f7342dae4 100644 --- a/pydantic_ai_slim/pydantic_ai/models/openai.py +++ b/pydantic_ai_slim/pydantic_ai/models/openai.py @@ -11,8 +11,8 @@ from typing_extensions import assert_never from .. import ModelHTTPError, UnexpectedModelBehavior, _utils, usage -from .._thinking_part import split_content_into_text_and_thinking from .._output import DEFAULT_OUTPUT_TOOL_NAME, OutputObjectDefinition +from .._thinking_part import split_content_into_text_and_thinking from .._utils import guard_tool_call_id as _guard_tool_call_id, number_to_datetime from ..builtin_tools import WebSearchTool from ..messages import ( diff --git a/tests/models/test_google.py b/tests/models/test_google.py index 280c94a45..40ac8ed82 100644 --- a/tests/models/test_google.py +++ b/tests/models/test_google.py @@ -6,7 +6,7 @@ import pytest from google.genai.types import Language -from httpx import Request, Timeout +from httpx import Timeout from inline_snapshot import Is, snapshot from pydantic import BaseModel from typing_extensions import TypedDict diff --git a/tests/test_logfire.py b/tests/test_logfire.py index 58e082336..e589b795f 100644 --- a/tests/test_logfire.py +++ b/tests/test_logfire.py @@ -476,7 +476,14 @@ async def test_feedback(capfire: CaptureLogfire) -> None: 'gen_ai.system': 'test', 'gen_ai.request.model': 'test', 'model_request_parameters': IsJson( - {'function_tools': [], 'builtin_tools': [], 'output_mode': 'text', 'output_object': None, 'output_tools': [], 'allow_text_output': True} + { + 'function_tools': [], + 'builtin_tools': [], + 'output_mode': 'text', + 'output_object': None, + 'output_tools': [], + 'allow_text_output': True, + } ), 'logfire.span_type': 'span', 'logfire.msg': 'chat test', From c193059dffc28c8a4fd45c9fdbd065e9cc08fc1e Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Mon, 30 Jun 2025 18:20:10 -0700 Subject: [PATCH 22/34] fix codespell --- tests/models/test_anthropic.py | 231 +++++++++++++++++---------------- tests/models/test_groq.py | 8 +- 2 files changed, 121 insertions(+), 118 deletions(-) diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index 1f809ad28..3b321bc40 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -1317,136 +1317,139 @@ async def test_anthropic_web_search_tool(allow_model_requests: None, anthropic_a agent = Agent(m, builtin_tools=[WebSearchTool()]) result = await agent.run('What day is today?') - assert result.all_messages() == snapshot( - [ - ModelRequest(parts=[UserPromptPart(content='What day is today?', timestamp=IsDatetime())]), - ModelResponse( - parts=[ - TextPart(content="Let me search for current events to help establish today's date."), - ServerToolCallPart( - tool_name='web_search', - args={'query': 'current events news today May 26 2025'}, - tool_call_id='srvtoolu_01MqVvTi9LWTrMRuZ2KttD3M', - model_name='anthropic', - ), - ServerToolReturnPart( - tool_name='web_search_tool_result', - content=[ - BetaWebSearchResultBlock( - encrypted_content='EpMiCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDKvDne3VjpY5g3aQeBoMBqRxCv1VopKi36P7IjDFVuBBwDs8qCcb4kfueULvT+vRLPtaFQ1K+KA24GZOPotgWCZZLfZ1O+5DsCksHCQqliF9KupRao5rAX3YTh8WugCLz+M5tEf/8ffl+LGyTJNp5y0DOvdhIGX54jDeWZ9vjrAIBylX4gW9rFro2XobjCu2I0eodNsmfsrfLTHEAtar5wJUbeW8CrqxgO8jgmcpCDiIMZ0EsluHcI4zo/Z/XJr5GrV/hQzsW/4kpSZJDUmdzbhYxm0irr+fI2o7ZZ5zYElLFOWcGTilBbreB58P05q+cZNm465Depd+yNKGeSkqbgOURbvYZ3cMwVYLdQ9RatnfNPUbyZmCzkM15ykPt7q9/sRtSeq5eCKIqcOALhpGox7SBGqW+un88dl9M/+ProKeD/RoBUG/SXyS4o5VhM6zXM5gYEW+TbXeex5ob1hFlSMM0IjQ2Uy8aEE6fZfg69Vsc4pc0Lghf4EC9QZSvKyYUDM1ufLzXdjR8YmKSL3MaynV6NrkA3z/Sc4tch1Fn78uzSxyyB8XrfClI4NNi8pmLk9YxFOpxf9+b5fhgyCdmYddGoDzE+945k2LIQmVLpVga4/bFllZpbJ3EOrtlcHfVKf/EP78CBb0y5T+T7XM4IbfwBoqjKuj1f52a694vk12s0DJ8oK+pbPPVwbC6IanpPL/nTsxFfD/xa45vYjZ4Ms8guWHO1ugutkb9Hy3e6bPNhQY864WFn7EfQdLvvMs+xZTZecPv6qXeNy83+3l7EcQOQBt79zfk9J7S98NOzEP9akE4r6jZkl1gK8VKN3PYHnJbM83kgiTnv+kWsPCyuqQCPyVOeUprvLpOcRJTRk0E675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tl3cUrVCzTPVFcYeq7KqA9XUPYncx8UAEyDe4CnZtVvSXBnY0IN2lIEl62FSq3qpvgGHyaT8jAUeqQdzw0OGA/05ht1h3z0JqrnL0E6EKjpZdYpArEw/hlArmDmrgq21XKH87H0r0iqLGrQWAxpPRiioJBpAa/K2r88ptQGJltBkEuIkiE6ySU5pHy7IuUnGQum/Jb66+9KfXDgshxm2p5QlLUoK+r5jk/zCY5o3qoDzc4+5lCc/qlG9k2ZefX1/1qbhPm4DRVQUn3c1NWKuZ/8UrR4vYiCfHtRhwyHQ5EmT2G2U6u8rVVitjpt5q8z9FZ8oPuD8ShFxa4RJRiH2r8vR6LrTU41+uJCUeRj2TR8li+zDkOuzKVCtN4WSzITUNrz+8Sr0Zgg85yjoCTyCpEsrnEzxq94B2BdZM6B9yAGcR06tYtbT/FWSHMrL5Jl/ooX87sdhXUJdUgn+ea2EuqkYImB3dHbV9yNqew+wDtDNnpwn/5nRlIbYjwCjm/x3QNT0tM5f21C6WLCFqFHN7Ji/oCvYXOdsaxiWWS4bGAM=', - title='News: U.S. and World News Headlines : NPR', - type='web_search_result', - url='https://www.npr.org/sections/news/', - ), - BetaWebSearchResultBlock( - encrypted_content='ErwHCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDK2W0Qu0wNgI6mf5EhoMNCqr1gVeM/Fj3PSYIjBrgyGKmTOrJLgDCXcOvRtrbigKDeccd5oypMBGnMVhm6h3Ade/9+vNOwI3ByflKmwqvwZqUUdfJ6+k9ZDrmb7VM6ktRqsZ4Z++yOdyubDNbsyM6RdwYuNi+bS5ZUON+rMd8+ZrQYlGYqq7NF43o5klxpac+Dsgx3OlKbu6Hq6eiKOQ3rdPGYlUYKdDouAx6RjypXjhYkqErPrjlFZhNv2lO6cohI0QU66p6b7G8UMVyweqYZ+2QYTFfbwU5VdIAOiQW8PBgNwPC5LRnidfbiT04VY+cEsNW04zOq9coXs4NgFRw2WDCZDBPGTEJex0xv7vD0/D0YpBhfiawNJ8FgBTI6q0gXQ2+YwqelVaZ+BDpu2JeRABLXiXQAMIiBBiayofacvfgJZ4omPY1JRiJwX5IpbLFqLcNz2fWr8veYedwrDZV/lOjyn755WTp2i89GD4Pv53htWrDOH8/YJBQ9u5KA2DFz7zAtRLyPqvPz3YaLMr3ATFvs8m0igrllgC5uaWPWfO/28RU7QNnxyBLGNonF3dtz3Uu2naeNvxjRhqCtUOON5odOahtPrRs5qkjv/UrL2YzlnfsRL4Qb/qsGJE6YWScvLhjBaum29Whk2p6RtYJqzzSqDbk0jxKe/hNatl3s2JF1bAW4L7p9FnsK1v/G7AYSaIYl4RDLGuL1bFOKGKVlUZtohNMws+gvTCYKdhQzfurimTsNIpBP4Ci6aJ+/yACa22AXGhZQqyiOS7yxI6zj3vZdQGFBle1TjDpzveY2Nz/kuuTCPbGsWt5kd9v7BkWvkNacqZ70KijyIk5dVt3H0q4eavyNLU0gF4hSCPDHW7eeWXTmNs1YniKiaHrwmOOqXjw2PCQrZv0i7UQRjDmRQqx9NtuqzMup9DRPbQuZM23b8JwzqA0Qjyxc5pTlWRL9aU+U7ZKOD1OdBszAU54c5N9jOca8S2Plt4TGJcAv2Wy73Bex74GPlkHcKWO8TJYhrV4ZF2nMjssncQEKCltJaZg6TJpazpLKoQ1XmYmgzebbVMRc8RTDXk335AYKkN62xRnfrDd5T5wBhGbPNQeF7PGigtAK/SpSpTna/vmGOBul/cONWOFFKNdY+FtCAGd4AOo3s/N8QUnKR66TEv9ocuVep1UZxV2fJcqIuJukutfT9eWPcou6VImLUzRQMYAw==', - page_age='4 days ago', - title='The Biggest News Stories Of 2025', - type='web_search_result', - url='https://92q.com/playlist/the-biggest-news-stories-of-2025/', - ), - BetaWebSearchResultBlock( - encrypted_content='EuYCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDCmLeaYgzUtJ4Mi+fBoMpktwxWvlSdpeNRRlIjDckkEHzeMKWP+vkSJ+7ci91OlLvn1nTU4wG+0am9miZ+68Q8XjsyCBGekIPeSsgpkq6QFTAvqrNhd55GMbj8VQtB/7oV66lwp8PzaymgQlLzCnxBdZ6IRYyEd6XwFOPrWCwyjtlKbwRiM2NIaNsGcrraBVrDfsjCz20qsDPGNsQf587z/TD3zWUSelhjhf+T5nDCEXUkYM2+4MaGP5Ty57Khh3WQr5q6Q46m85jBBF+akWf1uKZEgjgFug1ufj/8TXEEAaKCVY9YeXTXfYH8DocKveCXH4Bp9TNbgx55UrL8NdXiwdtpI/zqY+8hM/SiaVeXXI/Rbmjg3HzFTLfrH4wSrl5awdKWuGwQy8nqRISZlwNVnwFY0e8uc08xgD', - title='ABC News – Breaking News, Latest News and Videos', - type='web_search_result', - url='https://abcnews.go.com/', - ), - BetaWebSearchResultBlock( - encrypted_content='EtEWCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDHm43fQ50ug337S3LRoMMpBq69Qh8QJrLUwbIjCQZpwOKhXhp64xZ6VuO9jUsfumcGFVwLXHbCFUYK9256rmPdiT1B5qecHMx35qI7cq1BWGwSfTqoKrKdwCLT5GuFP1tDnXee0s1GL8tn4WwqVUe+FgYiHiknLq4+RvdZOXOZv2yrffRh+6FAMtYPdhUfkBVONku44BxAkQabLafuw0pofhEMh1wj5i3HhmjMNIqr4fgMCqHpre7nt052sFkxzlgvrwtKPdAL+bC/QmL9aXPzmbtE2V+LVxLQ5XpcR7OyhTL82S3ds+uNLDhbtUYZtVcLHgdPIk422XzZeRxZ4Sdpe0uIss38kVVPI1G3luS5oJkIUnIaTlsFxgrNKYPZYX+eOwVj/9NdTUIkXtCik32wTOexcIgBmw7JJcUL9V5i1SqhHISSnOG6t4ttUAfBivPS1IWCiUPNwWYWOjgwX8dIVIyW7JpC9Vev/gMJ5WdroYLyKNLK80uXfwxcCtQknjSBaKHm/0wnVERviHapls3prWbiPKG95pcHB4QSK+toTEVh+rzhKRYIBA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Latest News and Videos | CNN', - type='web_search_result', - url='https://www.cnn.com/', - ), - BetaWebSearchResultBlock( - encrypted_content='ErQCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDGPat3RtBffd6jd9uxoMkx9uAfM4hgJRbrR4IjCBVNWqux+TsqDP0poLm+ss84SLrVR4rAcjrQSDPna9ZfR0OFhPjv2ko1ZVuBzeRE4qtwGOPV6my0G/y4nPEH8gNVc3y/8uZzh7O8CBrduzchEMd5RRXLlsC+bU/SjZ+5LBYGzAVwRCfVXIdaJ0/d8RYdJWHo3bvKc5Lu/WFPV6Po9gVHLOU5WVDsyzwmrvqzCYC0UhkUMa0yf5j7WTFaT+kgHZcFcbvYPG53USqNh0seahaaCC5fJRjRBTAvuyj4md+ppTjIXGZEp3rTMG3MTkv8t60MgPzn4ObLGEmBQIQrfES9G2BT1k7lUYAw==', - title='Philippines Top Stories: Politics, Environment, Education, Trending | Inquirer.net', - type='web_search_result', - url='https://newsinfo.inquirer.net', - ), - BetaWebSearchResultBlock( - encrypted_content='Er8qCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDHxmRLcrViwuD4QB+xoM7WGSYO1wzb6z0HchIjATj+RTz1UTP1XUgzt/sKVxIcnJjndgdx3zaOKZ/CMx4ib/mUBO2GKxhojugf+2p5kqwik956URo2GiacJOXWHP0cyE0HmZMDSHK1Nqs0Y8aXMl1iWcTu2Q1ZmBq4+AQ8IQc423bw58O5dc3bS1sdbQJyrd/YL/9SG6Df73ou97ktQ1Ij/MdEHQuDMHhvVDoESB4+i7NDUU4aLqgBFiOGCEozcSTWUdK5ePwtOMSOEHUCOJ7lcxTzDpcTg0tKH1Qo+HANXFl63xNQGbJyxUUBGyGjiAe2vWb6kvW6owWSL5HHYnJ0pzpxska1ovW0yt06Nw9ZuotsX0Xq84sa/Ceg/fFCkMsLoREsCknC9di0zda3CgMrdX481wowpRS0dg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A+78GNlTlWtRn4dxmuH82+5kMmW/G0y7pozSHVv9y0i0uyYBMe3a8TzhfjZ62tApbxduXL1hDhhzpoHSjyeic74QndYU3ixkrI2sjCpnODlNWfNcEDJ5eVfSepoBdvtwxVX9Go9N1NWk4tKSQS+VnP70Ua2yCZWmI3It/0Q0NGL8eJ5wfpq3WOCa8TmQiV5Zx8e2LjnyLlYj7RsODQZSSet0V4zOr8SOgQ56Q6kwyW9rnjVZItW0lm1h2CqQvlnvF/Acmrzbr/UTEIrEqTGQpaqdxdLOk5ybihhfTgWaTPJ9oRKomxGAM=', - title='Portal:Current events/May 2025 - Wikipedia', - type='web_search_result', - url='https://en.wikipedia.org/wiki/Portal:Current_events/May_2025', - ), - BetaWebSearchResultBlock( - encrypted_content='EtsnCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDKlvRKONWAUxyGn85xoMfeV+KuQr0lm9kmZSIjCqpqeZoxBvTankmAHSd51eQbmxHgBmDSSbu1eGpcY3u4Gf8joO1Y6tH1cw7MYyh7cq3iZM8rhAJuFyfAIpcDxvJ5ROlkmPNvMDR8MBKZKtSQ9p3R2lI/QOWE9Fk9kfDgxdHFVeCUtPiCmmF7wPi3GMXArw4FjQXDNHUZ8ECNxkKCmSf0vlLQMfwNtqAqJZ6vLqjCuDst0d7pBfaDW9YcrY6du/9UAWGlCP8BudfzzUI5ds7+lMTkOTR9nrlQyby73AQmuY1IaPEiNhuj2vohNT+t21qan4WGxrXFJ3iFoq1nUPJAjfmcLaJVNbDzksiRlo9HCgql49Nqau1BEyN9OQfF0W9KMa5rLtbyeQUn4tpsAAdA5UoePHbl9jHSWlu3GddU30F8YclCGIDVAnyhbLAGbrjHuJUjdx2t6XeDldk6ZAIH51s9+TGl+23lYsu2kinQpczecJFzcc9sCtVszDs3Z6iqecJo0Qp3hAJvVwX3U2W2p/m71rIrYO67RpSOvplwZxXQNKfrDWT3ZdcfWTxHvZf5bFSzeI+desA/K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YZs1ao2v8od47Bk5N6TpQX9J8Lkyj3xrm4PJThxp/MBbmra9ZCTmkgoLasgx9e5o6Y8N7OPzmUDoXix9j4U9X782NCnyY2t2VoXUUCjWo4N/vufLb2ZpcCIycJATs41LI7jphb5EwHDpKxat71RscO3Jm0JwOsyV8jC8SgpJegd9LAXbZdrpGH3yoMWhPhU5xhS0CLjaPpyLHnZdlPPlWAGkS7bxpM9mUUv/SFGHNiqBryuUoxS8eCAZvGuIfa1qVbXIE9bLEoOxHH/h1E/QGgQsZvPCHMoF9ywZiRAnjFn21J2JEACDmAWEL5o2oHO+rI/rfeMFNJ+U7k3B+12xn999WHr0d1FeQIHdqJU0tQUrKDT8w3zNYdRyaM3VDQAn9uRRzSjTdvjkCSC75T5ojfK8dabiYrp4rCq4pKTg+PdGKkJt02L8E1mhSKFL5ZFl1Raq+Jde6TX1qGbKZTiQubr2h51Ha019OTO5aHZOFRl6awl+NauRNJutrrTTLs3VfYSkf/jaAP9wFpcfypV6ZO6NWzaRLGWH6EkbFaDvV8+9g+ul0t4HVVjKvYBGhCsxIOcpO8C5MOmioId89J8BVAD3okW1AFi/PJQUhZdG1+0CAy+xybaK5YGHsDyGzmFaCpRQ7e/vW74SvFs7LH/ReSOqBNTwilF0jKR53QhY88NJyZLhekO1sy668dsz3XXRTf+aKWZHNtgDlHKbNT93R8bD9+vTfd6vxgD', - title='Portal:Current events - Wikipedia', - type='web_search_result', - url='https://en.wikipedia.org/wiki/Portal:Current_events', - ), - BetaWebSearchResultBlock( - encrypted_content='EsoJCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDAYjLeq1Kci5o2pi8BoMqJacE/46sh+pR01VIjDPMDUx0d3wj2zbUnowpxFwHvCCnCwLoPMxQsQm/dnvm0Fzfga5o6zXqDwWpXvUzhEqzQg/X9w2opL/m5o7bUw/TubgkYaR6l4t2n0oQlGgetbSj1gOEor/WWJ8bWXL3BZnS2xkIzwGrbLdlPD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hLS94+xVNOG2fmQtzE8oyaREZBkwSjVHuJ3lDAxvHDRYY8F+lkuLE4AvLiye3CDAMXNyCrG+/xiQIBNUGs+1aV9edHMmwpCVs99Q+nHO1RBVPljY607Q6u06Wt4VHnY+45+IxzpHHWXxg3Jn8Lh1AuzFKEaRWaI7JDSCgJmYxjIwkUO7988PWjOmFLquOd6mQsQ6iVG/89zSwr019RlAQRDIbMimefHIYhLm4S/Y8TzPhLFXJ6FaxrPFAkkkp2LnLQUoNKlo2h64JaAerGAku2FEwn/vo3hsCXwILg6R4QYAw==', - title='Current Affairs Today – Current Affairs – 2025-26 - GKToday', - type='web_search_result', - url='https://www.gktoday.in/current-affairs/', - ), - BetaWebSearchResultBlock( - encrypted_content='Eo4ZCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDPmBifgbGKjJUWA4LxoMysyEr2mcRqSQzmmjIjBCfvhhJTAOxHLRGv3ljzK5jUBicnJMjypAm7ZduBpPkX+mDQvdcj2CACyWCydaQ0gqkRjhs2EgE0MIO0YyXAzzkWltz0ki4S12d0f0bRdmI2W31SmMvd7jGXZyIQx60LTKRqqQa1GVeqfrM2855muFRsk6uji8F9tni8hjSdU4Pcd5WlC6f2dwWDJcfvt/HD2GCI1uPZkx4ha2BLYDV37uXfumDLk/tFPswHb3cbUgLc28rTb18pTi+HTE5f5r06/x2DPVVXYLylYuRPtr2WJ6l/2r/I59B+iwdTzI8sYRhSIRf47kt32Reo3w5esYpPsmGXFL0SOW57j5jtwBZWkJqkEc5wD10ObzxCDXrNfZ89KVkli/++RedncFZnqKcWkrLwctyW4eIBj0qiI4ZA81Wx6cnc09shOAflAw1EitPiOQ4HKoNkcFn9GNUfF1rBzblgVvjgO5t/zZpv53CnuZ9Aoo2nwF4pNrflPpmnd22gQdLpOmLTYrxygC/2vboGrNrS1HkxfvFKPib1DopDY/y9CECre1zHtdf6PNQxgvc+EGIncCnb8gTHFZxN1Mhyc1dmTDhit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LKNuJ4oIvEndcOtqrmqGdl0sONVPiBvy8jOVw/VarOUpn+9OzNsEJ8LYV+dSos1qjc08b9AeH4RvDRk90KLMTfElM6e5Z526vj/IyCPWc8PEWMAT0Vaw2dSwL0AdsDn2yNH5Q7TS4CpWgzJHJHq3ph+J3E2Yuo1xXhVtdIPHorS+64+/lQ7rUCZ36sTmJj5eOLEJXhj5XnfeDQq1jU5keqBMiCUBkxNNlLCdkq34qWUcgmVfVskSh9Uq0ml5NhUFjKvHwxSfqZ3hlW8Z6a0PXzdYQDLi0EI2THYV1JTkOB2T9UC8N0pzRBesxLeXZTpfwLpUmI6rWtkwDIUh4HLo7UEZtX5s1kDVZqMcgRp5Ci4BYLVBgD', - page_age='3 weeks ago', - title='May 6, 2025: Top news events to look out for today - People Daily', - type='web_search_result', - url='https://peopledaily.digital/news/may-6-2025-top-news-events-to-look-out-for-today', - ), - BetaWebSearchResultBlock( - encrypted_content='EvcfCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDLM35Bum8iGp3KQslRoM14ZW+oAvbXsy7nUsIjCLxAF5JOrnB/xWs20058EEqp98kwMCubS8ohl/TFUHHJN7eeUDJz7IuZOFycr4+2Eq+h4AUNPhuzguwpPktjSAdmE8fd4sXi46MXN+AqpE3NlTX7NqhmtEhPnwn3HdMGnBiQMG///1824z5wmFCjV2v/aqK/HIy1wvC7M0C/oWcQiBhVR1zNhPbGz153Vt5tw/XgOusVQZz+8tKl3yXac7lWmksW03m2JK39XQFFcs5CZJIaYTqqReD28AyyAaNFW29WF9GrW13HCaOn8YeSHP+zVLqBWR2+WmEnIDStBBEpnl5QVyjhFMdiUG/0TzPTfhXOvHJo5WL/pef7qEKG1ECVjkF4BbYGXh/4E+3CFu2xaFO7Kfcds3pqb2hPgU5gaBnXFAv8QRXxPqfAWOX54vAW0H1ahBM9sUQQcfK8XTVyoVvEF/ImqoC8m4I7ciw8cGW9g7UF4ML8w8NGefqMDeWB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orpQqkE2FmREB9aVpM8QYayC5tqJZhhV1+6Ec+SEE+Ol8+ZG+0K+Dogbx6ra/ktD1X2X4QPeieLGvCLGFgVlzVxmuryoZa+m8E9JFnt3DvyqOnZ/GjutTdI1/JC/JJ2q4IvNo/oFQyqZitB/NX3IGXIm7Qe+AGVXYukItPSh9wNp1dmlCHQwMdN6fu9HOh5NswBrXqAR/TbK+7JjIY6HeWlykdOUeE//3e0SACTbjq7EbH0mbnWLTGPLCAhb49c5RJbXNJrPKWxLj5y9eDAxTrpqUQ3IfjjGiU9JBUTAUjwlKrE2/skjZtJbVegv1QhBFuwaUloEXHh89oOBh+4B5KbxqlS/YXtrHfKbFewdGiRSV4KUYc1FV4emyUZmn27joV1qc93UgWkqyAgXg9X75I7GtygxzN0SYqMp1R1LSOofRiqHMLOMs68He0BOPCRHw21/veVKiC1gN5R5g64DvLH4uhL+BBf15TivY/XnJKPJKtmG8pEWd6uXX/fYSo670WD2A7tWV1ZhszWai3tgH/1wR7kpOzik6wkhgD', - page_age='7 hours ago', - title='26 May 2025 UPSC Current Affairs - Daily News Headlines', - type='web_search_result', - url='https://testbook.com/ias-preparation/upsc-current-affairs-for-26-may-2025', - ), - ], - tool_call_id=IsStr(), - timestamp=IsDatetime(), - ), - TextPart( - content="""\ + assert ( + result.all_messages() + == snapshot( + [ + ModelRequest(parts=[UserPromptPart(content='What day is today?', timestamp=IsDatetime())]), + ModelResponse( + parts=[ + TextPart(content="Let me search for current events to help establish today's date."), + ServerToolCallPart( + tool_name='web_search', + args={'query': 'current events news today May 26 2025'}, + tool_call_id='srvtoolu_01MqVvTi9LWTrMRuZ2KttD3M', + model_name='anthropic', + ), + ServerToolReturnPart( + tool_name='web_search_tool_result', + content=[ + BetaWebSearchResultBlock( + encrypted_content='EpMiCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDKvDne3VjpY5g3aQeBoMBqRxCv1VopKi36P7IjDFVuBBwDs8qCcb4k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/1qbhPm4DRVQUn3c1NWKuZ/8UrR4vYiCfHtRhwyHQ5EmT2G2U6u8rVVitjpt5q8z9FZ8oPuD8ShFxa4RJRiH2r8vR6LrTU41+uJCUeRj2TR8li+zDkOuzKVCtN4WSzITUNrz+8Sr0Zgg85yjoCTyCpEsrnEzxq94B2BdZM6B9yAGcR06tYtbT/FWSHMrL5Jl/ooX87sdhXUJdUgn+ea2EuqkYImB3dHbV9yNqew+wDtDNnpwn/5nRlIbYjwCjm/x3QNT0tM5f21C6WLCFqFHN7Ji/oCvYXOdsaxiWWS4bGAM=', + title='News: U.S. and World News Headlines : NPR', + type='web_search_result', + url='https://www.npr.org/sections/news/', + ), + BetaWebSearchResultBlock( + encrypted_content='ErwHCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDK2W0Qu0wNgI6mf5EhoMNCqr1gVeM/Fj3PSYIjBrgyGKmTOrJLgDCXcOvRtrbigKDeccd5oypMBGnMVhm6h3Ade/9+vNOwI3ByflKmwqvwZqUUdfJ6+k9ZDrmb7VM6ktRqsZ4Z++yOdyubDNbsyM6RdwYuNi+bS5ZUON+rMd8+ZrQYlGYqq7NF43o5klxpac+Dsgx3OlKbu6Hq6eiKOQ3rdPGYlUYKdDouAx6RjypXjhYkqErPrjlFZhNv2lO6cohI0QU66p6b7G8UMVyweqYZ+2QYTFfbwU5VdIAOiQW8PBgNwPC5LRnidfbiT04VY+cEsNW04zOq9coXs4NgFRw2WDCZDBPGTEJex0xv7vD0/D0YpBhfiawNJ8FgBTI6q0gXQ2+YwqelVaZ+BDpu2JeRABLXiXQAMIiBBiayofacvfgJZ4omPY1JRiJwX5IpbLFqLcNz2fWr8veYedwrDZV/lOjyn755WTp2i89GD4Pv53htWrDOH8/YJBQ9u5KA2DFz7zAtRLyPqvPz3YaLMr3ATFvs8m0igrllgC5uaWPWfO/28RU7QNnxyBLGNonF3dtz3Uu2naeNvxjRhqCtUOON5odOahtPrRs5qkjv/UrL2YzlnfsRL4Qb/qsGJE6YWScvLhjBaum29Whk2p6RtYJqzzSqDbk0jxKe/hNatl3s2JF1bAW4L7p9FnsK1v/G7AYSaIYl4RDLGuL1bFOKGKVlUZtohNMws+gvTCYKdhQzfurimTsNIpBP4Ci6aJ+/yACa22AXGhZQqyiOS7yxI6zj3vZdQGFBle1TjDpzveY2Nz/kuuTCPbGsWt5kd9v7BkWvkNacqZ70KijyIk5dVt3H0q4eavyNLU0gF4hSCPDHW7eeWXTmNs1YniKiaHrwmOOqXjw2PCQrZv0i7UQRjDmRQqx9NtuqzMup9DRPbQuZM23b8JwzqA0Qjyxc5pTlWRL9aU+U7ZKOD1OdBszAU54c5N9jOca8S2Plt4TGJcAv2Wy73Bex74GPlkHcKWO8TJYhrV4ZF2nMjssncQEKCltJaZg6TJpazpLKoQ1XmYmgzebbVMRc8RTDXk335AYKkN62xRnfrDd5T5wBhGbPNQeF7PGigtAK/SpSpTna/vmGOBul/cONWOFFKNdY+FtCAGd4AOo3s/N8QUnKR66TEv9ocuVep1UZxV2fJcqIuJukutfT9eWPcou6VImLUzRQMYAw==', + page_age='4 days ago', + title='The Biggest News Stories Of 2025', + type='web_search_result', + url='https://92q.com/playlist/the-biggest-news-stories-of-2025/', + ), + BetaWebSearchResultBlock( + encrypted_content='EuYCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDCmLeaYgzUtJ4Mi+fBoMpktwxWvlSdpeNRRlIjDckkEHzeMKWP+vkSJ+7ci91OlLvn1nTU4wG+0am9miZ+68Q8XjsyCBGekIPeSsgpkq6QFTAvqrNhd55GMbj8VQtB/7oV66lwp8PzaymgQlLzCnxBdZ6IRYyEd6XwFOPrWCwyjtlKbwRiM2NIaNsGcrraBVrDfsjCz20qsDPGNsQf587z/TD3zWUSelhjhf+T5nDCEXUkYM2+4MaGP5Ty57Khh3WQr5q6Q46m85jBBF+akWf1uKZEgjgFug1ufj/8TXEEAaKCVY9YeXTXfYH8DocKveCXH4Bp9TNbgx55UrL8NdXiwdtpI/zqY+8hM/SiaVeXXI/Rbmjg3HzFTLfrH4wSrl5awdKWuGwQy8nqRISZlwNVnwFY0e8uc08xgD', + title='ABC News – Breaking News, Latest News and Videos', + type='web_search_result', + url='https://abcnews.go.com/', + ), + BetaWebSearchResultBlock( + encrypted_content='EtEWCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDHm43fQ50ug337S3LRoMMpBq69Qh8QJrLUwbIjCQZpwOKhXhp64xZ6VuO9jUsfumcGFVwLXHbCFUYK9256rmPdiT1B5qecHMx35qI7cq1BWGwSfTqoKrKdwCLT5GuFP1tDnXee0s1GL8tn4WwqVUe+FgYiHiknLq4+RvdZOXOZv2yrffRh+6FAMtYPdhUfkBVONku44BxAkQabLafuw0pofhEMh1wj5i3HhmjMNIqr4fgMCqHpre7nt052sFkxzlgvrwtKPdAL+bC/QmL9aXPzmbtE2V+LVxLQ5XpcR7OyhTL82S3ds+uNLDhbtUYZtVcLHgdPIk422XzZeRxZ4Sdpe0uIss38kVVPI1G3luS5oJkIUnIaTlsFxgrNKYPZYX+eOwVj/9NdTUIkXtCik32wTOexcIgBmw7JJcUL9V5i1SqhHISSnOG6t4ttUAfBivPS1IWCiUPNwWYWOjgwX8dIVIyW7JpC9Vev/gMJ5WdroYLyKNLK80uXfwxcCtQknjSBaKHm/0wnVERviHapls3prWbiPKG95pcHB4QSK+toTEVh+rzhKRYIBAAJp1hQrVtSceyjPKd78Dkv8nXVzcQxWlD3Go0fis8p2n4g2eZJKMLBpvu/CyOxhGumxAOdM3RrirdDKm8tLIIqDil+caVQyvGNvvgtJW10fRi2S7atagwzI6/oVH9lNCn9P+53ERe6zUAYJ9V9HavpoijPm1mm0KRyC5ktHNRWuAONdQC1z4BbqyMInQTGMuUkB55uy97FyuzxPitICF2Q6VCvDpQaJsqqyG76+oiDTcY5wZodyKYTOjmQQjMOVf2rgwr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ylvWccN22OgF6g354t6KS88F9AXatU+Xf7WH6+TiVFAhyhf0b7hZMGxCahnj+ZPjfqNt4OpeXO9+vz2isVZ4pEf6b/8l69oPq5Vwwb21DoRpErZjbVPPXgQZgjKPuXNEiua/kKep4eHMau8pZxZlFa+xunNSRox7q1AJE4AZ0lF3b/gJBQ46TTS1eyTEe76w1Vk79cTcFoWhMDT20a9JQ+UpJVGKSGlHBd3923sjsZwb+cxSIDdOrcpXrL2fRvwsU5g0Tc0hkQOhAagBgi+IudxBNFa4lGhj9PrqjTAPTWj5HCkcSEiehs6goVMvrovqWts9bfrfS0HxheEAa75MM6/tn6JBkR1Fc5ENK/XVq/ccWEtQZ9IM6eGZCg37nT/nB7FmGv/iiYS6N09TK8oPST+zWpRDxIETarKqPCBxnlKZkr8D0GJIX9HhzdFkOL6BWTvwTOIz9ilC5SFRAhX8DfzLmPHn7gV+xf4U5h7ZCnvXJfQV8vx0IaMXPcLE4wJkFV+e33SGOLKbWwgrgHv4cyWKY8MOfTHEQo+wiwykQqHPageS+kXR01tTytP+103eLkmLjnPldoO+E1OJ3TReO7HQwCY1jxghsmWyDctKYjgm34Pp3v721RQoVp7buV98bWm1LhjPecsQlvAyzckizfVvIz31y5+QLgt35GiMhnijWAgxED0avEybJ1gQZzj4utmhsH7TCT0wO+MJKaCLS7FFku4VCestJtf2T1nY2Sk05WuRSi4twDIYEp4dgPHpVjEMt9rJfwog1URFtuPQZXBATrmRhUkmEEwTziB+4s5+5QS7dNwoDIYAw==', + title='Breaking News, Latest News and Videos | CNN', + type='web_search_result', + url='https://www.cnn.com/', + ), + BetaWebSearchResultBlock( + encrypted_content='ErQCCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDGPat3RtBffd6jd9uxoMkx9uAfM4hgJRbrR4IjCBVNWqux+TsqDP0poLm+ss84SLrVR4rAcjrQSDPna9ZfR0OFhPjv2ko1ZVuBzeRE4qtwGOPV6my0G/y4nPEH8gNVc3y/8uZzh7O8CBrduzchEMd5RRXLlsC+bU/SjZ+5LBYGzAVwRCfVXIdaJ0/d8RYdJWHo3bvKc5Lu/WFPV6Po9gVHLOU5WVDsyzwmrvqzCYC0UhkUMa0yf5j7WTFaT+kgHZcFcbvYPG53USqNh0seahaaCC5fJRjRBTAvuyj4md+ppTjIXGZEp3rTMG3MTkv8t60MgPzn4ObLGEmBQIQrfES9G2BT1k7lUYAw==', # codespell:ignore + title='Philippines Top Stories: Politics, Environment, Education, Trending | Inquirer.net', + type='web_search_result', + url='https://newsinfo.inquirer.net', + ), + BetaWebSearchResultBlock( + encrypted_content='Er8qCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDHxmRLcrViwuD4QB+xoM7WGSYO1wzb6z0HchIjATj+RTz1UTP1XUgzt/sKVxIcnJjndgdx3zaOKZ/CMx4ib/mUBO2GKxhojugf+2p5kqwik956URo2GiacJOXWHP0cyE0HmZMDSHK1Nqs0Y8aXMl1iWcTu2Q1ZmBq4+AQ8IQc423bw58O5dc3bS1sdbQJyrd/YL/9SG6Df73ou97ktQ1Ij/MdEHQuDMHhvVDoESB4+i7NDUU4aLqgBFiOGCEozcSTWUdK5ePwtOMSOEHUCOJ7lcxTzDpcTg0tKH1Qo+HANXFl63xNQGbJyxUUBGyGjiAe2vWb6kvW6owWSL5HHYnJ0pzpxska1ovW0yt06Nw9ZuotsX0Xq84sa/Ceg/fFCkMsLoREsCknC9di0zda3CgMrdX481wowpRS0dgj586+6SX/b9C9k7y9htoMLdsG38chq/yHAKeUrtjxHRUI7rLsS63jmVrFxj6Sbggo2fL1bEFliDjL4SFVz8Fu0XaFBlq+S9cU76uj/vVh76btLnNOKjBZyZvZ5LG8XqHBE6AN0nCx19o8zOpvXYej+hMftkU1fHljvT6HJSHw0YUjyflvx06S4JXH12HG5h2r/86E4qHw3Q76sY+dvzRR0IvyGvmtKVPlJame6h4N1epLclnYzk/wfukJGlJLHOh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lm1h2CqQvlnvF/Acmrzbr/UTEIrEqTGQpaqdxdLOk5ybihhfTgWaTPJ9oRKomxGAM=', + title='Portal:Current events/May 2025 - Wikipedia', + type='web_search_result', + url='https://en.wikipedia.org/wiki/Portal:Current_events/May_2025', + ), + BetaWebSearchResultBlock( + encrypted_content='EtsnCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDKlvRKONWAUxyGn85xoMfeV+KuQr0lm9kmZSIjCqpqeZoxBvTankmAHSd51eQbmxHgBmDSSbu1eGpcY3u4Gf8joO1Y6tH1cw7MYyh7cq3iZM8rhAJuFyfAIpcDxvJ5ROlkmPNvMDR8MBKZKtSQ9p3R2lI/QOWE9Fk9kfDgxdHFVeCUtPiCmmF7wPi3GMXArw4FjQXDNHUZ8ECNxkKCmSf0vlLQMfwNtqAqJZ6vLqjCuDst0d7pBfaDW9YcrY6du/9UAWGlCP8BudfzzUI5ds7+lMTkOTR9nrlQyby73AQmuY1IaPEiNhuj2vohNT+t21qan4WGxrXFJ3iFoq1nUPJAjfmcLaJVNbDzksiRlo9HCgql49Nqau1BEyN9OQfF0W9KMa5rLtbyeQUn4tpsAAdA5UoePHbl9jHSWlu3GddU30F8YclCGIDVAnyhbLAGbrjHuJUjdx2t6XeDldk6ZAIH51s9+TGl+23lYsu2kinQpczecJFzcc9sCtVszDs3Z6iqecJo0Qp3hAJvVwX3U2W2p/m71rIrYO67RpSOvplwZxXQNKfrDWT3ZdcfWTxHvZf5bFSzeI+desA/K+bZ6g8gsBeJZoAHm2QDp7vdoAt6x/K9Ys1lIMxoOCQoUHWFFSmuMKUYUo/D8SvqBQmrAiqbZV9qQ81cX8li1X+pmbRrFA8oesTmv15yMHid5ZH6KV60WUZ/lVMgpDJ+LphK0qcLJNdPzoDPvwelEhC9VTH1uo3DhmBpkvQlsLBOB0mXFHGx3tmn7nXCZIAf67imp30xyTcJP/Rj4MUwxzBuABtl06dwNXnfEvljBs9dbte6EN/l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ZvGuIfa1qVbXIE9bLEoOxHH/h1E/QGgQsZvPCHMoF9ywZiRAnjFn21J2JEACDmAWEL5o2oHO+rI/rfeMFNJ+U7k3B+12xn999WHr0d1FeQIHdqJU0tQUrKDT8w3zNYdRyaM3VDQAn9uRRzSjTdvjkCSC75T5ojfK8dabiYrp4rCq4pKTg+PdGKkJt02L8E1mhSKFL5ZFl1Raq+Jde6TX1qGbKZTiQubr2h51Ha019OTO5aHZOFRl6awl+NauRNJutrrTTLs3VfYSkf/jaAP9wFpcfypV6ZO6NWzaRLGWH6EkbFaDvV8+9g+ul0t4HVVjKvYBGhCsxIOcpO8C5MOmioId89J8BVAD3okW1AFi/PJQUhZdG1+0CAy+xybaK5YGHsDyGzmFaCpRQ7e/vW74SvFs7LH/ReSOqBNTwilF0jKR53QhY88NJyZLhekO1sy668dsz3XXRTf+aKWZHNtgDlHKbNT93R8bD9+vTfd6vxgD', + title='Portal:Current events - Wikipedia', + type='web_search_result', + url='https://en.wikipedia.org/wiki/Portal:Current_events', + ), + BetaWebSearchResultBlock( + encrypted_content='EsoJCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDAYjLeq1Kci5o2pi8BoMqJacE/46sh+pR01VIjDPMDUx0d3wj2zbUnowpxFwHvCCnCwLoPMxQsQm/dnvm0Fzfga5o6zXqDwWpXvUzhEqzQg/X9w2opL/m5o7bUw/TubgkYaR6l4t2n0oQlGgetbSj1gOEor/WWJ8bWXL3BZnS2xkIzwGrbLdlPDn/NoXICDQZ+P3IlA6B8CVwiijOnNq+x5nTpX0m794VFJIfO5SdupAiWqhWmtqt8XhcWs8W2gnhDDvNsBG6oH2ZsRenxt3n7a7eWo7yRk/KSHdBM9c+L5r3wu3Ul81DW9CuE6KqUdFjjePJfWKL8OvzfkvJjIqcRaqc/3RIRZbSPbimBiRMXtCBZeCYE1yeBs3xLQ7TJXgRM/9ScKromcFWckYpGXBYSGL8SiXXoBUD7pLsuP5Fn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xrPFAkkkp2LnLQUoNKlo2h64JaAerGAku2FEwn/vo3hsCXwILg6R4QYAw==', + title='Current Affairs Today – Current Affairs – 2025-26 - GKToday', + type='web_search_result', + url='https://www.gktoday.in/current-affairs/', + ), + BetaWebSearchResultBlock( + encrypted_content='Eo4ZCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDPmBifgbGKjJUWA4LxoMysyEr2mcRqSQzmmjIjBCfvhhJTAOxHLRGv3ljzK5jUBicnJMjypAm7ZduBpPkX+mDQvdcj2CACyWCydaQ0gqkRjhs2EgE0MIO0YyXAzzkWltz0ki4S12d0f0bRdmI2W31SmMvd7jGXZyIQx60LTKRqqQa1GVeqfrM2855muFRsk6uji8F9tni8hjSdU4Pcd5WlC6f2dwWDJcfvt/HD2GCI1uPZkx4ha2BLYDV37uXfumDLk/tFPswHb3cbUgLc28rTb18pTi+HTE5f5r06/x2DPVVXYLylYuRPtr2WJ6l/2r/I59B+iwdTzI8sYRhSIRf47kt32Reo3w5esYpPsmGXFL0SOW57j5jtwBZWkJqkEc5wD10ObzxCDXrNfZ89KVkli/++RedncFZnqKcWkrLwctyW4eIBj0qiI4ZA81Wx6cnc09shOAflAw1EitPiOQ4HKoNkcFn9GNUfF1rBzblgVvjgO5t/zZpv53CnuZ9Aoo2nwF4pNrflPpmnd22gQdLpOmLTYrxygC/2vboGrNrS1HkxfvFKPib1DopDY/y9CECre1zHtdf6PNQxgvc+EGIncCnb8gTHFZxN1Mhyc1dmTDhitv/vawaqI8sZHx54tnP5l+KvWuXbegWPJETo6hMsbtMYHAmJIi5VFmhn6rq1zRuKYBFILEpHs3RPoybQzJtJoRYVRYA1E/vsBrdTfXD6jNDg6fz+88kc/menQlSALfAIhZhwxGz5eyhFqBVeYNfqKrJR+CHiUTAKN7t0R/nlsYo89V4SFMpvZakV9ywY6lqnu8mehn4c28OtFQ51wqtldG97kyQFNazwoXrayCNWo3xshZ5hqv1mSIAU2xGUD1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skSh9Uq0ml5NhUFjKvHwxSfqZ3hlW8Z6a0PXzdYQDLi0EI2THYV1JTkOB2T9UC8N0pzRBesxLeXZTpfwLpUmI6rWtkwDIUh4HLo7UEZtX5s1kDVZqMcgRp5Ci4BYLVBgD', + page_age='3 weeks ago', + title='May 6, 2025: Top news events to look out for today - People Daily', + type='web_search_result', + url='https://peopledaily.digital/news/may-6-2025-top-news-events-to-look-out-for-today', + ), + BetaWebSearchResultBlock( + encrypted_content='EvcfCioIAxgCIiQ0NGFlNjc2Yy05NThmLTRkNjgtOTEwOC1lYWU5ZGU3YjM2NmISDLM35Bum8iGp3KQslRoM14ZW+oAvbXsy7nUsIjCLxAF5JOrnB/xWs20058EEqp98kwMCubS8ohl/TFUHHJN7eeUDJz7IuZOFycr4+2Eq+h4AUNPhuzguwpPktjSAdmE8fd4sXi46MXN+AqpE3NlTX7NqhmtEhPnwn3HdMGnBiQMG///1824z5wmFCjV2v/aqK/HIy1wvC7M0C/oWcQiBhVR1zNhPbGz153Vt5tw/XgOusVQZz+8tKl3yXac7lWmksW03m2JK39XQFFcs5CZJIaYTqqReD28AyyAaNFW29WF9GrW13HCaOn8YeSHP+zVLqBWR2+WmEnIDStBBEpnl5QVyjhFMdiUG/0TzPTfhXOvHJo5WL/pef7qEKG1ECVjkF4BbYGXh/4E+3CFu2xaFO7Kfcds3pqb2hPgU5gaBnXFAv8QRXxPqfAWOX54vAW0H1ahBM9sUQQcfK8XTVyoVvEF/ImqoC8m4I7ciw8cGW9g7UF4ML8w8NGefqMDeWBz57Q3fPDkAZdr3OLdaUQkY2Vub+LFeI9hAqbLBixWmG6l9iTytGF/XuBuqcM81HOo9BaD0Dgh11IUcz3F2iCo53yoUAqjC40nL/oHYbeJHSGKbhZSYjZc16WQ1RKw8AAbaKxQofOKVH7L+eYxoUnUzbl5WnqiwKdy9k7/lOH0o+/Xu3CUlyi9kTuFRv3MfhuZCmB3t/sflVtPBqSNin7wXEcUduJlODsWQ2zPzqbqjLJr8Uc0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WLTGPLCAhb49c5RJbXNJrPKWxLj5y9eDAxTrpqUQ3IfjjGiU9JBUTAUjwlKrE2/skjZtJbVegv1QhBFuwaUloEXHh89oOBh+4B5KbxqlS/YXtrHfKbFewdGiRSV4KUYc1FV4emyUZmn27joV1qc93UgWkqyAgXg9X75I7GtygxzN0SYqMp1R1LSOofRiqHMLOMs68He0BOPCRHw21/veVKiC1gN5R5g64DvLH4uhL+BBf15TivY/XnJKPJKtmG8pEWd6uXX/fYSo670WD2A7tWV1ZhszWai3tgH/1wR7kpOzik6wkhgD', + page_age='7 hours ago', + title='26 May 2025 UPSC Current Affairs - Daily News Headlines', + type='web_search_result', + url='https://testbook.com/ias-preparation/upsc-current-affairs-for-26-may-2025', + ), + ], + tool_call_id=IsStr(), + timestamp=IsDatetime(), + ), + TextPart( + content="""\ Based on the search results, today is Monday, May 26, 2025. This is confirmed by several sources: 1. \ """ - ), - TextPart(content="It's Memorial Day today, May 26, 2025"), - TextPart( - content="""\ + ), + TextPart(content="It's Memorial Day today, May 26, 2025"), + TextPart( + content="""\ 2. \ """ - ), - TextPart( - content='May 2025 is the fifth month of the current common year. The month began on a Thursday and will end on a Saturday after 31 days' - ), - TextPart( - content="""\ + ), + TextPart( + content='May 2025 is the fifth month of the current common year. The month began on a Thursday and will end on a Saturday after 31 days' + ), + TextPart( + content="""\ 3. \ """ + ), + TextPart( + content="On May 26, 2025, there are significant developments happening, including India's launch of the Bharat Forecasting System to boost weather prediction and disaster preparedness" + ), + ], + usage=Usage( + requests=1, + request_tokens=16312, + response_tokens=258, + total_tokens=16570, + details={ + 'cache_creation_input_tokens': 0, + 'cache_read_input_tokens': 0, + 'input_tokens': 16312, + 'output_tokens': 258, + }, ), - TextPart( - content="On May 26, 2025, there are significant developments happening, including India's launch of the Bharat Forecasting System to boost weather prediction and disaster preparedness" - ), - ], - usage=Usage( - requests=1, - request_tokens=16312, - response_tokens=258, - total_tokens=16570, - details={ - 'cache_creation_input_tokens': 0, - 'cache_read_input_tokens': 0, - 'input_tokens': 16312, - 'output_tokens': 258, - }, + model_name='claude-3-5-sonnet-20241022', + timestamp=IsDatetime(), + vendor_id=IsStr(), ), - model_name='claude-3-5-sonnet-20241022', - timestamp=IsDatetime(), - vendor_id=IsStr(), - ), - ] + ] + ) ) diff --git a/tests/models/test_groq.py b/tests/models/test_groq.py index 2764a7bb6..c4860d4f4 100644 --- a/tests/models/test_groq.py +++ b/tests/models/test_groq.py @@ -716,12 +716,12 @@ async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_k Title: Current Time and Date - Exact Time! URL: https://time-and-calendar.com/ -Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchonizing in real time with our server clock. +Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchronizing in real time with our server clock. Score: 0.6799 Title: Today's Date - CalendarDate.com URL: https://www.calendardate.com/todays.htm -Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemishpere flip seasons - i.e. Winter is Summer. +Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemisphere flip seasons - i.e. Winter is Summer. Score: 0.6416 Title: What is the date today | Today's Date @@ -803,12 +803,12 @@ async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_k Title: Current Time and Date - Exact Time! URL: https://time-and-calendar.com/ -Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchonizing in real time with our server clock. +Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchronizing in real time with our server clock. Score: 0.6799 Title: Today's Date - CalendarDate.com URL: https://www.calendardate.com/todays.htm -Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemishpere flip seasons - i.e. Winter is Summer. +Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemisphere flip seasons - i.e. Winter is Summer. Score: 0.6416 Title: What is the date today | Today's Date From 427dec201b70f795282ce1d8ba7911ed5b181701 Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Mon, 30 Jun 2025 18:36:49 -0700 Subject: [PATCH 23/34] fixing types --- pydantic_ai_slim/pydantic_ai/models/cohere.py | 12 +++++++++++- pydantic_ai_slim/pydantic_ai/models/function.py | 7 +++++++ pydantic_ai_slim/pydantic_ai/models/gemini.py | 11 +++++++++++ pydantic_ai_slim/pydantic_ai/models/google.py | 6 ++++++ pydantic_ai_slim/pydantic_ai/models/groq.py | 8 ++++++++ pydantic_ai_slim/pydantic_ai/models/mistral.py | 12 +++++++++++- pydantic_ai_slim/pydantic_ai/models/test.py | 5 +++++ 7 files changed, 59 insertions(+), 2 deletions(-) diff --git a/pydantic_ai_slim/pydantic_ai/models/cohere.py b/pydantic_ai_slim/pydantic_ai/models/cohere.py index b51bed1b3..dc3a3226c 100644 --- a/pydantic_ai_slim/pydantic_ai/models/cohere.py +++ b/pydantic_ai_slim/pydantic_ai/models/cohere.py @@ -16,6 +16,8 @@ ModelResponse, ModelResponsePart, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ThinkingPart, @@ -221,6 +223,14 @@ def _map_messages(self, messages: list[ModelMessage]) -> list[ChatMessageV2]: pass elif isinstance(item, ToolCallPart): tool_calls.append(self._map_tool_call(item)) + elif isinstance(item, ServerToolCallPart): + # ServerToolCallPart represents a tool call from a remote server + # Never returned from cohere + pass + elif isinstance(item, ServerToolReturnPart): + # ServerToolReturnPart represents a tool return from a remote server + # Never returned from cohere + pass else: assert_never(item) message_param = AssistantChatMessageV2(role='assistant') @@ -242,7 +252,7 @@ def _get_tools(self, model_request_parameters: ModelRequestParameters) -> list[T return tools @staticmethod - def _map_tool_call(t: ToolCallPart) -> ToolCallV2: + def _map_tool_call(t: ToolCallPart | ServerToolCallPart) -> ToolCallV2: return ToolCallV2( id=_guard_tool_call_id(t=t), type='function', diff --git a/pydantic_ai_slim/pydantic_ai/models/function.py b/pydantic_ai_slim/pydantic_ai/models/function.py index d3a5b8fbd..d94c34269 100644 --- a/pydantic_ai_slim/pydantic_ai/models/function.py +++ b/pydantic_ai_slim/pydantic_ai/models/function.py @@ -24,6 +24,8 @@ ModelResponse, ModelResponseStreamEvent, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ThinkingPart, @@ -294,6 +296,11 @@ def _estimate_usage(messages: Iterable[ModelMessage]) -> usage.Usage: elif isinstance(part, ToolCallPart): call = part response_tokens += 1 + _estimate_string_tokens(call.args_as_json_str()) + elif isinstance(part, ServerToolCallPart): + call = part + response_tokens += 1 + _estimate_string_tokens(call.args_as_json_str()) + elif isinstance(part, ServerToolReturnPart): + response_tokens += _estimate_string_tokens(part.model_response_str()) else: assert_never(part) else: diff --git a/pydantic_ai_slim/pydantic_ai/models/gemini.py b/pydantic_ai_slim/pydantic_ai/models/gemini.py index 64008622b..1deb753eb 100644 --- a/pydantic_ai_slim/pydantic_ai/models/gemini.py +++ b/pydantic_ai_slim/pydantic_ai/models/gemini.py @@ -27,6 +27,8 @@ ModelResponsePart, ModelResponseStreamEvent, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ThinkingPart, @@ -620,6 +622,15 @@ def _content_model_response(m: ModelResponse) -> _GeminiContent: elif isinstance(item, TextPart): if item.content: parts.append(_GeminiTextPart(text=item.content)) + elif isinstance(item, ServerToolCallPart): + # Handle ServerToolCallPart the same as ToolCallPart + # Never returned from gemini + pass + parts.append(_function_call_part_from_call(item)) + elif isinstance(item, ServerToolReturnPart): + # Convert ServerToolReturnPart to a function response part + # Never returned from gemini + pass else: assert_never(item) return _GeminiContent(role='model', parts=parts) diff --git a/pydantic_ai_slim/pydantic_ai/models/google.py b/pydantic_ai_slim/pydantic_ai/models/google.py index 1756a8580..19cc205e6 100644 --- a/pydantic_ai_slim/pydantic_ai/models/google.py +++ b/pydantic_ai_slim/pydantic_ai/models/google.py @@ -495,6 +495,12 @@ def _content_model_response(m: ModelResponse) -> ContentDict: # please open an issue. The below code is the code to send thinking to the provider. # parts.append({'text': item.content, 'thought': True}) pass + elif isinstance(item, ServerToolCallPart): + # Never returned from google + pass + elif isinstance(item, ServerToolReturnPart): + # Never returned from gemini + pass else: assert_never(item) return ContentDict(role='model', parts=parts) diff --git a/pydantic_ai_slim/pydantic_ai/models/groq.py b/pydantic_ai_slim/pydantic_ai/models/groq.py index 4b7f49964..671623a8d 100644 --- a/pydantic_ai_slim/pydantic_ai/models/groq.py +++ b/pydantic_ai_slim/pydantic_ai/models/groq.py @@ -315,6 +315,14 @@ def _map_messages(self, messages: list[ModelMessage]) -> list[chat.ChatCompletio elif isinstance(item, ThinkingPart): # Skip thinking parts when mapping to Groq messages continue + elif isinstance(item, ServerToolCallPart): + # ServerToolCallPart is handled separately in server-side tools + # Never returned from groq + pass + elif isinstance(item, ServerToolReturnPart): + # ServerToolReturnPart is handled separately in server-side tools + # Never returned from groq + pass else: assert_never(item) message_param = chat.ChatCompletionAssistantMessageParam(role='assistant') diff --git a/pydantic_ai_slim/pydantic_ai/models/mistral.py b/pydantic_ai_slim/pydantic_ai/models/mistral.py index 2a1452a0c..f1087fff0 100644 --- a/pydantic_ai_slim/pydantic_ai/models/mistral.py +++ b/pydantic_ai_slim/pydantic_ai/models/mistral.py @@ -25,6 +25,8 @@ ModelResponsePart, ModelResponseStreamEvent, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ThinkingPart, @@ -373,7 +375,7 @@ def _map_mistral_to_pydantic_tool_call(tool_call: MistralToolCall) -> ToolCallPa return ToolCallPart(func_call.name, func_call.arguments, tool_call_id) @staticmethod - def _map_tool_call(t: ToolCallPart) -> MistralToolCall: + def _map_tool_call(t: ToolCallPart | ServerToolCallPart) -> MistralToolCall: """Maps a pydantic-ai ToolCall to a MistralToolCall.""" return MistralToolCall( id=_utils.guard_tool_call_id(t=t), @@ -497,6 +499,14 @@ def _map_messages(self, messages: list[ModelMessage]) -> list[MistralMessages]: pass elif isinstance(part, ToolCallPart): tool_calls.append(self._map_tool_call(part)) + elif isinstance(part, ServerToolCallPart): + # Handle ServerToolCallPart the same as ToolCallPart + # Never returned from mistral + pass + elif isinstance(part, ServerToolReturnPart): + # For now, we'll add ServerToolReturnPart as text content + # Never returned from mistral + pass else: assert_never(part) mistral_messages.append(MistralAssistantMessage(content=content_chunks, tool_calls=tool_calls)) diff --git a/pydantic_ai_slim/pydantic_ai/models/test.py b/pydantic_ai_slim/pydantic_ai/models/test.py index 87a0c79c0..b1b5122f1 100644 --- a/pydantic_ai_slim/pydantic_ai/models/test.py +++ b/pydantic_ai_slim/pydantic_ai/models/test.py @@ -19,6 +19,8 @@ ModelResponsePart, ModelResponseStreamEvent, RetryPromptPart, + ServerToolCallPart, + ServerToolReturnPart, TextPart, ThinkingPart, ToolCallPart, @@ -256,6 +258,9 @@ async def _get_event_iterator(self) -> AsyncIterator[ModelResponseStreamEvent]: yield self._parts_manager.handle_tool_call_part( vendor_part_id=i, tool_name=part.tool_name, args=part.args, tool_call_id=part.tool_call_id ) + elif isinstance(part, (ServerToolCallPart, ServerToolReturnPart)): # pragma: no cover + # NOTE: These parts are not generated by TestModel, but we need to handle them for type checking + assert False, f'Unexpected part type in TestModel: {type(part).__name__}' elif isinstance(part, ThinkingPart): # pragma: no cover # NOTE: There's no way to reach this part of the code, since we don't generate ThinkingPart on TestModel. assert False, "This should be unreachable — we don't generate ThinkingPart on TestModel." From 866ad217b37869552fa0fba0d89f19c57be1838d Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Mon, 30 Jun 2025 18:39:29 -0700 Subject: [PATCH 24/34] fixing types in gemini --- pydantic_ai_slim/pydantic_ai/models/gemini.py | 1 - 1 file changed, 1 deletion(-) diff --git a/pydantic_ai_slim/pydantic_ai/models/gemini.py b/pydantic_ai_slim/pydantic_ai/models/gemini.py index 1deb753eb..baa91ca1a 100644 --- a/pydantic_ai_slim/pydantic_ai/models/gemini.py +++ b/pydantic_ai_slim/pydantic_ai/models/gemini.py @@ -626,7 +626,6 @@ def _content_model_response(m: ModelResponse) -> _GeminiContent: # Handle ServerToolCallPart the same as ToolCallPart # Never returned from gemini pass - parts.append(_function_call_part_from_call(item)) elif isinstance(item, ServerToolReturnPart): # Convert ServerToolReturnPart to a function response part # Never returned from gemini From 4c2622dfb80b16b4c8dad734c6ba671b39a9adad Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Mon, 30 Jun 2025 18:46:26 -0700 Subject: [PATCH 25/34] misspells are on purpose oops --- tests/models/test_groq.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/models/test_groq.py b/tests/models/test_groq.py index c4860d4f4..2764a7bb6 100644 --- a/tests/models/test_groq.py +++ b/tests/models/test_groq.py @@ -716,12 +716,12 @@ async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_k Title: Current Time and Date - Exact Time! URL: https://time-and-calendar.com/ -Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchronizing in real time with our server clock. +Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchonizing in real time with our server clock. Score: 0.6799 Title: Today's Date - CalendarDate.com URL: https://www.calendardate.com/todays.htm -Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemisphere flip seasons - i.e. Winter is Summer. +Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemishpere flip seasons - i.e. Winter is Summer. Score: 0.6416 Title: What is the date today | Today's Date @@ -803,12 +803,12 @@ async def test_groq_model_web_search_tool(allow_model_requests: None, groq_api_k Title: Current Time and Date - Exact Time! URL: https://time-and-calendar.com/ -Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchronizing in real time with our server clock. +Content: The actual time is: Mon May 12 2025 22:14:39 GMT-0700 (Pacific Daylight Time) Your computer time is: 22:14:38 The time of your computer is synchronized with our web server. This mean that it is synchonizing in real time with our server clock. Score: 0.6799 Title: Today's Date - CalendarDate.com URL: https://www.calendardate.com/todays.htm -Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemisphere flip seasons - i.e. Winter is Summer. +Content: Details about today's date with count of days, weeks, and months, Sun and Moon cycles, Zodiac signs and holidays. Monday May 12, 2025 . Home; Calendars. 2025 Calendar; ... Current Season Today: Spring with 40 days until the start of Summer. S. Hemishpere flip seasons - i.e. Winter is Summer. Score: 0.6416 Title: What is the date today | Today's Date From c13736ee4826635ef25e55419384b5a362207b9d Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Mon, 30 Jun 2025 18:50:55 -0700 Subject: [PATCH 26/34] ignore misspellings --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index fb21096fa..ddc3dd721 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,4 +265,4 @@ skip = '.git*,*.svg,*.lock,*.css,*.yaml' check-hidden = true # Ignore "formatting" like **L**anguage ignore-regex = '\*\*[A-Z]\*\*[a-z]+\b' -ignore-words-list = 'asend' +ignore-words-list = 'asend,Hemishpere,synchronizing' From a42a75de113e36b5f56536d281de661a6f7e6cc6 Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Mon, 30 Jun 2025 18:52:58 -0700 Subject: [PATCH 27/34] ignore misspellings --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index ddc3dd721..406128616 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,4 +265,4 @@ skip = '.git*,*.svg,*.lock,*.css,*.yaml' check-hidden = true # Ignore "formatting" like **L**anguage ignore-regex = '\*\*[A-Z]\*\*[a-z]+\b' -ignore-words-list = 'asend,Hemishpere,synchronizing' +ignore-words-list = 'asend,Hemishpere,synchonizing' From e2f1daa0154a7f2c7b5d93f22470f39e7add344a Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Mon, 30 Jun 2025 19:06:35 -0700 Subject: [PATCH 28/34] fixing comment --- pydantic_ai_slim/pydantic_ai/models/google.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydantic_ai_slim/pydantic_ai/models/google.py b/pydantic_ai_slim/pydantic_ai/models/google.py index 19cc205e6..e7ab6be0f 100644 --- a/pydantic_ai_slim/pydantic_ai/models/google.py +++ b/pydantic_ai_slim/pydantic_ai/models/google.py @@ -499,7 +499,7 @@ def _content_model_response(m: ModelResponse) -> ContentDict: # Never returned from google pass elif isinstance(item, ServerToolReturnPart): - # Never returned from gemini + # Never returned from google pass else: assert_never(item) From 3094a9ad67296a8b486530adaf125200a881e3ee Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Tue, 1 Jul 2025 17:17:59 -0400 Subject: [PATCH 29/34] fixing tests and coverage --- tests/models/test_anthropic.py | 31 +++++++++++++++++++++++++ tests/models/test_google.py | 17 ++++++++++++++ tests/models/test_model_function.py | 35 +++++++++++++++++++++++++++++ tests/test_messages.py | 12 ++++++++++ 4 files changed, 95 insertions(+) diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index 3b321bc40..fb24d47c0 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -1510,6 +1510,37 @@ async def test_anthropic_code_execution_tool(allow_model_requests: None, anthrop ) +async def test_anthropic_unsupported_server_tool_name(): + """Test that unsupported server tool names raise ValueError.""" + from datetime import datetime + + # Create a mock message history with an unsupported server tool return + messages = [ + ModelResponse( + parts=[ + ServerToolReturnPart( + tool_name='unsupported_tool_result', # This should trigger the ValueError + content='some content', + tool_call_id='test_id', + timestamp=datetime.now(timezone.utc), + ) + ], + usage=Usage(requests=1, request_tokens=10, response_tokens=10, total_tokens=20), + model_name='test', + timestamp=datetime.now(timezone.utc), + vendor_id='test', + ) + ] + + # Create a mock anthropic model and test the message mapping + mock_client = MockAnthropic.create_mock([]) + m = AnthropicModel('claude-3-5-haiku-latest', provider=AnthropicProvider(anthropic_client=mock_client)) + + # Should raise ValueError when trying to map messages with unsupported tool + with pytest.raises(ValueError, match='Unsupported tool name: unsupported_tool_result'): + await m._map_message(messages) + + @pytest.mark.vcr async def test_anthropic_server_tool_pass_history_to_another_provider( allow_model_requests: None, anthropic_api_key: str, openai_api_key: str diff --git a/tests/models/test_google.py b/tests/models/test_google.py index 40ac8ed82..bc9db039f 100644 --- a/tests/models/test_google.py +++ b/tests/models/test_google.py @@ -1412,3 +1412,20 @@ class CountryLanguage(BaseModel): ), ] ) + + +def test_google_unsupported_builtin_tool(allow_model_requests: None): + """Test that unsupported builtin tools raise UserError.""" + from pydantic_ai.builtin_tools import AbstractBuiltinTool + + # Create a custom unsupported builtin tool + class UnsupportedTool(AbstractBuiltinTool): + pass + + # Create a google model with an unsupported builtin tool + m = GoogleModel('gemini-1.5-flash', provider=GoogleProvider(api_key='test')) + agent = Agent(m, builtin_tools=[UnsupportedTool()]) + + # Should raise UserError when trying to run + with pytest.raises(UserError, match='Unsupported builtin tool'): + agent.run_sync('test') diff --git a/tests/models/test_model_function.py b/tests/models/test_model_function.py index 7e1e820af..3bd33e854 100644 --- a/tests/models/test_model_function.py +++ b/tests/models/test_model_function.py @@ -14,6 +14,8 @@ ModelMessage, ModelRequest, ModelResponse, + ServerToolCallPart, + ServerToolReturnPart, SystemPromptPart, TextPart, ToolCallPart, @@ -508,3 +510,36 @@ async def test_return_empty(): with pytest.raises(ValueError, match='Stream function must return at least one item'): async with agent.run_stream(''): pass + + +def test_server_tool_parts_in_usage_calculation(): + """Test that ServerToolCallPart and ServerToolReturnPart are handled in usage calculation.""" + # Create a message history with server tool parts + messages = [ + ModelRequest(parts=[UserPromptPart(content='test', timestamp=IsNow(tz=timezone.utc))]), + ModelResponse( + parts=[ + TextPart(content='Let me search for that.'), + ServerToolCallPart( + tool_name='web_search', args={'query': 'test search'}, tool_call_id='test_id_1', model_name='test' + ), + ServerToolReturnPart( + tool_name='web_search_tool_result', + content={'results': ['result1', 'result2']}, + tool_call_id='test_id_1', + timestamp=IsNow(tz=timezone.utc), + ), + ], + usage=Usage(requests=1, request_tokens=10, response_tokens=10, total_tokens=20), + model_name='test', + timestamp=IsNow(tz=timezone.utc), + ), + ] + + # The function model should calculate usage including server tool parts + agent = Agent(FunctionModel(return_last)) + result = agent.run_sync('Another test', message_history=messages) + + # Verify usage was calculated (it includes tokens from all parts) + assert result.usage().request_tokens > 0 + assert result.usage().response_tokens > 0 diff --git a/tests/test_messages.py b/tests/test_messages.py index 6a4d81bf4..f2a5ecf43 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -8,6 +8,7 @@ DocumentUrl, ImageUrl, ThinkingPartDelta, + ToolReturnPart, VideoUrl, ) @@ -305,3 +306,14 @@ def test_thinking_part_delta_apply_to_thinking_part_delta(): result = content_delta.apply(original_delta) assert isinstance(result, ThinkingPartDelta) assert result.content_delta == 'new_content' + + +def test_tool_return_part_has_content(): + """Test ToolReturnPart.has_content() method for coverage.""" + # Test with content + tool_return_with_content = ToolReturnPart(tool_call_id='call_123', tool_name='test_tool', content='some result') + assert tool_return_with_content.has_content() is True + + # Test with None content + tool_return_without_content = ToolReturnPart(tool_call_id='call_456', tool_name='test_tool', content=None) + assert tool_return_without_content.has_content() is False From 6a3c9879edf8f632347b66a48e97dd3b4aa289d2 Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Tue, 1 Jul 2025 17:21:33 -0400 Subject: [PATCH 30/34] fixing types --- tests/models/test_anthropic.py | 4 ++-- tests/models/test_model_function.py | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index fb24d47c0..c280b1c15 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -1515,7 +1515,7 @@ async def test_anthropic_unsupported_server_tool_name(): from datetime import datetime # Create a mock message history with an unsupported server tool return - messages = [ + messages: list[ModelMessage] = [ ModelResponse( parts=[ ServerToolReturnPart( @@ -1538,7 +1538,7 @@ async def test_anthropic_unsupported_server_tool_name(): # Should raise ValueError when trying to map messages with unsupported tool with pytest.raises(ValueError, match='Unsupported tool name: unsupported_tool_result'): - await m._map_message(messages) + await m._map_message(messages) # pyright: ignore[reportPrivateUsage] @pytest.mark.vcr diff --git a/tests/models/test_model_function.py b/tests/models/test_model_function.py index 3bd33e854..5cab1d495 100644 --- a/tests/models/test_model_function.py +++ b/tests/models/test_model_function.py @@ -541,5 +541,7 @@ def test_server_tool_parts_in_usage_calculation(): result = agent.run_sync('Another test', message_history=messages) # Verify usage was calculated (it includes tokens from all parts) - assert result.usage().request_tokens > 0 - assert result.usage().response_tokens > 0 + usage = result.usage() + assert usage is not None + assert usage.request_tokens > 0 + assert usage.response_tokens > 0 From ac0edb6ce42259c3f3a72d73c375308961730a89 Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Tue, 1 Jul 2025 20:34:52 -0400 Subject: [PATCH 31/34] Revert "ignore misspellings" This reverts commit a42a75de113e36b5f56536d281de661a6f7e6cc6. --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 406128616..ddc3dd721 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,4 +265,4 @@ skip = '.git*,*.svg,*.lock,*.css,*.yaml' check-hidden = true # Ignore "formatting" like **L**anguage ignore-regex = '\*\*[A-Z]\*\*[a-z]+\b' -ignore-words-list = 'asend,Hemishpere,synchonizing' +ignore-words-list = 'asend,Hemishpere,synchronizing' From 374e034ed41de2d58e7c8975d7fe5d21e45c9421 Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Tue, 1 Jul 2025 20:36:35 -0400 Subject: [PATCH 32/34] revert to known good --- pyproject.toml | 2 +- tests/models/test_anthropic.py | 31 ------------------------ tests/models/test_google.py | 17 ------------- tests/models/test_model_function.py | 37 ----------------------------- tests/test_messages.py | 12 ---------- 5 files changed, 1 insertion(+), 98 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index ddc3dd721..406128616 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -265,4 +265,4 @@ skip = '.git*,*.svg,*.lock,*.css,*.yaml' check-hidden = true # Ignore "formatting" like **L**anguage ignore-regex = '\*\*[A-Z]\*\*[a-z]+\b' -ignore-words-list = 'asend,Hemishpere,synchronizing' +ignore-words-list = 'asend,Hemishpere,synchonizing' diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index c280b1c15..3b321bc40 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -1510,37 +1510,6 @@ async def test_anthropic_code_execution_tool(allow_model_requests: None, anthrop ) -async def test_anthropic_unsupported_server_tool_name(): - """Test that unsupported server tool names raise ValueError.""" - from datetime import datetime - - # Create a mock message history with an unsupported server tool return - messages: list[ModelMessage] = [ - ModelResponse( - parts=[ - ServerToolReturnPart( - tool_name='unsupported_tool_result', # This should trigger the ValueError - content='some content', - tool_call_id='test_id', - timestamp=datetime.now(timezone.utc), - ) - ], - usage=Usage(requests=1, request_tokens=10, response_tokens=10, total_tokens=20), - model_name='test', - timestamp=datetime.now(timezone.utc), - vendor_id='test', - ) - ] - - # Create a mock anthropic model and test the message mapping - mock_client = MockAnthropic.create_mock([]) - m = AnthropicModel('claude-3-5-haiku-latest', provider=AnthropicProvider(anthropic_client=mock_client)) - - # Should raise ValueError when trying to map messages with unsupported tool - with pytest.raises(ValueError, match='Unsupported tool name: unsupported_tool_result'): - await m._map_message(messages) # pyright: ignore[reportPrivateUsage] - - @pytest.mark.vcr async def test_anthropic_server_tool_pass_history_to_another_provider( allow_model_requests: None, anthropic_api_key: str, openai_api_key: str diff --git a/tests/models/test_google.py b/tests/models/test_google.py index bc9db039f..40ac8ed82 100644 --- a/tests/models/test_google.py +++ b/tests/models/test_google.py @@ -1412,20 +1412,3 @@ class CountryLanguage(BaseModel): ), ] ) - - -def test_google_unsupported_builtin_tool(allow_model_requests: None): - """Test that unsupported builtin tools raise UserError.""" - from pydantic_ai.builtin_tools import AbstractBuiltinTool - - # Create a custom unsupported builtin tool - class UnsupportedTool(AbstractBuiltinTool): - pass - - # Create a google model with an unsupported builtin tool - m = GoogleModel('gemini-1.5-flash', provider=GoogleProvider(api_key='test')) - agent = Agent(m, builtin_tools=[UnsupportedTool()]) - - # Should raise UserError when trying to run - with pytest.raises(UserError, match='Unsupported builtin tool'): - agent.run_sync('test') diff --git a/tests/models/test_model_function.py b/tests/models/test_model_function.py index 5cab1d495..7e1e820af 100644 --- a/tests/models/test_model_function.py +++ b/tests/models/test_model_function.py @@ -14,8 +14,6 @@ ModelMessage, ModelRequest, ModelResponse, - ServerToolCallPart, - ServerToolReturnPart, SystemPromptPart, TextPart, ToolCallPart, @@ -510,38 +508,3 @@ async def test_return_empty(): with pytest.raises(ValueError, match='Stream function must return at least one item'): async with agent.run_stream(''): pass - - -def test_server_tool_parts_in_usage_calculation(): - """Test that ServerToolCallPart and ServerToolReturnPart are handled in usage calculation.""" - # Create a message history with server tool parts - messages = [ - ModelRequest(parts=[UserPromptPart(content='test', timestamp=IsNow(tz=timezone.utc))]), - ModelResponse( - parts=[ - TextPart(content='Let me search for that.'), - ServerToolCallPart( - tool_name='web_search', args={'query': 'test search'}, tool_call_id='test_id_1', model_name='test' - ), - ServerToolReturnPart( - tool_name='web_search_tool_result', - content={'results': ['result1', 'result2']}, - tool_call_id='test_id_1', - timestamp=IsNow(tz=timezone.utc), - ), - ], - usage=Usage(requests=1, request_tokens=10, response_tokens=10, total_tokens=20), - model_name='test', - timestamp=IsNow(tz=timezone.utc), - ), - ] - - # The function model should calculate usage including server tool parts - agent = Agent(FunctionModel(return_last)) - result = agent.run_sync('Another test', message_history=messages) - - # Verify usage was calculated (it includes tokens from all parts) - usage = result.usage() - assert usage is not None - assert usage.request_tokens > 0 - assert usage.response_tokens > 0 diff --git a/tests/test_messages.py b/tests/test_messages.py index f2a5ecf43..6a4d81bf4 100644 --- a/tests/test_messages.py +++ b/tests/test_messages.py @@ -8,7 +8,6 @@ DocumentUrl, ImageUrl, ThinkingPartDelta, - ToolReturnPart, VideoUrl, ) @@ -306,14 +305,3 @@ def test_thinking_part_delta_apply_to_thinking_part_delta(): result = content_delta.apply(original_delta) assert isinstance(result, ThinkingPartDelta) assert result.content_delta == 'new_content' - - -def test_tool_return_part_has_content(): - """Test ToolReturnPart.has_content() method for coverage.""" - # Test with content - tool_return_with_content = ToolReturnPart(tool_call_id='call_123', tool_name='test_tool', content='some result') - assert tool_return_with_content.has_content() is True - - # Test with None content - tool_return_without_content = ToolReturnPart(tool_call_id='call_456', tool_name='test_tool', content=None) - assert tool_return_without_content.has_content() is False From 2393c875d6b61eb76d7a3f3574946a6b1bc5685b Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Wed, 2 Jul 2025 16:00:49 -0400 Subject: [PATCH 33/34] adding anthropic test coverage --- tests/models/test_anthropic.py | 134 +++++++++++++++++++++++++++++++++ 1 file changed, 134 insertions(+) diff --git a/tests/models/test_anthropic.py b/tests/models/test_anthropic.py index 3b321bc40..2b514b53a 100644 --- a/tests/models/test_anthropic.py +++ b/tests/models/test_anthropic.py @@ -49,6 +49,7 @@ from anthropic.resources.beta import AsyncBeta from anthropic.types.beta import ( BetaCodeExecutionResultBlock, + BetaCodeExecutionToolResultBlock, BetaContentBlock, BetaInputJSONDelta, BetaMessage, @@ -60,10 +61,12 @@ BetaRawMessageStartEvent, BetaRawMessageStopEvent, BetaRawMessageStreamEvent, + BetaServerToolUseBlock, BetaTextBlock, BetaToolUseBlock, BetaUsage, BetaWebSearchResultBlock, + BetaWebSearchToolResultBlock, ) from anthropic.types.beta.beta_raw_message_delta_event import Delta @@ -1981,3 +1984,134 @@ async def get_user_country() -> str: Mexico City is not only the largest city in Mexico but also one of the largest metropolitan areas in the world, with a metropolitan population of over 21 million people. The city proper has a population of approximately 9 million people and serves as the capital and political, cultural, and economic center of Mexico.\ """) + + +async def test_anthropic_web_search_tool_pass_history_back(env: TestEnv, allow_model_requests: None): + """Test passing web search tool history back to Anthropic.""" + # Create the first mock response with server tool blocks + first_response = completion_message( + [ + BetaTextBlock(text='Let me search for the current date.', type='text'), + BetaServerToolUseBlock( + id='server_tool_123', name='web_search', input={'query': 'current date today'}, type='server_tool_use' + ), + BetaWebSearchToolResultBlock( + tool_use_id='server_tool_123', + type='web_search_tool_result', + content=[ + BetaWebSearchResultBlock( + title='Current Date and Time', + url='https://example.com/date', + type='web_search_result', + encrypted_content='dummy_encrypted_content', + ) + ], + ), + BetaTextBlock(text='Today is January 2, 2025.', type='text'), + ], + BetaUsage(input_tokens=10, output_tokens=20), + ) + + # Create the second mock response that references the history + second_response = completion_message( + [BetaTextBlock(text='The web search result showed that today is January 2, 2025.', type='text')], + BetaUsage(input_tokens=50, output_tokens=30), + ) + + mock_client = MockAnthropic.create_mock([first_response, second_response]) + m = AnthropicModel('claude-3-5-sonnet-latest', provider=AnthropicProvider(anthropic_client=mock_client)) + agent = Agent(m, builtin_tools=[WebSearchTool()]) + + # First run to get server tool history + result = await agent.run('What day is today?') + + # Verify we have server tool parts in the history + server_tool_calls = [p for m in result.all_messages() for p in m.parts if isinstance(p, ServerToolCallPart)] + server_tool_returns = [p for m in result.all_messages() for p in m.parts if isinstance(p, ServerToolReturnPart)] + assert len(server_tool_calls) == 1 + assert len(server_tool_returns) == 1 + assert server_tool_calls[0].tool_name == 'web_search' + assert server_tool_returns[0].tool_name == 'web_search_tool_result' + + # Pass the history back to another Anthropic agent run + agent2 = Agent(m) + result2 = await agent2.run('What was the web search result?', message_history=result.all_messages()) + assert result2.output == 'The web search result showed that today is January 2, 2025.' + + +async def test_anthropic_code_execution_tool_pass_history_back(env: TestEnv, allow_model_requests: None): + """Test passing code execution tool history back to Anthropic.""" + # Create the first mock response with server tool blocks + first_response = completion_message( + [ + BetaTextBlock(text='Let me calculate 2 + 2.', type='text'), + BetaServerToolUseBlock( + id='server_tool_456', name='code_execution', input={'code': 'print(2 + 2)'}, type='server_tool_use' + ), + BetaCodeExecutionToolResultBlock( + tool_use_id='server_tool_456', + type='code_execution_tool_result', + content=BetaCodeExecutionResultBlock( + content=[], + return_code=0, + stderr='', + stdout='4\n', + type='code_execution_result', + ), + ), + BetaTextBlock(text='The result is 4.', type='text'), + ], + BetaUsage(input_tokens=10, output_tokens=20), + ) + + # Create the second mock response that references the history + second_response = completion_message( + [BetaTextBlock(text='The code execution returned the result: 4', type='text')], + BetaUsage(input_tokens=50, output_tokens=30), + ) + + mock_client = MockAnthropic.create_mock([first_response, second_response]) + m = AnthropicModel('claude-3-5-sonnet-latest', provider=AnthropicProvider(anthropic_client=mock_client)) + agent = Agent(m, builtin_tools=[CodeExecutionTool()]) + + # First run to get server tool history + result = await agent.run('What is 2 + 2?') + + # Verify we have server tool parts in the history + server_tool_calls = [p for m in result.all_messages() for p in m.parts if isinstance(p, ServerToolCallPart)] + server_tool_returns = [p for m in result.all_messages() for p in m.parts if isinstance(p, ServerToolReturnPart)] + assert len(server_tool_calls) == 1 + assert len(server_tool_returns) == 1 + assert server_tool_calls[0].tool_name == 'code_execution' + assert server_tool_returns[0].tool_name == 'code_execution_tool_result' + + # Pass the history back to another Anthropic agent run + agent2 = Agent(m) + result2 = await agent2.run('What was the code execution result?', message_history=result.all_messages()) + assert result2.output == 'The code execution returned the result: 4' + + +async def test_anthropic_unsupported_server_tool_name_error(): + """Test that unsupported server tool names raise an error.""" + from pydantic_ai.messages import ModelMessage, ModelResponse, ServerToolReturnPart + + env = TestEnv() + env.set('ANTHROPIC_API_KEY', 'test-key') + model = AnthropicModel('claude-3-5-sonnet-latest', provider='anthropic') + + # Create a message with an unsupported server tool name + messages: list[ModelMessage] = [ + ModelResponse( + parts=[ + ServerToolReturnPart( + tool_name='unsupported_tool', # This should trigger the error + content='some content', + tool_call_id='test_id', + ) + ] + ) + ] + + # This should raise a ValueError + with pytest.raises(ValueError, match='Unsupported tool name: unsupported_tool'): + await model._map_message(messages) # type: ignore[attr-defined] From 21094a775ab27b0e031529dcde08831d7cd942a2 Mon Sep 17 00:00:00 2001 From: "matt.brandman@gmail.com" Date: Wed, 2 Jul 2025 16:15:49 -0400 Subject: [PATCH 34/34] adding pragma no cover to has_content --- pydantic_ai_slim/pydantic_ai/messages.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pydantic_ai_slim/pydantic_ai/messages.py b/pydantic_ai_slim/pydantic_ai/messages.py index 468449ad7..5e325105a 100644 --- a/pydantic_ai_slim/pydantic_ai/messages.py +++ b/pydantic_ai_slim/pydantic_ai/messages.py @@ -453,7 +453,7 @@ def otel_event(self, settings: InstrumentationSettings) -> Event: def has_content(self) -> bool: """Return `True` if the tool return has content.""" - return self.content is not None + return self.content is not None # pragma: no cover __repr__ = _utils.dataclasses_no_defaults_repr