Skip to content

Commit da6616a

Browse files
authored
Fail if user provides mcp servers (#990)
* Fail if user provides mcp servers * Update _openai_runner.py
1 parent 79f2900 commit da6616a

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 starting_agent.mcp_servers:
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)