Upgrade to protocol version 2024-10-07 - #19
Merged
Conversation
jspahrsummers
commented
Oct 21, 2024
| """Parameters for the initialize request.""" | ||
|
|
||
| protocolVersion: Literal[1] | ||
| protocolVersion: str | int |
Member
Author
There was a problem hiding this comment.
Lenient version parsing for now.
jspahrsummers
commented
Oct 21, 2024
| """After receiving an initialize request from the client, the server sends this.""" | ||
|
|
||
| protocolVersion: Literal[1] | ||
| protocolVersion: str | int |
Member
Author
There was a problem hiding this comment.
Lenient version parsing for now.
dsp-ant
approved these changes
Oct 21, 2024
ksteiny
pushed a commit
to ksteiny/python-sdk
that referenced
this pull request
Dec 5, 2025
feat(tools): add place_option_combo_order for multileg orders
MrSampson
added a commit
to MrSampson/python-sdk
that referenced
this pull request
Aug 19, 2026
…ion (#1) * fix: return a self-describing 404 for an unknown streamable-http session StreamableHTTPSessionManager answered a request for a missing or credential-mismatched session with a bare "Session not found" -- the same misleading-error problem modelcontextprotocol#19/modelcontextprotocol#26 already fixed for SseServerTransport's equivalent case (a redeploy or expiry invalidating every connected client's session_id at once), just not ported to this transport. Both call sites now share one message via _session_not_found_response(), built once so the "unknown session" and "credential mismatch" cases (which must answer identically -- see the comment) can't drift apart. Verified: full suite 1140 passed / 0 regressions (95 skipped, 1 xfailed, 2 pre-existing collection errors for the unrelated optional `websockets` extra, not installed in this environment) plus ruff and pyright clean. * fix: address review -- comment direction, unvalidated input note, expire coverage - _session_not_found_response's comment said "callers below" / "check above" -- true when this sat inline in sse.py, backwards once hoisted to a module-level function above both call sites. Converted to a docstring, direction fixed. - session_id here is the raw, client-supplied mcp-session-id header, never validated against SESSION_ID_PATTERN (only IDs the server mints are) -- unlike sse.py's session_id.hex, which is already UUID-validated. Safe (JSON-escaped, application/json, truncated to 64 chars matching the file's existing convention) but the docstring now says so, rather than leaving it to be re-derived later. - Test now asserts "expire" is covered, not just "restart" -- the one genuinely new clause this message adds over the sse-side wording (this transport has a session_idle_timeout; sse doesn't), which was the one claim the prior substring checks didn't actually verify. --------- Co-authored-by: oliver <oliver.sampson@gitterdan.ai>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Necessary to use the Python SDK with the latest versions of the inspector and example servers.