Skip to content

feat: add OpenCode and Antigravity CLI providers#125

Closed
AtharvaGurao wants to merge 1 commit intosipeed:mainfrom
AtharvaGurao:feature/add-opencode-antigravity
Closed

feat: add OpenCode and Antigravity CLI providers#125
AtharvaGurao wants to merge 1 commit intosipeed:mainfrom
AtharvaGurao:feature/add-opencode-antigravity

Conversation

@AtharvaGurao
Copy link

Summary

Adds two new free CLI-based LLM providers as requested in #68.

New Providers

Provider CLI Tool Command
OpenCode opencode-ai/opencode opencode -p "prompt" -f json -q
Antigravity/Gemini CLI google-gemini/gemini-cli gemini -p "prompt" --sandbox false

Both are free and follow the same subprocess pattern as the existing ClaudeCliProvider.

Provider Names in Config

{"agents": {"defaults": {"provider": "opencode"}}}
// or
{"agents": {"defaults": {"provider": "antigravity"}}}

Aliases: open-code, gemini-cli

Files Changed

  • pkg/providers/opencode_provider.go — new OpenCode CLI provider
  • pkg/providers/antigravity_provider.go — new Antigravity/Gemini CLI provider
  • pkg/providers/http_provider.go — wired into CreateProvider()
  • pkg/config/config.go — added config entries
  • .env.example — documentation

Testing

  • ✅ All existing tests pass
  • ✅ Build succeeds

Closes #68

@mengzhuo
Copy link
Collaborator

Could you rebase and do make fmt?

@vantuan88291
Copy link

When this can be merge?

@mengzhuo
Copy link
Collaborator

When this can be merge?

You need to make fmt and resolve confilcts.

@vantuan88291
Copy link

I think Antigravity and gemini not the same cuz when login via Antigravity i got more models than just provide gemini api key, and Antigravity provided oauth login, not api key

Adds two new free CLI-based LLM providers:

- **OpenCode**: Uses the opencode CLI (https://github.com/opencode-ai/opencode)
  with non-interactive JSON output mode (-p, -f json, -q flags)
- **Antigravity/Gemini CLI**: Uses the gemini CLI
  (https://github.com/google-gemini/gemini-cli) with headless mode

Both follow the same subprocess pattern as ClaudeCliProvider.

Provider names in config:
- opencode / open-code
- antigravity / gemini-cli

Closes sipeed#68
@AtharvaGurao AtharvaGurao force-pushed the feature/add-opencode-antigravity branch from 2ced670 to b1230ae Compare February 16, 2026 11:34
@AtharvaGurao
Copy link
Author

AtharvaGurao commented Feb 16, 2026

Rebased onto latest main and ran make fmt. Conflicts resolved (merged in the new Ollama, DeepSeek, GitHubCopilot, and CodexCli providers from upstream). Ready for review!

@mrbeandev
Copy link
Contributor

whats the status of this pr ? has anyone tested it ? is antigravity working ??

@Leeaandrob
Copy link
Collaborator

@Zepan Adds OpenCode and Antigravity CLI providers (+602 lines). These follow the same CLI subprocess pattern as the Codex CLI provider (#80, merged).

Recommendation: Review after #213 (Provider Refactor) lands. CLI providers are a good fit for PicoClaw's lightweight philosophy, but the provider architecture is about to change. These would need rework after #213.

@mrbeandev
Copy link
Contributor

mrbeandev commented Feb 17, 2026

Sharing for visibility: we opened a follow-up implementation and validation PR here: #343

It includes Antigravity provider integration plus compatibility fixes found during testing (tool-call normalization, history ordering sanitization, thought_signature preservation).

@yinwm
Copy link
Collaborator

yinwm commented Feb 20, 2026

Thanks for the contribution! However, this PR needs significant rework due to architecture changes and overlapping implementations.

Current Status:

Feature This PR Main Branch
Antigravity CLI-based (286 lines) Already exists - HTTP + OAuth (24,719 lines via #492)
OpenCode CLI-based (282 lines) ❌ Not yet available

Issue 1: Antigravity Already Exists

PR #492 (Provider Refactoring) has been merged, which includes a complete Antigravity provider with:

  • Full OAuth login flow
  • HTTP-based API (not CLI subprocess)
  • Better error handling and reliability
  • See: pkg/providers/antigravity_provider.go

Issue 2: Architecture Changes

This PR modifies the old http_provider.go structure which has been replaced by the protocol-based model_list configuration. See: provider-refactoring.md

Suggested Path Forward:

  1. Antigravity: Can be removed from this PR - already implemented
  2. OpenCode: If you'd like to keep this, please rebase and:
    • Remove all Antigravity-related changes
    • Keep only pkg/providers/opencode_provider.go
    • Follow the pattern in pkg/providers/claude_cli_provider.go
    • Register in pkg/providers/factory_provider.go:
      case "opencode", "open-code":
          workspace := cfg.Workspace
          if workspace == "" {
              workspace = "."
          }
          return NewOpenCodeProvider(workspace), modelID, nil

Would you like to update this PR with only the OpenCode provider? Or I can close this and you can open a new focused PR.

@yinwm yinwm closed this Feb 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature request] Add open code and antigravity

7 participants