ProviderId

org.llm4s.types.ProviderModelTypes.ProviderId
object ProviderId

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

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
ProviderId.type

Members list

Value members

Concrete methods

def apply(raw: String): ProviderId

Canonicalises a raw provider string to a ProviderId (trimmed, lowercased).

Canonicalises a raw provider string to a ProviderId (trimmed, lowercased).

The fold is Locale.ROOT, not the default locale: under a Turkish or Azerbaijani default, "OpenAI".toLowerCase yields openaı (dotless i), which would break canonical equality against the registered openai in exactly those environments and nowhere else.

Attributes

Extensions

Extensions

extension (id: ProviderId)
def asString: String

Returns the canonical provider identifier string, e.g. "openai".

Returns the canonical provider identifier string, e.g. "openai".

Attributes