Interface LlmClientConfiguration

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 Details

    • getProviderName

      String getProviderName()
      Provider id for this configuration (must align with the matching LlmClientFactory).
      Returns:
      non-blank provider id such as "openai" or "ollama"
    • getDefaultModel

      String getDefaultModel()
      Default model when a request does not set LlmExecutionRequest.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

      default Optional<LlmRetryPolicy> getRetryPolicy()
    • getBaseUrl

      default String getBaseUrl()
      Service base URL for HTTP providers (scheme + host, optional port), without trailing slash.

      Returns a nullable String to match the existing provider configurations that already declare String getBaseUrl(); null means the provider has a fixed endpoint or none applies.

      Returns:
      the base URL, or null when not applicable
    • getApiKeyReference

      default Optional<LlmSecretReference> getApiKeyReference()
      The provider credential, carried as a reference so a raw value never travels through the wiring layer. A factory resolves it via LlmClientFactoryContext.secretResolver().
      Returns:
      the credential reference, or empty for providers that need none
    • getOptions

      default LlmProviderOptions getOptions()
      Validated, provider-specific options beyond the common settings above (see LlmProviderOptions).
      Returns:
      the provider options; never null (empty when none)
    • requireBaseUrl

      default String 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)