Class LLMConfiguration

java.lang.Object
com.tnsai.integration.scop.LLMConfiguration

public class LLMConfiguration extends Object
Holds resolved LLM configuration (provider, model, temperature, endpoint, API key env var). Extracted from SCOPBridge to reduce class size and improve testability.

Environment lookups go through EnvLoader.get(String) — the canonical resolver used everywhere else in the framework — instead of raw System.getenv(). EnvLoader checks System properties before environment variables, so test overrides via -DKEY=value and .env file loading work uniformly with the rest of the codebase.

  • Constructor Details

    • LLMConfiguration

      public LLMConfiguration(String provider, String model, float temperature, int maxTokens, String endpoint, String apiKeyEnv)
  • Method Details

    • getProvider

      public String getProvider()
    • getModel

      public String getModel()
    • getTemperature

      public float getTemperature()
    • getMaxTokens

      public int getMaxTokens()
    • getEndpoint

      public String getEndpoint()
    • getApiKeyEnv

      public String getApiKeyEnv()
    • hasModel

      public boolean hasModel()
    • hasEndpoint

      public boolean hasEndpoint()
    • resolveApiUrl

      public String resolveApiUrl()
      Resolves the full API endpoint URL. Priority: 1. Custom endpoint from annotation 2. Base URL from environment variable + path 3. Default endpoint for provider
    • resolveApiKey

      public String resolveApiKey()
      Resolves the API key from environment variables. Priority: 1. Custom apiKeyEnv from annotation 2. Default env var for provider
    • isOpenAICompatible

      public boolean isOpenAICompatible()
      Checks if this provider uses OpenAI-compatible API format.
    • requiresApiKey

      public boolean requiresApiKey()
      Checks if this provider requires an API key.
    • getBaseUrlEnvVar

      public String getBaseUrlEnvVar()
      Gets the base URL environment variable name for this provider.
    • getApiKeyEnvVar

      public String getApiKeyEnvVar()
      Gets the API key environment variable name for this provider.
    • toString

      public String toString()
      Overrides:
      toString in class Object