Skip to content

Commit fc5dc40

Browse files
committed
Fail if user provides mcp servers
1 parent 8b727e5 commit fc5dc40

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

temporalio/contrib/openai_agents/_openai_runner.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ async def run(
5151
"Provided tool is not a tool type. If using an activity, make sure to wrap it with openai_agents.workflow.activity_as_tool."
5252
)
5353

54+
if len(starting_agent.mcp_servers) > 0:
55+
raise ValueError(
56+
"Temporal OpenAI agent does not support on demand MCP servers."
57+
)
58+
5459
context = kwargs.get("context")
5560
max_turns = kwargs.get("max_turns", DEFAULT_MAX_TURNS)
5661
hooks = kwargs.get("hooks")

0 commit comments

Comments
 (0)