OpenRouterLLMAutoConfiguration

@AutoConfiguration
@PropertySource(value = ["classpath:/META-INF/config/koog/openrouter-llm.properties"])
@EnableConfigurationProperties(value = [OpenRouterKoogProperties::class])
class OpenRouterLLMAutoConfiguration(properties: OpenRouterKoogProperties)(source)

Auto-configuration class for integrating OpenRouter with Koog framework.

This class enables the automatic configuration of beans and properties to work with OpenRouter's LLM services, provided the application properties have been set with the required prefix and fields.

The configuration is activated only when both ai.koog.openrouter.enabled is set to true and ai.koog.openrouter.api-key is provided in the application properties.

See also

Constructors

Link copied to clipboard
constructor(properties: OpenRouterKoogProperties)

Functions

Link copied to clipboard

Provides a SingleLLMPromptExecutor bean configured with an OpenRouterLLMClient.

Link copied to clipboard
@Bean
@ConditionalOnProperty(prefix = "ai.koog.openrouter", name = ["enabled"], havingValue = "true")
fun openRouterLLMClient(): OpenRouterLLMClient

Creates an OpenRouterLLMClient bean configured with application properties.