Credential

org.llm4s.llmconnect.provider.OpenAICompatibleClient.Credential
enum Credential

How a request authenticates.

Attributes

Source
OpenAICompatibleClient.scala
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

case Anonymous extends Credential

No Authorization header, for servers that need none.

No Authorization header, for servers that need none.

Attributes

Source
OpenAICompatibleClient.scala
final case class Dynamic(provider: AccessTokenProvider)

Authorization: Bearer <token>, the token fetched per request from provider and refreshed once on a 401. The caller owns provider. A token() that throws fails the request with an AuthenticationError naming the exception's class, and an invalidate that throws is ignored: neither escapes complete or streamComplete.

Authorization: Bearer <token>, the token fetched per request from provider and refreshed once on a 401. The caller owns provider. A token() that throws fails the request with an AuthenticationError naming the exception's class, and an invalidate that throws is ignored: neither escapes complete or streamComplete.

Attributes

Source
OpenAICompatibleClient.scala
final case class Exchange(config: TokenExchangeConfig)

Authorization: Bearer <token>, the token obtained by the RFC 8693 exchange config describes, cached until shortly before it expires and refreshed once on a 401. The exchange goes through the client's own HTTP client, closed with the client.

Authorization: Bearer <token>, the token obtained by the RFC 8693 exchange config describes, cached until shortly before it expires and refreshed once on a 401. The exchange goes through the client's own HTTP client, closed with the client.

Attributes

Source
OpenAICompatibleClient.scala
final case class Rotating(keys: ApiKeyProvider)

Authorization: Bearer <key>, the key asked of keys for each request, so a key rotated by a secret manager is sent without rebuilding the client (#2313). A current() that throws fails the request with an AuthenticationError naming the exception's class.

Authorization: Bearer <key>, the key asked of keys for each request, so a key rotated by a secret manager is sent without rebuilding the client (#2313). A current() that throws fails the request with an AuthenticationError naming the exception's class.

Attributes

Source
OpenAICompatibleClient.scala
final case class Static(key: Secret)

Authorization: Bearer <key>; key must not be blank - the client refuses an empty bearer.

Authorization: Bearer <key>; key must not be blank - the client refuses an empty bearer.

Attributes

Source
OpenAICompatibleClient.scala