> This page is for SDKs, version Legacy.
> For other versions, use one of these documentation indexes:
> - Current (default): https://buildwithfern.com/learn/sdks/current/llms.txt
> - Legacy: https://buildwithfern.com/learn/sdks/legacy/llms.txt

> For clean Markdown content of this page, append .md to this URL. For the complete documentation index, see https://buildwithfern.com/learn/llms.txt. For task-scoped instructions for coding agents working in a Fern project, see https://buildwithfern.com/learn/home/fern-instructions.md.

## 5.41.11

**`(fix):`** Fix recursive aliases and undiscriminated unions under `pydantic_config.version: v2` without
`wrapped_aliases`. A plain alias that refers back to itself (e.g. `JsonLike = Union[List["JsonLike"], ...]`,
or a map whose values are a union containing that map) was expanded endlessly by Pydantic, so building
the model raised `RecursionError` or `... is not fully defined`. Such an alias is now a
`typing_extensions.TypeAliasType` at runtime, which Pydantic v2 resolves lazily, and stays a plain alias
under `TYPE_CHECKING` for mypy and pyright. Values come back as plain dicts and lists, with no root
model to unwrap. Other aliases, and SDKs on Pydantic v1, `both` or `wrapped_aliases`, are unchanged.