-
Notifications
You must be signed in to change notification settings - Fork 0
feat: Add native Google Gemini provider support #9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -85,7 +85,7 @@ def config_group(): | |
| ) | ||
| @click.option( | ||
| "--provider", | ||
| type=click.Choice(['openai-compatible', 'anthropic', 'bedrock', 'azure-openai'], case_sensitive=False), | ||
| type=click.Choice(['openai-compatible', 'anthropic', 'bedrock', 'azure-openai', 'gemini'], case_sensitive=False), | ||
| help="LLM provider type (default: openai-compatible)" | ||
| ) | ||
| @click.option( | ||
|
|
@@ -565,6 +565,11 @@ def config_validate(quick: bool, verbose: bool): | |
| azure_endpoint=config.base_url, | ||
| ) | ||
| client.models.list() | ||
| elif provider == "gemini": | ||
| # Use Google Gemini SDK | ||
| from google import genai | ||
| gemini_client = genai.Client(api_key=api_key) | ||
| list(gemini_client.models.list()) | ||
|
Comment on lines
+568
to
+572
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The new Gemini connectivity branch is not reachable for the documented Gemini setup because this command still hard-fails earlier when Useful? React with 👍 / 👎.
Comment on lines
+568
to
+572
|
||
| elif "api.anthropic.com" in base_url_lower: | ||
| # Use Anthropic SDK for native Anthropic endpoints | ||
| import anthropic | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The Gemini quick-start omits
--base-url, but the CLI configuration model andconfig validatecurrently requirebase_urlto be set (and will error with “Base URL not set” before reaching the Gemini connectivity test). Either update the docs to include a valid Gemini base URL (or explain that an existing base URL must remain set), or adjust configuration/validation logic to makebase_urloptional whenprovider=gemini.