You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(gateway): Correct validation for STREAMABLEHTTP transport (#662)
When registering a gateway with transport: "STREAMABLEHTTP", the registration fails with a 502 Bad Gateway error. The underlying tool server logs show it rejects the connection attempt with a 406 Not Acceptable status.
This occurs because the gateway's validation logic in `_validate_gateway_url` sends a GET request to the tool server's endpoint to check for liveness. However, the `streamable-http` protocol specification requires an initial POST request to establish a session. The tool server correctly rejects the unexpected GET request.
This commit resolves the issue by bypassing the incorrect GET-based validation for the STREAMABLEHTTP transport. Instead, it proceeds directly to establishing a connection using the `streamablehttp_client`, which correctly performs the POST handshake. The existing `try...except` block in `_initialize_gateway` is sufficient to handle any genuine connection failures.
Signed-off-by: Jimmy Liao <[email protected]>
0 commit comments