OpenRouterKoogProperties

@ConfigurationProperties(prefix = "ai.koog.openrouter", ignoreUnknownFields = true)
class OpenRouterKoogProperties(val enabled: Boolean, val apiKey: String, val baseUrl: String, val retry: RetryConfigKoogProperties? = null) : KoogLlmClientProperties(source)

Configuration properties class for OpenRouter integration within the Koog framework.

This class defines configuration options required for connecting to the OpenRouter service via the Koog framework. It includes parameters such as API key, base URL, enabling or disabling the integration, and retry configuration for handling API requests.

When properly configured in the application properties using the defined prefix, this class allows seamless integration with OpenRouter's LLM services.

Configuration prefix: ai.koog.openrouter

Constructors

Link copied to clipboard
constructor(enabled: Boolean, apiKey: String, baseUrl: String, retry: RetryConfigKoogProperties? = null)

Types

Link copied to clipboard
object Companion

Companion object for the OpenRouterKoogProperties class, providing constant values and utilities associated with the configuration of OpenRouter-related properties.

Properties

Link copied to clipboard

The API key used for authenticating requests to the OpenRouter service. This must be provided through the property ai.koog.openrouter.api-key.

Link copied to clipboard
open override val baseUrl: String

The base URL of the OpenRouter API endpoint, configurable via the property ai.koog.openrouter.base-url. Defaults to the service's official API URL.

Link copied to clipboard
open override val enabled: Boolean

Specifies whether the OpenRouter integration is enabled. This can be toggled via the property ai.koog.openrouter.enabled.

Link copied to clipboard
open override val retry: RetryConfigKoogProperties? = null

An optional retry configuration for handling failed API requests. This can be set using sub-properties under ai.koog.openrouter.retry.

Functions

Link copied to clipboard
open override fun toString(): String

Converts the OpenRouterKoogProperties instance to its string representation. Sensitive information, such as the API key, is masked to ensure security.