Skip to content

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

Open
fern-api[bot] wants to merge 4 commits into
mainfrom
fern-bot/2026-10-28_16-03-57_235
Open

fern-api[bot] wants to merge 4 commits into
mainfrom
fern-bot/2026-10-28_16-03-57_235

Conversation

@fern-api

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

Copy link
Copy Markdown
Contributor

18.1.0 → 18.2.0

Added

  • RequestOptions.Builder.addBodyProperty / bodyProperties — inject arbitrary key/value pairs into JSON or form-urlencoded request bodies at call time, overriding matching fields already present.
  • RetryInterceptor async retry support — new newAsyncCall factory schedules retry backoff on a background daemon thread, preventing retrying requests from consuming OkHttp dispatcher slots.
  • OMOP response fields — CreateOmopResponse gains getQuantityTransformations(), getRowsForReview(), getDeviceExposureContexts(), getSpecimenSourceContexts(), and getMedicationDispenseSourceContexts(); OmopTables gains getDeviceExposure() and getSpecimen(); DrugExposureRow gains getQuantity(); MeasurementRow gains getUnitSourceConceptId(); VisitOccurrenceRow gains getVisitSourceConceptId(); Summary gains getRowsForReview().
  • New OMOP/mapping types — adds DeviceExposureRow, DeviceExposureContext, SpecimenRow, MappingResolution, MappingPath, AllergyMappingResolution, QuantityTransformation, QuantityEvidence, MedicationDispenseSourceContext, and related enum types covering device exposure, allergy resolution, quantity derivation, and vocabulary mapping outcomes.
  • CreateMultiRequest.getSmallNote() — new optional boolean field that bills the request at the lower small-note rate when true (text must be ≤ 15,360 bytes UTF-8).
  • ExtractRequestConfigValidationMethod.SEMANTIC_MAPPING — new validation method constant with a corresponding visitSemanticMapping() visitor method.
  • Stream.fromSseWithEventDiscrimination — new SSE stream factory supporting mixed-discrimination streams where selected event types model the full SSE envelope.
  • See full changelog for all changes

Changed

  • MappingEntry — gains getResolution() returning structured MappingResolution metadata; Javadoc for getMappingStatus(), getOmopField(), getSelected(), and getNote() updated to describe expanded UNMAPPED semantics.
  • Date field documentation — Javadoc for timing fields on MeasurementRow, ObservationRow, ObservationPeriodRow, and ProcedureOccurrenceRow now describes multi-resource timing rules and Specimen/Death row inclusion.
  • ProviderRow.getNpi() and ReferenceDiagnostic outcome fields — Javadoc updated to document NPI extraction/deduplication rules and all four ReferenceDiagnostic outcome values.

Fixed

  • @JsonAnySetter / additionalProperties across all builder types — a private putAdditionalPropertyFromJson guard now prevents known JSON fields from being double-captured into additionalProperties during deserialization.

See full changelog

fern-api Bot added 3 commits October 28, 2026 16:04
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 consume one of
the five per-host dispatcher connections while waiting. Cancellation
during a backoff wait is also now immediate.

`Stream.fromSseWithEventDiscrimination()` is added to support SSE
streams where certain event types model the full SSE envelope rather
than just the data payload.

All agent builder classes now use a private `@JsonAnySetter` method
that skips known field names, preventing known properties from being
double-written into `additionalProperties` during JSON deserialization.

Key changes:
- `RequestOptions.Builder.addBodyProperty()` and `.bodyProperties()` — inject extra fields into any request body
- `RetryInterceptor.newAsyncCall()` and `AsyncCall` interface — non-blocking async retry that frees dispatcher threads during backoff
- `Stream.fromSseWithEventDiscrimination()` — SSE stream factory with envelope-aware event discrimination
- Fixed `@JsonAnySetter` on all agent builder types to skip known fields during deserialization

🌿 Generated with Fern
@cursor

cursor Bot commented Oct 28, 2026

Copy link
Copy Markdown

This PR is too large for Bugbot to review. It changes 48,715 lines and 3,908,620 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