Contents

OpenCode Integration with Antigravity: Guide to Using Top LLMs for Free

This article introduces how to integrate the Antigravity proxy service into OpenCode, allowing you to use top-tier large models including Claude Sonnet 4.5 and Gemini 3 Pro for free.

1. Install Plugin

You need to install the opencode-antigravity-auth plugin and configure model definitions.

Directly enter the following command in the OpenCode conversation to let the Agent automatically execute installation and configuration:

Install the opencode-antigravity-auth plugin and add the Antigravity model definitions to ~/.config/opencode/opencode.json by following: https://raw.githubusercontent.com/NoeFabris/opencode-antigravity-auth/dev/README.md

Method 2: Manual Configuration

If you prefer manual control, you can edit the configuration file:

  1. Open the configuration file ~/.config/opencode/opencode.json.

  2. Add the plugin to the plugins array:

    {
      "plugins": ["opencode-antigravity-auth@latest"]
    }

    (Note: Use the @beta version if you want to experience the latest beta features)

  3. Copy and add the complete model definition configuration (refer to the official documentation for the latest model configuration JSON).

2. Account Authentication

After plugin installation is complete, you need to log in to your Google Account for authorization.

  1. Restart OpenCode: Open a new terminal window to launch OpenCode.
  2. Execute Login Command:
    opencode auth login
    (If adding a second account, simply run this command again)
  3. Select Login Method:
    • The terminal will prompt you to select a login provider. Use the arrow keys to select Google.
  4. Browser Authorization:
    • The system will automatically open your default browser.
    • Please log in with the Google Account that has Antigravity permissions.
  5. Complete Login:
    • Upon successful login, the terminal will display “Authentication successful” or a similar success message.

3. Verification and Usage

Once logged in, verify if the models are available.

Verify Model List

Enter the following slash command in OpenCode:

/models

In the popped-up model list, you should see a series of models supported by Google Antigravity, such as:

  • google/antigravity-claude-sonnet-4-5-thinking
  • google/antigravity-claude-opus-4-5-thinking
  • google/antigravity-gemini-3-pro
  • google/antigravity-gemini-3-flash https://image.wenhaofree.com/2026/01/f4e670b77c42dcaf60bea1d2125b435e.png

Quick Test

You can use the following command to directly invoke a specific model for testing:

opencode run "Hello, who are you?" --model=google/antigravity-claude-sonnet-4-5-thinking --variant=max

If you receive a reply, the configuration is fully successful. Now you can enjoy using these powerful models to assist your programming!