OpenRouterClient

org.llm4s.llmconnect.provider.OpenRouterClient
See theOpenRouterClient companion class

Attributes

Companion
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

Constructs an OpenRouterClient, wrapping any construction-time exception in a Left.

Constructs an OpenRouterClient, wrapping any construction-time exception in a Left.

Value parameters

config

OpenAIConfig with the OpenRouter API key, model, and a baseUrl that contains "openrouter.ai".

metrics

Receives per-call latency and token-usage events. Defaults to MetricsCollector.noop.

Attributes

Returns

Right(client) on success; Left(LLMError) if construction fails.