Skip to content

Naming things: streamable-http vs. http #267

@amotl

Description

@amotl

Hi there,

thanks a stack for conceiving this excellent adapter. We made a demo using it over here.

As we just started using it, we observed it does not accept transport=http yet. http seems to be the designated new label which was introduced as streamable-http beforehand.

if transport == "sse":
if "url" not in params:
msg = "'url' parameter is required for SSE connection"
raise ValueError(msg)
async with _create_sse_session(**params) as session:
yield session
elif transport == "streamable_http":
if "url" not in params:
msg = "'url' parameter is required for Streamable HTTP connection"
raise ValueError(msg)
async with _create_streamable_http_session(**params) as session:
yield session
elif transport == "stdio":
if "command" not in params:
msg = "'command' parameter is required for stdio connection"
raise ValueError(msg)
if "args" not in params:
msg = "'args' parameter is required for stdio connection"
raise ValueError(msg)
async with _create_stdio_session(**params) as session:
yield session
elif transport == "websocket":
if "url" not in params:
msg = "'url' parameter is required for Websocket connection"
raise ValueError(msg)
async with _create_websocket_session(**params) as session:
yield session
else:
msg = (
f"Unsupported transport: {transport}. "
f"Must be one of: 'stdio', 'sse', 'websocket', 'streamable_http'"
)
raise ValueError(msg)

In this spirit, do you think this one-line change for line 381 would be applicable?

elif transport in {"http", "streamable-http", "streamable_http"}: 

With kind regards,
Andreas.

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions