- All Known Implementing Classes:
FakeConfiguration,StandardNeutralConfiguration
public interface LlmClientConfiguration
Settings used to construct an
LlmClient for one provider: provider id, default model, and HTTP connect
timeout.-
Method Summary
Modifier and TypeMethodDescriptiondefault Optional<LlmSecretReference>The provider credential, carried as a reference so a raw value never travels through the wiring layer.default StringService base URL for HTTP providers (scheme + host, optional port), without trailing slash.HTTP connect timeout for outbound requests to this provider.Default model when a request does not setLlmExecutionRequest.model().default LlmProviderOptionsValidated, provider-specific options beyond the common settings above (seeLlmProviderOptions).Provider id for this configuration (must align with the matchingLlmClientFactory).default Optional<LlmRetryPolicy>default StringReturns the required base URL, for providers that need one.
-
Method Details
-
getProviderName
String getProviderName()Provider id for this configuration (must align with the matchingLlmClientFactory).- Returns:
- non-blank provider id such as
"openai"or"ollama"
-
getDefaultModel
String getDefaultModel()Default model when a request does not setLlmExecutionRequest.model().- Returns:
- non-blank default model id for this provider
-
getConnectTimeout
Duration getConnectTimeout()HTTP connect timeout for outbound requests to this provider.- Returns:
- connect timeout duration
-
getRetryPolicy
-
getBaseUrl
Service base URL for HTTP providers (scheme + host, optional port), without trailing slash.Returns a nullable
Stringto match the existing provider configurations that already declareString getBaseUrl();nullmeans the provider has a fixed endpoint or none applies.- Returns:
- the base URL, or
nullwhen not applicable
-
getApiKeyReference
The provider credential, carried as a reference so a raw value never travels through the wiring layer. A factory resolves it viaLlmClientFactoryContext.secretResolver().- Returns:
- the credential reference, or empty for providers that need none
-
getOptions
Validated, provider-specific options beyond the common settings above (seeLlmProviderOptions).- Returns:
- the provider options; never
null(empty when none)
-
requireBaseUrl
Returns the required base URL, for providers that need one.- Returns:
- the non-blank base URL
- Throws:
LlmProviderConfigurationException- if no base URL is configured (secret-safe message naming the provider)
-