The shape of a provider's llm4s.providers.<name> section: which fields it requires, and what to tell the user when one is missing.
This replaces the per-provider NamedProviderValidator implementations that llm4s-core used to hold, one object per provider in a shared file. A provider now declares its own requirements, and a single generic validator turns that declaration into the same error messages as before.
== Why defaults live here rather than in HOCON == Chat-provider config is keyed by the user's ''instance'' name (llm4s.providers.my-openai.baseUrl), so a reference.conf fragment shipped by a provider module cannot express "the default baseUrl for anything whose provider = "openai"" — it does not know the instance name. defaultBaseUrl is therefore code, and is the single source for a provider's default endpoint.
Value parameters
- baseUrlExample
-
example shown when a required
baseUrlis missing. - defaultBaseUrl
-
base URL used when the section omits one.
- endpointDescription
-
what this provider means by
endpoint, shown when a required one is missing. Providers repurpose the field (Azure: deployment name; Vertex AI: GCP project id). - requiresApiKey
-
the section must carry a non-empty
apiKey. - requiresBaseUrl
-
the section must carry a non-empty
baseUrl; set this only when there is nodefaultBaseUrl. - requiresEndpoint
-
the section must carry a non-empty
endpoint.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any