Package-level declarations

Types

Link copied to clipboard
class ErrorResponse(val code: Int, val message: String, val metadata: Map<String, String>? = null)

Represents an error response structure typically used for conveying error details to the clients.

Link copied to clipboard
class OpenRouterChatCompletionResponse(val choices: List<OpenRouterChoice>, val created: Long, val id: String, val model: String, val systemFingerprint: String? = null, val objectType: String = "chat.completion", val usage: OpenAIUsage? = null) : OpenAIBaseLLMResponse

OpenRouter Chat Completion Response See (CompletionsResponse Format)https://openrouter.ai/docs/api-reference/overview#completionsresponse-format

Link copied to clipboard
class OpenRouterChatCompletionStreamResponse(val choices: List<OpenRouterStreamChoice>, val created: Long, val id: String, val model: String, val systemFingerprint: String? = null, val objectType: String = "chat.completion.chunk", val usage: OpenAIUsage? = null) : OpenAIBaseLLMStreamResponse

OpenRouter Chat Completion Streaming Response See (CompletionsResponse Format)https://openrouter.ai/docs/api-reference/overview#completionsresponse-format

Link copied to clipboard
class OpenRouterChoice(val finishReason: String? = null, val nativeFinishReason: String? = null, val message: OpenAIMessage, val error: ErrorResponse? = null)

Chat completion choice

Link copied to clipboard
class OpenRouterStreamChoice(val finishReason: String? = null, val nativeFinishReason: String? = null, val delta: OpenRouterStreamDelta, val error: ErrorResponse? = null)

Chat completion choice

Link copied to clipboard
class OpenRouterStreamDelta(val content: String? = null, val role: String? = null, val toolCalls: List<OpenAIToolCall>? = null)
Link copied to clipboard
class ProviderPreferences(val order: List<String>? = null, val allowFallbacks: Boolean? = null, val requireParameters: Boolean? = null, val dataCollection: String? = null, val only: List<String>? = null, val ignore: List<String>? = null, val quantizations: List<String>? = null, val sort: String? = null, val maxPrice: Map<String, String>? = null)