5.14.6
(fix): Improve SSE event parsing and deserialization performance by caching resolved type hints
and short-circuiting convert_and_respect_annotation_metadata when a type has no aliased
fields. Previously every call recomputed typing.get_type_hints and walked the entire type
graph, which was very expensive for streams parsing many events against large discriminated
unions. Output is unchanged.
5.14.5
(fix): Fix TypedDict alias generation when use_typeddict_requests: true so that
container element types (List[T], Dict[K, V], Set[T]) and direct aliases
(Alias = T) reach for the request-side TParams variant rather than the
Pydantic model T. Without this, request parameters typed as such aliases
rejected dict-literal values at type-check time even though the runtime accepted
them.
Note: list-typed alias bodies now resolve to typing.Sequence[…] instead of
typing.List[…] under use_typeddict_requests, consistent with how endpoint
parameters are already typed. Existing call sites that pass lists continue to
work.
5.14.4
(fix): Fix SSE union discrimination for both data-level and protocol-level contexts.
Data-level: Simplify parse_sse_obj to always parse the SSE data field as
JSON instead of using runtime heuristics. This fixes incorrect routing when the
discriminant field name (e.g., event) collides with an SSE envelope field.
Protocol-level: Generate an if/elif dispatch chain at code-generation time that
routes on _sse.event, parsing each variant’s data payload into its concrete
type. No runtime heuristic — the generator decides the code path statically.