Skip to content

Commit 0a79a58

Browse files
ci(tutorials): pin pydantic below 2.14 for the openai-websearch-mcp server
openai-websearch-mcp pins mcp 1.13.1, which imports a pydantic internal that pydantic 2.14 removed, so the server died at import and the 010, 020 and 040 tutorials timed out waiting for tool calls on every branch. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 parent 6a57f9a commit 0a79a58

4 files changed

Lines changed: 11 additions & 4 deletions

File tree

‎examples/tutorials/10_async/00_base/040_other_sdks/project/acp.py‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,10 @@ class StateModel(BaseModel):
5454
args=["-y", "@modelcontextprotocol/server-sequential-thinking"],
5555
),
5656
StdioServerParameters(
57-
command="uvx", args=["openai-websearch-mcp"], env={"OPENAI_API_KEY": os.environ.get("OPENAI_API_KEY", "")}
57+
command="uvx",
58+
# mcp 1.13.1, pinned by openai-websearch-mcp, imports a pydantic internal that 2.14 removed.
59+
args=["--with", "pydantic<2.14", "openai-websearch-mcp"],
60+
env={"OPENAI_API_KEY": os.environ.get("OPENAI_API_KEY", "")},
5861
),
5962
]
6063

‎examples/tutorials/10_async/10_temporal/010_agent_chat/project/workflow.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,8 @@ class StateModel(BaseModel):
5555
# ),
5656
StdioServerParameters(
5757
command="uvx",
58-
args=["openai-websearch-mcp"],
58+
# mcp 1.13.1, pinned by openai-websearch-mcp, imports a pydantic internal that 2.14 removed.
59+
args=["--with", "pydantic<2.14", "openai-websearch-mcp"],
5960
env={"OPENAI_API_KEY": os.environ.get("OPENAI_API_KEY", "")},
6061
),
6162
]

‎examples/tutorials/10_async/10_temporal/020_state_machine/project/workflows/deep_research/performing_deep_research.py‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
# this constraint every server dies at import and the agent silently makes zero tool
2020
# calls. Drop the pin once the servers support mcp 2.x.
2121
_MCP_PIN = ["--with", "mcp<2"]
22+
# mcp 1.13.1, pinned by openai-websearch-mcp, imports a pydantic internal that 2.14 removed.
23+
_WEBSEARCH_PIN = ["--with", "pydantic<2.14"]
2224

2325
MCP_SERVERS = [
2426
StdioServerParameters(
@@ -27,7 +29,7 @@
2729
),
2830
StdioServerParameters(
2931
command="uvx",
30-
args=[*_MCP_PIN, "openai-websearch-mcp"],
32+
args=[*_MCP_PIN, *_WEBSEARCH_PIN, "openai-websearch-mcp"],
3133
env={
3234
"OPENAI_API_KEY": os.environ.get("OPENAI_API_KEY", "")
3335
}

‎examples/tutorials/10_async/10_temporal/050_agent_chat_guardrails/project/workflow.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ class StateModel(BaseModel):
7474
),
7575
StdioServerParameters(
7676
command="uvx",
77-
args=["openai-websearch-mcp"],
77+
# mcp 1.13.1, pinned by openai-websearch-mcp, imports a pydantic internal that 2.14 removed.
78+
args=["--with", "pydantic<2.14", "openai-websearch-mcp"],
7879
env={"OPENAI_API_KEY": os.environ.get("OPENAI_API_KEY", "")},
7980
),
8081
]

0 commit comments

Comments
 (0)