yera.providers.openrouter_common
Common infrastructure for accessing OpenRouter services.
Symbols
get_openrouter_client
get_openrouter_client(
connection: OpenRouterConnection,
secret_store: SecretStore | None = None,
) → OpenRouterBuild an OpenRouter client from a configured connection.
Parameters
connection
type: OpenRouterConnection
OpenRouter connection containing authentication and attribution configuration.
secret_store
type: SecretStore | None = None
Optional store override for resolving a stored key.
Returns
type: OpenRouter
OpenRouter client authenticated with the resolved API key.
Raises
ProviderCredentialError
If the referenced API key cannot be resolved.