Skip to content

switch PythonTool from stdio to persistent HTTP server#1228

Draft
gwarmstrong wants to merge 3 commits intomainfrom
georgea/python-tool-http-server
Draft

switch PythonTool from stdio to persistent HTTP server#1228
gwarmstrong wants to merge 3 commits intomainfrom
georgea/python-tool-http-server

Conversation

@gwarmstrong
Copy link
Copy Markdown
Collaborator

No description provided.

Signed-off-by: George Armstrong <georgea@nvidia.com>
@gwarmstrong gwarmstrong force-pushed the georgea/python-tool-http-server branch from 8845c41 to cfe2fd5 Compare March 12, 2026 23:41
…Error ref

The hydra init_hook assumes MCPStdioClient (accesses client.server_params)
but PythonTool now uses MCPStreamableHttpClient which doesn't have that
attribute. The sandbox config is already handled in post_configure() which
spawns the HTTP server subprocess with --config flag.

Also fix bare RemoteProtocolError reference (should be httpx.RemoteProtocolError).

Signed-off-by: George Armstrong <georgea@nvidia.com>
Rename DirectPythonTool (direct sandbox calls) to PythonTool since it is
the simpler, more reliable default for generation. The MCP subprocess
variant is now MCPPythonTool (for Gym/RL resource server use).
DirectPythonTool kept as backward-compatible alias.

Signed-off-by: George Armstrong <georgea@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant