Skip to content

[pull] main from fern-api:main#756

Merged
pull[bot] merged 5 commits into
code:mainfrom
fern-api:main
May 28, 2026
Merged

[pull] main from fern-api:main#756
pull[bot] merged 5 commits into
code:mainfrom
fern-api:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented May 28, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

dsinghvi and others added 5 commits May 27, 2026 23:41
…level contexts (#14154)

* fix(python): simplify parse_sse_obj to always use data-level discrimination

Remove runtime heuristics that tried to detect data-vs-event discrimination
at runtime. When the discriminant field name collided with an SSE envelope
field (e.g., 'event'), the heuristic incorrectly routed to the event-level
path. Now parse_sse_obj always parses sse.data as JSON and lets Pydantic
handle the discriminator.

Protocol-level discrimination will be handled at code-generation time in a
follow-up PR.

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>

* fix: remove unused imports flagged by ruff in pydantic v1 variant

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>

* feat(python): add protocol-level SSE discrimination at code-generation time

For unions with discriminator_context == 'protocol', the generator now
emits an if/elif chain that dispatches on _sse.event and parses each
variant's data payload into its concrete type via parse_obj_as.

Data-level discrimination (the default) continues to use parse_sse_obj.

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>

* fix: use NamedType instead of DeclaredTypeName for TypeReference.factory.named()

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>

* fix(python): use get_wire_value helper for protocol SSE discriminant

The merge with main introduced a new helper get_wire_value(name_or_str) since
discriminant_value is now Union[str, NameAndWireValue]. Update the protocol
discriminator extraction to go through this helper.

Also regenerate Python SDK seed fixtures missed by earlier regeneration.

Co-Authored-By: Deep Singhvi <deep@buildwithfern.com>

* chore: regenerate SSE seed fixtures after merge

Co-Authored-By: ryanstep <ryanstep@umich.edu>

---------

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: ryanstep <ryanstep@umich.edu>
Co-authored-by: Fern Support <126544928+fern-support@users.noreply.github.com>
…ile (#16124)

The merged PR #14154 incorrectly added a manual versions.yml entry for 5.0.9.
This removes that entry and adds a proper unreleased changelog file that the
automated release pipeline will pick up.

Co-authored-by: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-authored-by: Ryan-Amirthan <105958906+Ryan-Amirthan@users.noreply.github.com>
Co-authored-by: dsinghvi <10870189+dsinghvi@users.noreply.github.com>
@pull pull Bot locked and limited conversation to collaborators May 28, 2026
@pull pull Bot added the ⤵️ pull label May 28, 2026
@pull pull Bot merged commit a94068b into code:main May 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants