AnthropicConfig

org.llm4s.llmconnect.config.AnthropicConfig
See theAnthropicConfig companion object
case class AnthropicConfig(apiKey: String, model: String, baseUrl: String, contextWindow: Int, reserveCompletion: Int) extends ProviderConfig

Configuration for the Anthropic Claude API.

Prefer AnthropicConfig.fromValues over the primary constructor; it resolves contextWindow and reserveCompletion automatically from the model name.

Value parameters

apiKey

Anthropic API key; redacted in toString.

baseUrl

API base URL, defaulting to "https://api.anthropic.com".

contextWindow

Model's total token capacity (prompt + completion combined).

model

Model identifier, e.g. "claude-sonnet-4-5-latest".

reserveCompletion

Tokens held back from prompt history for the completion.

Attributes

Companion
object
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product