From 400a2d74010d8fcf0b856fc3fb988af15641b0a5 Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 8 Oct 2026 17:02:04 -0400 Subject: [PATCH 1/9] fix(tutorials): cap pydantic for the state machine MCP servers openai-websearch-mcp pins mcp 1.13.1, which imports a private pydantic helper that pydantic 2.14 removed. uvx resolves each server unpinned, so the server died at import and the agent made no tool calls. Add pydantic<2.14 to the existing uvx pin. Co-Authored-By: Claude Opus 5.5 --- .../workflows/deep_research/performing_deep_research.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/tutorials/10_async/10_temporal/020_state_machine/project/workflows/deep_research/performing_deep_research.py b/examples/tutorials/10_async/10_temporal/020_state_machine/project/workflows/deep_research/performing_deep_research.py index 7bcb5a6d5..2060cc9b7 100644 --- a/examples/tutorials/10_async/10_temporal/020_state_machine/project/workflows/deep_research/performing_deep_research.py +++ b/examples/tutorials/10_async/10_temporal/020_state_machine/project/workflows/deep_research/performing_deep_research.py @@ -18,7 +18,10 @@ # resolves ``mcp`` unpinned there, ignoring the version this project pins, so without # this constraint every server dies at import and the agent silently makes zero tool # calls. Drop the pin once the servers support mcp 2.x. -_MCP_PIN = ["--with", "mcp<2"] +# pydantic is capped for the same reason: openai-websearch-mcp pins mcp 1.13.1, +# which imports a private pydantic helper that pydantic 2.14 removed. Drop the +# cap once that server allows a newer mcp. +_MCP_PIN = ["--with", "mcp<2", "--with", "pydantic<2.14"] MCP_SERVERS = [ StdioServerParameters( From 65dc317c928e291a6f0cac558d40362a940885ff Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 8 Oct 2026 18:15:38 -0400 Subject: [PATCH 2/9] fix(tutorials): cap pydantic for the agent chat web-search MCP server Co-Authored-By: Claude Opus 5.5 --- .../10_async/10_temporal/010_agent_chat/project/workflow.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/examples/tutorials/10_async/10_temporal/010_agent_chat/project/workflow.py b/examples/tutorials/10_async/10_temporal/010_agent_chat/project/workflow.py index 3e3ac5b27..7db940733 100644 --- a/examples/tutorials/10_async/10_temporal/010_agent_chat/project/workflow.py +++ b/examples/tutorials/10_async/10_temporal/010_agent_chat/project/workflow.py @@ -55,7 +55,10 @@ class StateModel(BaseModel): # ), StdioServerParameters( command="uvx", - args=["openai-websearch-mcp"], + # openai-websearch-mcp pins mcp 1.13.1, which imports a private + # pydantic helper that pydantic 2.14 removed; uvx resolves pydantic + # unpinned, so cap it until the server allows a newer mcp. + args=["--with", "pydantic<2.14", "openai-websearch-mcp"], env={"OPENAI_API_KEY": os.environ.get("OPENAI_API_KEY", "")}, ), ] From 529590a12c307431359a76242243f28017793043 Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 8 Oct 2026 18:15:40 -0400 Subject: [PATCH 3/9] fix(tutorials): cap pydantic for the other-SDKs web-search MCP server Co-Authored-By: Claude Opus 5.5 --- .../10_async/00_base/040_other_sdks/project/acp.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/examples/tutorials/10_async/00_base/040_other_sdks/project/acp.py b/examples/tutorials/10_async/00_base/040_other_sdks/project/acp.py index d2ec84fcd..d06d39f22 100644 --- a/examples/tutorials/10_async/00_base/040_other_sdks/project/acp.py +++ b/examples/tutorials/10_async/00_base/040_other_sdks/project/acp.py @@ -54,7 +54,12 @@ class StateModel(BaseModel): args=["-y", "@modelcontextprotocol/server-sequential-thinking"], ), StdioServerParameters( - command="uvx", args=["openai-websearch-mcp"], env={"OPENAI_API_KEY": os.environ.get("OPENAI_API_KEY", "")} + # openai-websearch-mcp pins mcp 1.13.1, which imports a private + # pydantic helper that pydantic 2.14 removed; uvx resolves pydantic + # unpinned, so cap it until the server allows a newer mcp. + command="uvx", + args=["--with", "pydantic<2.14", "openai-websearch-mcp"], + env={"OPENAI_API_KEY": os.environ.get("OPENAI_API_KEY", "")}, ), ] From cb84168d284fa93f90dbe0c300af38deb462efe2 Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 8 Oct 2026 18:15:42 -0400 Subject: [PATCH 4/9] fix(tutorials): install Node for the other-SDKs sequential-thinking MCP server Co-Authored-By: Claude Opus 5.5 --- examples/tutorials/10_async/00_base/040_other_sdks/Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/tutorials/10_async/00_base/040_other_sdks/Dockerfile b/examples/tutorials/10_async/00_base/040_other_sdks/Dockerfile index 2e0ee6ef0..f375d16d3 100644 --- a/examples/tutorials/10_async/00_base/040_other_sdks/Dockerfile +++ b/examples/tutorials/10_async/00_base/040_other_sdks/Dockerfile @@ -15,6 +15,8 @@ RUN apt-get update && apt-get install -y \ gcc \ cmake \ netcat-openbsd \ + nodejs \ + npm \ && apt-get clean \ && rm -rf /var/lib/apt/lists/* From 923aaf5f749758f2131dd1f135ffc023d6a85b9d Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 8 Oct 2026 19:49:05 -0400 Subject: [PATCH 5/9] fix(tutorials): always call get_weather in the Temporal pydantic_ai agent Co-Authored-By: Claude Opus 5.5 --- .../10_async/10_temporal/110_pydantic_ai/project/agent.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py b/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py index 4e59688ce..311103039 100644 --- a/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py +++ b/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py @@ -41,6 +41,7 @@ Guidelines: - Be concise and helpful - Use tools when they would help answer the user's question +- For any question about the weather, call get_weather; never answer weather from memory - If you're unsure, ask clarifying questions - Always provide accurate information """ From df0cb1dd621f7abb05d650fca50b1a6cba8512c9 Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 8 Oct 2026 19:49:06 -0400 Subject: [PATCH 6/9] fix(tutorials): always call get_weather in the base pydantic_ai agent Co-Authored-By: Claude Opus 5.5 --- .../tutorials/10_async/00_base/110_pydantic_ai/project/agent.py | 1 + 1 file changed, 1 insertion(+) diff --git a/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py b/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py index e7b764d82..bce85a07d 100644 --- a/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py +++ b/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py @@ -22,6 +22,7 @@ Guidelines: - Be concise and helpful - Use tools when they would help answer the user's question +- For any question about the weather, call get_weather; never answer weather from memory - If you're unsure, ask clarifying questions - Always provide accurate information """ From 5dc91b2c3c5476adba5c99026a417f816a629230 Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 8 Oct 2026 19:53:40 -0400 Subject: [PATCH 7/9] fix(tutorials): only call get_weather for a city's current weather The instruction sent every weather question to get_weather, including ones the tool can't answer (for example, what causes rain), which in the Temporal tutorial also runs an extra activity. Co-Authored-By: Claude Opus 5.5 --- .../tutorials/10_async/00_base/110_pydantic_ai/project/agent.py | 2 +- .../10_async/10_temporal/110_pydantic_ai/project/agent.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py b/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py index bce85a07d..30b822833 100644 --- a/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py +++ b/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py @@ -22,7 +22,7 @@ Guidelines: - Be concise and helpful - Use tools when they would help answer the user's question -- For any question about the weather, call get_weather; never answer weather from memory +- For the current weather in a specific city, call get_weather; never answer that from memory - If you're unsure, ask clarifying questions - Always provide accurate information """ diff --git a/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py b/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py index 311103039..e26175d8c 100644 --- a/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py +++ b/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py @@ -41,7 +41,7 @@ Guidelines: - Be concise and helpful - Use tools when they would help answer the user's question -- For any question about the weather, call get_weather; never answer weather from memory +- For the current weather in a specific city, call get_weather; never answer that from memory - If you're unsure, ask clarifying questions - Always provide accurate information """ From 4271b9aa30b82c148ec5da0cca3f2ba30f6e547b Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 8 Oct 2026 19:56:17 -0400 Subject: [PATCH 8/9] fix(tutorials): limit the get_weather instruction to current-weather questions (Temporal) Co-Authored-By: Claude Opus 5.5 --- .../10_async/10_temporal/110_pydantic_ai/project/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py b/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py index e26175d8c..4e03e3383 100644 --- a/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py +++ b/examples/tutorials/10_async/10_temporal/110_pydantic_ai/project/agent.py @@ -41,7 +41,7 @@ Guidelines: - Be concise and helpful - Use tools when they would help answer the user's question -- For the current weather in a specific city, call get_weather; never answer that from memory +- When asked for the current weather in a place, call get_weather; never answer that from memory - If you're unsure, ask clarifying questions - Always provide accurate information """ From 97c5c8baa15113eb2f66d63c50c7eb40a37b5e53 Mon Sep 17 00:00:00 2001 From: Daniel Miller Date: Thu, 8 Oct 2026 19:56:18 -0400 Subject: [PATCH 9/9] fix(tutorials): limit the get_weather instruction to current-weather questions (base) Co-Authored-By: Claude Opus 5.5 --- .../tutorials/10_async/00_base/110_pydantic_ai/project/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py b/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py index 30b822833..287598c1a 100644 --- a/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py +++ b/examples/tutorials/10_async/00_base/110_pydantic_ai/project/agent.py @@ -22,7 +22,7 @@ Guidelines: - Be concise and helpful - Use tools when they would help answer the user's question -- For the current weather in a specific city, call get_weather; never answer that from memory +- When asked for the current weather in a place, call get_weather; never answer that from memory - If you're unsure, ask clarifying questions - Always provide accurate information """