Conversation
jimador
marked this pull request as ready for review
September 24, 2026 19:49
igordayen
reviewed
Sep 24, 2026
igordayen
approved these changes
Sep 25, 2026
|
|
||
| /** Internal boundary: unsafe transport failures never reach SDK retry diagnostics. */ | ||
| @Internal | ||
| public final class GuardedTypeSafeApi extends TypeSafeApi { |
Contributor
There was a problem hiding this comment.
please consider splitting the artifact into a public part and a supporting helper with private functions
jimador
marked this pull request as draft
September 25, 2026 03:08
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
…acts Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
…stry Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
Signed-off-by: James Dunnam <7660553+jimador@users.noreply.github.com>
jimador
force-pushed
the
feature/jev-primitives
branch
from
September 25, 2026 18:33
725cfd6 to
17ba1e4
Compare
jimador
changed the base branch from
main
to
feature/classification-contracts
September 25, 2026 18:34
jimador
marked this pull request as ready for review
September 25, 2026 18:34
jimador
added this pull request to stack #2067
September 25, 2026 18:45
Contributor
|
Please review SonarCube violations, thanks |
jimador
removed this pull request from stack #2067
September 27, 2026 22:10
jimador
added this pull request to stack #2081
September 27, 2026 22:11
jimador
force-pushed
the
feature/jev-primitives
branch
from
September 28, 2026 05:19
d17ae2d to
86210a1
Compare
|
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.



New implementation of TypeSafe decision services on top of the classification and decision contracts in #2062. TypeSafe is the provider, Jev is the default model, and the public boundary is
DecisionServicerather than a native SDK client or anLlmService.The integration follows the same factory shape as the OpenAI and Anthropic providers.
TypeSafeModelsConfigextendsTypeSafeModelFactory, andTypeSafeModelFactoryimplementsByokFactory<DecisionService>.build()returns the configured default model,build(model)creates another independently identified TypeSafe decision service, andbuildValidated()verifies the current credential before returning the default service. This gives applications the normal Embabel BYOK and multiple-model patterns without pretending that a decision model is a chat model.classDiagram ModelMetadata <|-- ClassificationService ClassificationService <|-- DecisionService ByokFactory~DecisionService~ <|.. TypeSafeModelFactory TypeSafeModelFactory <|-- TypeSafeModelsConfig TypeSafeModelFactory --> DecisionService : build(model) DecisionService <|.. TypeSafeDecisionService TypeSafeDecisionService --> TypeSafeClient : internal boundaryflowchart LR Workflow[Embabel workflow] --> Contract[DecisionService] Contract --> FrameworkObservation[ObservedDecisionService] FrameworkObservation --> Adapter[TypeSafeDecisionService] Adapter --> SDK[TypeSafe SDK client] SDK --> Guard[Guarded TypeSafe API] Guard --> HTTP[Spring RestClient] HTTP --> Provider[TypeSafe / Jev]The implementation keeps four boundaries explicit:
DecisionServiceandClassificationServiceown provider-neutral requests, results, metadata, provenance, and framework observability.TypeSafeDecisionServicemaps closed-category choices and proposition assessments without adding application policy. It never invents a no-match result or an acceptance threshold.TypeSafeModelFactoryowns the provider settings, credential source, shared guarded transport, model selection, and BYOK validation contract.typeSafeDecisionService, backs off when that named service is replaced, and follows the existing model-provider package and configuration conventions.A factory can create any number of TypeSafe decision services by model name.
jev-latestremains the default, but the API does not hard-code Jev as the only model. Other decision providers can implement the same contracts without depending on TypeSafe or its SDK.Classification uses the request's closed category set and validates that the returned probability distribution has the same support and sums to one. Proposition assessment preserves Jev's probability as
pTrue, with exactly0.5represented as inconclusive. Successful results preserve the resolved model, provider, and request ID. Provider availability failures and invalid successful responses remain distinct, cancellation propagates, and raw provider bodies, credentials, URLs, model names, and exception chains are kept out of logs and public failures.Observability is present at the framework, provider, and HTTP layers. The framework emits
embabel.ai.classificationorembabel.ai.decision; the guarded provider boundary emitsembabel.typesafe.request; and application-ownedRestClientinstrumentation can emithttp.client.requests. Tags and logs use bounded operation and outcome values. The implementation does not put prompts, category descriptions, propositions, responses, credentials, or raw exceptions into telemetry.The reference guide documents the architecture, Spring configuration, BYOK usage, multiple models, failure semantics, transport behavior, observability, and the path out of experimental status. The API is tagged experimental so integration feedback can still shape it, while the implementation, tests, and documentation are written for continued maintenance.
This stack incorporates Rod's design feedback on #2057 and is related to #2049, #2050, #2051, #2052, #2057, the earlier prototype in #2059, and the experimental proposal.
Validation completed locally before push:
mvn -U -B -Dmaven.gitcommitid.skip=true test verify— all 84 reactor modules passed