Commit 5b7f664
fix(mcp): resolve streamable-http client by new name, fall back to old
The mcp SDK renamed `streamablehttp_client` → `streamable_http_client` and
@deprecated the old name (a DeprecationWarning surfaced in the test suite). The new
name is NOT signature-compatible and did not exist across the whole `mcp>=1.0` floor,
so a hard switch would ImportError on older mcp. Resolve the transport factory by the
new name when present and fall back to the old — both accept a bare url and yield the
same (read, write, get_session_id) transport, so the call site is unchanged. Silences
the deprecation on current SDKs while keeping the >=1.0 floor working.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent b610578 commit 5b7f664
1 file changed
Lines changed: 8 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
131 | | - | |
132 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
133 | 138 | | |
134 | 139 | | |
135 | 140 | | |
| |||
0 commit comments