Package com.tnsai.integration.scop
Class LLMOverrides.Builder
java.lang.Object
com.tnsai.integration.scop.LLMOverrides.Builder
- Enclosing class:
LLMOverrides
Names each field instead of relying on the positional record constructor.
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the overlay.maxTokens(int maxTokens) temperature(double temperature)
-
Method Details
-
provider
- Parameters:
provider- provider name, e.g.OPENAI; matched case-insensitively againstLLMSpec.Providerand stored upper-cased- Throws:
LLMConfigurationException- if it names no known provider. An overlay may name only what an annotation could have named: the provider selects the transport, and an unknown string would silently choose one rather than fail.
-
model
- Parameters:
model- model identifier, e.g.gpt-4o-mini- Throws:
LLMConfigurationException- if blank. Blank is not "unset": it would win the merge and then read as absent downstream, which formodelmeans the resolution fails while blaming the annotations.
-
temperature
- Parameters:
temperature- sampling temperature;0.0is a legitimate value- Throws:
LLMConfigurationException- if it is negative or not finite.1e400parses toInfinityrather than failing, and would only surface later as an unserialisable request body.
-
maxTokens
- Parameters:
maxTokens- response token ceiling;0is a legitimate value meaning "let the provider decide" — the Core SPI path, the OpenAI-compatible request body and Gemini all omit the field for it. It does not mean that on the Anthropic HTTP path, which substitutes a fixed ceiling because the Anthropic API requires the field; see TAN-6204.- Throws:
LLMConfigurationException- if it is negative
-
endpoint
- Parameters:
endpoint- full chat-completions URL- Throws:
LLMConfigurationException- if blank. Blank is not "unset": it would win the merge and then read as absent downstream, which formodelmeans the resolution fails while blaming the annotations.
-
apiKeyEnv
- Parameters:
apiKeyEnv- name of the environment variable holding the API key- Throws:
LLMConfigurationException- if blank. Blank is not "unset": it would win the merge and then read as absent downstream, which formodelmeans the resolution fails while blaming the annotations.
-
build
Builds the overlay.
-