ProviderModelTypes
Type-safe identifier types for the multi-provider configuration system.
Each identifier is an opaque type over String, giving distinct compile-time types to values that are otherwise interchangeable raw strings. This makes it a compile error to pass, for example, an ApiKey where a ModelName is expected, at zero runtime cost.
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProviderModelTypes.type
Members list
Type members
Classlikes
Companion for the ProviderId opaque type.
Companion for the ProviderId opaque type.
The asString extension lives here rather than alongside the other as* extensions above because every newtype in this object erases to String: a second asString at that level would be a double definition after erasure. Companion-scoped extensions are found through the opaque type's implicit scope, so id.asString resolves without an extra import.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProviderId.type
Companion for the ProviderName opaque type.
Companion for the ProviderName opaque type.
Attributes
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
ProviderName.type
Types
A secret key used to authenticate with a provider.
A secret key used to authenticate with a provider.
Attributes
The base URL of a provider's API endpoint, e.g. "https://api.openai.com/v1".
The base URL of a provider's API endpoint, e.g. "https://api.openai.com/v1".
Attributes
A model identifier, e.g. "gpt-4o" or "claude-sonnet-4-5".
A model identifier, e.g. "gpt-4o" or "claude-sonnet-4-5".
Attributes
The canonical identifier of an LLM provider implementation, e.g. "openai".
The canonical identifier of an LLM provider implementation, e.g. "openai".
This is an open vocabulary, not an enumeration: any string names a provider, and whether that provider can actually be resolved is decided at resolution time, not at parse time. That is what allows a provider to be supplied by a module llm4s-core has never heard of — see #1131.
Values are canonicalised on construction to trimmed lowercase, so ProviderId(" OpenAI ") and ProviderId("openai") are equal and share a single spelling in error messages and config.
Attributes
A provider identifier, e.g. "openai" or "anthropic".
A provider identifier, e.g. "openai" or "anthropic".
Attributes
Extensions
Extensions
Returns the underlying model name string.
Returns the underlying model name string.
Attributes
Returns the underlying base URL string.
Returns the underlying base URL string.
Attributes
Returns the underlying key string.
Returns the underlying key string.
Attributes
Returns the underlying provider name string.
Returns the underlying provider name string.