Skip to content

feat: add body property injection and non-blocking async retry support - #256

Open
fern-api[bot] wants to merge 4 commits into
mainfrom
fern-bot/2026-10-27_14-26-46_910
Open

fern-api[bot] wants to merge 4 commits into
mainfrom
fern-bot/2026-10-27_14-26-46_910

Conversation

@fern-api

@fern-api fern-api Bot commented Oct 27, 2026

Copy link
Copy Markdown
Contributor

18.1.0 → 18.2.0

Added

  • RequestOptions.Builder.addBodyProperty() / .bodyProperties() — inject extra key/value pairs into JSON or form-urlencoded request bodies without subclassing a request type.
  • RetryInterceptor async retry and Stream.fromSseWithEventDiscrimination() — non-blocking retry avoids consuming OkHttp dispatcher threads, and a new SSE factory supports event-variant unions wrapping the full SSE envelope.
  • CreateOmopResponse new fields — getQuantityTransformations(), getRowsForReview(), getSpecimenSourceContexts(), and getMedicationDispenseSourceContexts() expose quantity audit trails, review-flagged rows, specimen provenance, and dispensing context respectively.
  • New FHIR-to-OMOP response types — SpecimenRow, MappingResolution (with MappingResolutionStatus, MappingResolutionReasonCode, MappingResolutionVia), QuantityTransformation (with outcome/policy/reason enums), MedicationDispenseSourceContext, RowForReview, SemanticMappingResult, SpecimenCollectionTiming, QuantityStrength, QuantityUnit, MappingPath, and related supporting types.
  • OmopTables.getSpecimen(), MeasurementRow.getUnitSourceConceptId(), VisitOccurrenceRow.getVisitSourceConceptId(), DrugExposureRow.getQuantity(), MappingEntry.getResolution(), Summary.getRowsForReview(), and CreateMultiRequest.getSmallNote() — new optional fields across OMOP row, mapping, and request types.
  • ExtractRequestConfigValidationMethod.SEMANTIC_MAPPING, BodyProperties, and PathSegments.validate() — new validation method constant, body-property merge utility, and path-parameter safety guard.

Changed

  • @JsonAnySetter deserialization guard — all agent, OMOP row, FHIR-provider, and lang2fhir builder types now route known field names through a private guard method instead of directly into additionalProperties, preventing double-storage during Jackson deserialization.
  • Javadoc expansions — DrugExposureRow, MappingEntry, MeasurementRow, ObservationRow, ObservationPeriodRow, ProcedureOccurrenceRow, ProviderRow, ReferenceDiagnostic, and CreateRequest received updated documentation describing expanded timing rules, NPI extraction logic, outcome semantics, and built-in PhenoML HPO profiles.

Fixed

  • @JsonAnySetter guard on agent builder types — known fields such as message, session_id, and type are no longer accidentally routed into additionalProperties during deserialization of AgentChatRequest, AgentStreamChatRequest, AgentChatResponse, AgentChatStreamEvent, and related types.

See full changelog

fern-api Bot added 3 commits October 27, 2026 14:26
Generated by Fern
CLI Version: unknown
Generators:
  - fernapi/fern-java-sdk: 4.32.4
… async retry support

Introduce two new capabilities to the SDK core and fix deserialization
correctness across all agent request/response types.

`RequestOptions` now supports injecting arbitrary key/value pairs into
the JSON or form-urlencoded request body via `addBodyProperty()` and
`bodyProperties()` builder methods, enabling callers to pass extra
fields without subclassing request types.

`RetryInterceptor` gains a new `newAsyncCall()` factory that schedules
retry backoff on a dedicated daemon thread instead of sleeping inside
an OkHttp dispatcher slot, so retrying calls no longer block one of the
5-per-host dispatcher threads and cancellation takes effect immediately.

`Stream` adds `fromSseWithEventDiscrimination()` to support SSE streams
where some event variants model the full SSE envelope rather than just
the data payload.

All agent request and response builder classes now guard `@JsonAnySetter`
so that known field names are never accidentally routed into
`additionalProperties` during JSON deserialization.

Key changes:
- `RequestOptions.Builder.addBodyProperty(String, Object)` and `bodyProperties(Map)` — inject extra body fields per-request
- `RetryInterceptor.newAsyncCall(OkHttpClient, Request)` — non-blocking async retry that frees dispatcher threads during backoff
- `Stream.fromSseWithEventDiscrimination(...)` — SSE stream factory with envelope-aware event discrimination
- Fixed `@JsonAnySetter` guard on all agent builder types to prevent known fields from leaking into `additionalProperties`

🌿 Generated with Fern
@cursor

cursor Bot commented Oct 27, 2026

Copy link
Copy Markdown

This PR is too large for Bugbot to review. It changes 46,419 lines and 3,794,240 characters. Split the change into smaller pull requests to get a review.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants