yera.cli.setup_handlers.gemini

Gemini provider setup handler.

Symbols

class GeminiSetup — Handler for configuring Gemini Developer API connections.

GeminiSetup

Handler for configuring Gemini Developer API connections.

Methods

detect_config — Detect and report a Gemini connection from the environment.
ask_for_config — Prompt for a Gemini connection configuration.
validate — Validate a Gemini connection through the reusable setup operation.

GeminiSetup.detect_config

detect_config() → GeminiConnection | None

Detect and report a Gemini connection from the environment.

Returns

type: GeminiConnection | None

A connection referencing the first populated API-key variable in SDK precedence order, or None when neither variable is populated.

GeminiSetup.ask_for_config

ask_for_config() → GeminiConnection | None

Prompt for a Gemini connection configuration.

Returns

type: GeminiConnection | None

The configured connection, or None when setup is declined.

GeminiSetup.validate

validate(
    config: GeminiConnection,
) → None

Validate a Gemini connection through the reusable setup operation.

Parameters

config
type: GeminiConnection

Gemini connection to validate.

Raises

ValueError

If its API-key environment variable is absent or empty.