Record Class StandardNeutralConfiguration

java.lang.Object
java.lang.Record
com.agentforge4j.llm.StandardNeutralConfiguration
Record Components:
providerId - the provider id this configuration is for (see getProviderName()); must not be blank
defaultModel - the default model id, or null when the provider has none
connectTimeout - the HTTP connect timeout; must not be null
baseUrl - the service base URL, or null for providers with no HTTP base URL (for example Bedrock, reached through the AWS SDK rather than a base URL)
apiKeyReference - the credential reference, or null for providers that need none
options - the canonical dotted provider-option map (see NeutralOptions.toMap()); must not be null (empty when the provider has no extra options)
All Implemented Interfaces:
LlmClientConfiguration

public record StandardNeutralConfiguration(String providerId, String defaultModel, Duration connectTimeout, String baseUrl, LlmSecretReference apiKeyReference, Map<String,String> options) extends Record implements LlmClientConfiguration
Standard LlmClientConfiguration shape shared by every provider's LlmClientConfigurationAdapter. Across providers the only variation is which entries land in options (see NeutralOptions) and whether an API-key reference exists at all — self-hosted / credential-less providers (for example Ollama, vLLM, Bedrock) pass null. Every other component has the same shape everywhere, so adapters construct this record instead of each hand-writing its own private LlmClientConfiguration implementation.
  • Constructor Details

  • Method Details

    • getProviderName

      public String getProviderName()
      Description copied from interface: LlmClientConfiguration
      Provider id for this configuration (must align with the matching LlmClientFactory).
      Specified by:
      getProviderName in interface LlmClientConfiguration
      Returns:
      non-blank provider id such as "openai" or "ollama"
    • getDefaultModel

      public String getDefaultModel()
      Description copied from interface: LlmClientConfiguration
      Default model when a request does not set LlmExecutionRequest.model().
      Specified by:
      getDefaultModel in interface LlmClientConfiguration
      Returns:
      non-blank default model id for this provider
    • getConnectTimeout

      public Duration getConnectTimeout()
      Description copied from interface: LlmClientConfiguration
      HTTP connect timeout for outbound requests to this provider.
      Specified by:
      getConnectTimeout in interface LlmClientConfiguration
      Returns:
      connect timeout duration
    • getBaseUrl

      public String getBaseUrl()
      Description copied from interface: LlmClientConfiguration
      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.

      Specified by:
      getBaseUrl in interface LlmClientConfiguration
      Returns:
      the base URL, or null when not applicable
    • getApiKeyReference

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

      public LlmProviderOptions getOptions()
      Description copied from interface: LlmClientConfiguration
      Validated, provider-specific options beyond the common settings above (see LlmProviderOptions).
      Specified by:
      getOptions in interface LlmClientConfiguration
      Returns:
      the provider options; never null (empty when none)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • providerId

      public String providerId()
      Returns the value of the providerId record component.
      Returns:
      the value of the providerId record component
    • defaultModel

      public String defaultModel()
      Returns the value of the defaultModel record component.
      Returns:
      the value of the defaultModel record component
    • connectTimeout

      public Duration connectTimeout()
      Returns the value of the connectTimeout record component.
      Returns:
      the value of the connectTimeout record component
    • baseUrl

      public String baseUrl()
      Returns the value of the baseUrl record component.
      Returns:
      the value of the baseUrl record component
    • apiKeyReference

      public LlmSecretReference apiKeyReference()
      Returns the value of the apiKeyReference record component.
      Returns:
      the value of the apiKeyReference record component
    • options

      public Map<String,String> options()
      Returns the value of the options record component.
      Returns:
      the value of the options record component