TypeSafeModelFactory

@ApiStatus.Experimental
open class TypeSafeModelFactory

Builds Embabel decision services backed by TypeSafe models.

Provider settings and credentials belong to the factory; build selects a model. Each returned service also implements classification because DecisionService extends the narrower classification contract. The native SDK client remains an implementation detail, so callers retain provider-neutral requests, results, metadata and observability.

buildValidated follows the same BYOK contract as the OpenAI and Anthropic factories. Ordinary build calls remain local and do not resolve credentials or contact the provider.

Constructors

Link copied to clipboard
constructor(keySupplier: Supplier<String>)
Uses provider defaults, the fallback transport and a no-op observation registry.
constructor(keySupplier: Supplier<String>, defaultModel: String)
Uses the fallback transport with an explicit default model.
constructor(options: TypeSafeClientOptions, keySupplier: Supplier<String>)
Uses configured transport bounds with the default model and no-op observations.
constructor(options: TypeSafeClientOptions, keySupplier: Supplier<String>, observationRegistry: ObservationRegistry)
Uses configured transport bounds, the fallback transport and the default model, with the given observation registry.
constructor(options: TypeSafeClientOptions, keySupplier: Supplier<String>, restClientBuilder: Builder)
Uses an application HTTP builder with the default model and no-op logical observations.
constructor(options: TypeSafeClientOptions, keySupplier: Supplier<String>, restClientBuilder: Builder, observationRegistry: ObservationRegistry)
Configures the guarded provider boundary for the default model.
constructor(options: TypeSafeClientOptions, keySupplier: Supplier<String>, restClientBuilder: Builder, observationRegistry: ObservationRegistry, defaultModel: String)
Configures the guarded provider boundary shared by services built by this factory.

Properties

Link copied to clipboard
val DEFAULT_MODEL: String = "jev-latest"
TypeSafe's default Jev model alias.
Link copied to clipboard
val PROVIDER: String = "TypeSafe"
Provider name reported by every service and result produced by this factory.

Functions

Link copied to clipboard
Builds a decision service using this factory's default model.
Builds a decision service for one model identifier or alias.
Link copied to clipboard
Validates the current credential against the provider and returns the default model service.