feat(queue): Adding gemini/gemini cli#217
Open
RomuloGatto wants to merge 6 commits intoTinyAGI:mainfrom
Open
Conversation
|
@RomuloGatto is attempting to deploy a commit to the AGI Team on Vercel. A member of the Team first needs to authorize it. |
Greptile SummaryThis PR adds first-class support for the Google Gemini CLI as a provider across the entire stack — core invocation logic, CLI tooling, server API validation, and the TinyOffice UI. The implementation follows the existing patterns established for Anthropic, OpenAI/Codex, and OpenCode. Key changes:
Issues found:
Confidence Score: 3/5
Important Files Changed
Sequence DiagramsequenceDiagram
participant Client
participant Main as packages/main (processMessage)
participant Invoke as packages/core (invokeAgent)
participant Config as packages/core (config)
participant GeminiCLI as gemini CLI
Client->>Main: message
Main->>Config: getSettings()
Config-->>Main: settings (provider resolved)
Main->>Invoke: invokeAgent(agent, ...)
alt provider = 'custom:<id>' with harness='gemini'
Invoke->>Config: lookup customProvider
Config-->>Invoke: base_url, api_key, harness='gemini'
Note over Invoke: Sets GOOGLE_API_KEY, GEMINI_API_KEY,<br/>GEMINI_SANDBOX=true<br/>(base_url silently ignored ⚠️)
Invoke->>Invoke: provider = 'google'
else provider = 'google' (built-in)
Invoke->>Config: getSettings() for auth_token
Config-->>Invoke: google.auth_token (optional)
Note over Invoke: Sets GOOGLE_API_KEY, GEMINI_API_KEY<br/>(no GEMINI_SANDBOX set — inconsistent ⚠️)
end
Invoke->>Invoke: resolveGeminiModel(effectiveModel)
Invoke->>Invoke: write system prompt to system.md
Invoke->>GeminiCLI: gemini --approval-mode=yolo --output-format json [--resume latest] --model M --prompt P
alt session resume fails
GeminiCLI-->>Invoke: error: "No previous sessions found"
Invoke->>GeminiCLI: retry without --resume
end
GeminiCLI-->>Invoke: JSON output
Invoke->>Invoke: parse JSON → extract response field
Invoke-->>Main: response text
alt error thrown
Main->>Main: resolve providerLabel (Claude/Codex/Gemini/OpenCode)
Main->>Main: log ERROR with label
Main-->>Client: error fallback message
end
Main-->>Client: response
Last reviewed commit: 11c99dd |
This was referenced Mar 15, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Add support for the Google Gemini provider and its models in the agent configuration. Enhance error logging for custom providers during message processing. Remove deprecated Gemini model references from the provider and CLI options.
Changes
Added Google provider and models to the configuration
Enhanced error logging for custom providers
Removed deprecated Gemini model references
Testing
Tested the integration of the Google provider and its models
Verified error logging for custom providers
Checklist
PR title follows conventional commit format (
type(scope): description)I have tested these changes locally
My changes don't introduce new warnings or errors
I have updated documentation if needed