Repository navigation
feat: add body property injection and non-blocking async retry support - #256
Open
fern-api[bot] wants to merge 4 commits into
Open
fern-api[bot] wants to merge 4 commits into
fern-api[bot] wants to merge 4 commits into
Conversation
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
|
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. |
…7780fce468c0c7a3 [skip ci]
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.RetryInterceptorasync retry andStream.fromSseWithEventDiscrimination()— non-blocking retry avoids consuming OkHttp dispatcher threads, and a new SSE factory supports event-variant unions wrapping the full SSE envelope.CreateOmopResponsenew fields —getQuantityTransformations(),getRowsForReview(),getSpecimenSourceContexts(), andgetMedicationDispenseSourceContexts()expose quantity audit trails, review-flagged rows, specimen provenance, and dispensing context respectively.SpecimenRow,MappingResolution(withMappingResolutionStatus,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(), andCreateMultiRequest.getSmallNote()— new optional fields across OMOP row, mapping, and request types.ExtractRequestConfigValidationMethod.SEMANTIC_MAPPING,BodyProperties, andPathSegments.validate()— new validation method constant, body-property merge utility, and path-parameter safety guard.Changed
@JsonAnySetterdeserialization guard — all agent, OMOP row, FHIR-provider, and lang2fhir builder types now route known field names through a private guard method instead of directly intoadditionalProperties, preventing double-storage during Jackson deserialization.DrugExposureRow,MappingEntry,MeasurementRow,ObservationRow,ObservationPeriodRow,ProcedureOccurrenceRow,ProviderRow,ReferenceDiagnostic, andCreateRequestreceived updated documentation describing expanded timing rules, NPI extraction logic, outcome semantics, and built-in PhenoML HPO profiles.Fixed
@JsonAnySetterguard on agent builder types — known fields such asmessage,session_id, andtypeare no longer accidentally routed intoadditionalPropertiesduring deserialization ofAgentChatRequest,AgentStreamChatRequest,AgentChatResponse,AgentChatStreamEvent, and related types.See full changelog