yera.setup.provider_setup.openrouter
Obtain and validate OpenRouter provider configuration.
Symbols
OpenRouterProviderSetup
ProviderSetup[OpenRouterConnection]Provide presentation-independent OpenRouter setup operations.
Automatic discovery looks for the conventional OpenRouter API-key environment variable. Validation resolves the configured API-key reference from either the environment or the protected credential store, then checks its prefix and length locally. It does not contact OpenRouter.
Attributes
Configuration key for the OpenRouter provider.
Human-readable provider name shown during setup.
Python import paths required by the integration.
OpenRouter connection schema produced by the integration.
Methods
OpenRouterProviderSetup.get_config
get_config() → SetupResult[tuple[OpenRouterConnection, ...]]Obtain OpenRouter configuration from the current environment.
Returns
A result containing a connection referencing OPENROUTER_API_KEY when it is present. Otherwise, the result contains no configuration.
OpenRouterProviderSetup.validate
validate(
config: OpenRouterConnection,
secret_store: SecretStore | None = None,
) → SetupResult[OpenRouterConnection]Validate an OpenRouter connection's API-key reference locally.
The reference may point to an environment variable or an entry in the protected credential store. Validation checks the resolved key's prefix and length without contacting OpenRouter.
Parameters
OpenRouter connection containing its API-key reference and optional attribution settings.
Optional protected store used to resolve the API key.
Returns
The supplied configuration and any blocking validation errors.