qwen-code/packages/sdk-python/tests
chinesepowered 5176ed0fa3
fix(sdk-python): require canonical form in validate_session_id (#7532)
uuid.UUID() accepts several non-canonical spellings — braced
{...}, urn:uuid:..., and dash-less hex — so validate_session_id let them
through after the RFC 4122 variant check. The value is then forwarded to
the CLI verbatim as --session-id/--resume, producing a malformed session
id downstream rather than a clear error at the SDK boundary.

Reject anything whose canonical form differs from the input. Case is
deliberately not part of the comparison: UUID() lowercases, and an
all-uppercase spelling is still valid canonical input.

Co-authored-by: Shaojin Wen <shaojin.wensj@alibaba-inc.com>
2026-07-23 06:26:32 +00:00
..
integration feat(SDK) Add Python SDK implementation for #3010 (#3494) 2026-04-25 07:02:58 +08:00
unit fix(sdk-python): require canonical form in validate_session_id (#7532) 2026-07-23 06:26:32 +00:00