Package-level declarations

Types

Link copied to clipboard
class OpenRouterClientSettings(baseUrl: String = "https://openrouter.ai", chatCompletionsPath: String = "api/v1/chat/completions", timeoutConfig: ConnectionTimeoutConfig = ConnectionTimeoutConfig()) : OpenAIBasedSettings

Configuration settings for connecting to the OpenRouter API.

Link copied to clipboard
class OpenRouterLLMClient(apiKey: String, settings: OpenRouterClientSettings = OpenRouterClientSettings(), baseClient: HttpClient = HttpClient(), clock: Clock = Clock.System) : AbstractOpenAILLMClient<OpenRouterChatCompletionResponse, OpenRouterChatCompletionStreamResponse>

Implementation of LLMClient for OpenRouter API. OpenRouter is an API that routes requests to multiple LLM providers.

Link copied to clipboard

OpenRouter models Models available through the OpenRouter API

Link copied to clipboard
open class OpenRouterParams(temperature: Double? = null, maxTokens: Int? = null, numberOfChoices: Int? = null, speculation: String? = null, schema: LLMParams.Schema? = null, toolChoice: LLMParams.ToolChoice? = null, user: String? = null, includeThoughts: Boolean? = null, thinkingBudget: Int? = null, additionalProperties: Map<String, JsonElement>? = null, val frequencyPenalty: Double? = null, val presencePenalty: Double? = null, val logprobs: Boolean? = null, val stop: List<String>? = null, val topLogprobs: Int? = null, val topP: Double? = null, val topK: Int? = null, val repetitionPenalty: Double? = null, val minP: Double? = null, val topA: Double? = null, val transforms: List<String>? = null, val models: List<String>? = null, val route: String? = null, val provider: ProviderPreferences? = null) : LLMParams

OpenRouter chat-completions parameters layered on top of LLMParams.