yera.cli.setup_handlers.base
Base class for provider connection setup handlers.
Symbols
BaseProviderSetup
Inherits:
ABCSubclasses:
OpenAISetup, LlamaCppSetup, OllamaSetup, GeminiSetup, OpenRouterSetup, AzureSetup, MistralSetup, AWSSetup, AnthropicSetupAbstract base for provider connection setup handlers.
Subclasses implement provider-specific config and credential detection and prompting. The CLI command owns orchestration and all writes.
Methods
__init__ — Initialize provider setup with its interactive console.
detect_config — Detect non-credential connection config from environment or files.
ask_for_config — Prompt interactively for non-credential connection config fields.
BaseProviderSetup.__init__
__init__(
console: Console,
) → NoneInitialize provider setup with its interactive console.
Parameters
console
type: Console
Rich console used to present prompts and diagnostics.
BaseProviderSetup.detect_config
detect_config() → BaseConnection | NoneDetect non-credential connection config from environment or files.
Returns
type: BaseConnection | None
A detected provider connection, or None when detection fails.
BaseProviderSetup.ask_for_config
ask_for_config() → BaseConnection | NonePrompt interactively for non-credential connection config fields.
Returns
type: BaseConnection | None
The configured provider connection, or None when the user declines setup.