参考:https://linux.do/t/topic/1352185

更新

反重力总是中断,还是通过opencode使用比较好,可以参考其他教程,结尾提供配置文件
https://www.bilibili.com/video/BV1BVrXBUEbR opencode使用
https://github.com/Darkstarrd-dev/opencode-antigravity-auth?tab=readme-ov-file#%E7%AE%80%E4%BD%93%E4%B8%AD%E6%96%87 opencode插件

常用插件:
https://github.com/Opencode-DCP/opencode-dynamic-context-pruning 处理token消耗量较大
https://github.com/mohak34/opencode-notifier 完成时通知

前提条件

一个美区谷歌账号(咸鱼大概10-20),pro家庭组(咸鱼10-20左右),50元以下就能解决

下载

https://antigravity.google/

登录

使用该工具前的报错内容:Your current account is not eligible for Antigravity. Try signing in with another personal Google account.
https://github.com/lbjlaq/Antigravity-Manager/releases

下载换号工具点击切换就能登录成功
在这里插入图片描述
因为跳过了导入vscode插件部分,可以ctrl+shift+P 输入import来导入配置
在这里插入图片描述

使用

对话也必须开tun模式,但是可以用该工具实现仅处理反重力,这样就可以节省流量(补充:时灵时不灵,还是用全局吧) https://github.com/netchx/netch/releases
在这里插入图片描述

仅需修改端口,点击启动后服务器右侧为绿色的0是成功,红色1000是失败

结束

错误补充

对话时出现
Agent terminated due to error You can prompt the model to try again or start a new conversation if the error persists. See our troubleshooting guide for more help.
解决:更换魔网节点

opencode.json

位置:用户名.config\opencode
https://linux.do/t/topic/1329050 参考这里可以自定义服务商,中转可以用自己的

{
  "$schema": "https://opencode.ai/config.json",
  "plugin": ["oh-my-opencode", "opencode-antigravity-auth-remix@1.3.5","@mohak34/opencode-notifier@latest"],
  "provider": {
	"myproxy": {
            "npm": "@ai-sdk/openai",
            "name": "RightCode",
            "options": {
                "baseURL": "https://right.codes/codex/v1",
                "apiKey": ""
            },
            "models": {
                "gpt-5.1-codex-max": {
                    "id": "gpt-5.1-codex-max",
                    "name": "GPT-5.1 Codex Max",
                    "attachment": true,
                    "reasoning": true,
                    "tool_call": true,
                    "temperature": false,
                    "release_date": "2025-11-12",
                    "modalities": {
                        "input": [
                            "text",
                            "image"
                        ],
                        "output": [
                            "text"
                        ]
                    },
                    "cost": {
                        "input": 1.25,
                        "output": 10,
                        "cache_read": 0.125
                    },
                    "limit": {
                        "context": 400000,
                        "output": 128000
                    },
                    "options": {
                        "store": true,
                        "reasoningEffort": "xhigh",
                        "textVerbosity": "medium",
                        "reasoningSummary": "auto",
                        "include": [
                            "reasoning.encrypted_content"
                        ]
                    },
                    "variants": {
                        "low": { "reasoningEffort": "low" },
                        "medium": { "reasoningEffort": "medium" },
                        "high": { "reasoningEffort": "high" },
                        "xhigh": { "reasoningEffort": "xhigh" }
                    }
                },
                "gpt-5.2": {
                    "id": "gpt-5.2",
                    "name": "GPT-5.2",
                    "attachment": true,
                    "reasoning": true,
                    "tool_call": true,
                    "temperature": false,
                    "release_date": "2025-12-11",
                    "modalities": {
                        "input": [
                            "text",
                            "image"
                        ],
                        "output": [
                            "text"
                        ]
                    },
                    "cost": {
                        "input": 1.75,
                        "output": 14,
                        "cache_read": 0.175
                    },
                    "limit": {
                        "context": 400000,
                        "output": 128000
                    },
                    "options": {
                        "store": true,
                        "reasoningEffort": "xhigh",
                        "textVerbosity": "medium",
                        "reasoningSummary": "auto",
                        "include": [
                            "reasoning.encrypted_content"
                        ]
                    },
                    "variants": {
                        "low": { "reasoningEffort": "low" },
                        "medium": { "reasoningEffort": "medium" },
                        "high": { "reasoningEffort": "high" },
                        "xhigh": { "reasoningEffort": "xhigh" }
                    }
                },
                "gpt-5.2-codex": {
                    "id": "gpt-5.2-codex",
                    "name": "gpt-5.2-codex",
                    "attachment": true,
                    "reasoning": true,
                    "tool_call": true,
                    "temperature": false,
                    "release_date": "2025-11-13",
                    "modalities": {
                        "input": [
                            "text",
                            "image"
                        ],
                        "output": [
                            "text"
                        ]
                    },
                    "cost": {
                        "input": 1.25,
                        "output": 10,
                        "cache_read": 0.13
                    },
                    "limit": {
                        "context": 400000,
                        "output": 128000
                    },
                    "options": {
                        "store": true,
                        "reasoningEffort": "xhigh",
                        "textVerbosity": "medium",
                        "reasoningSummary": "auto",
                        "include": [
                            "reasoning.encrypted_content"
                        ]
                    },
                    "variants": {
                        "low": { "reasoningEffort": "low" },
                        "medium": { "reasoningEffort": "medium" },
                        "high": { "reasoningEffort": "high" },
                        "xhigh": { "reasoningEffort": "xhigh" }
                    }
                }
            }
        },
    "Gemini": {
            "npm": "@ai-sdk/google",
            "name": "Gemini",
            "options": {
                "baseURL": "https://cn.happyapi.org/v1",
                "apiKey": ""
            },
            "models": {
                "gemini-3-pro": {
                    "id": "gemini-3-pro",
                    "name": "Gemini 3 Pro"
                },
                "gemini-3-flash": {
                    "id": "gemini-3-flash-all",
                    "name": "Gemini 3 Flash"
                }
            }
        },
    "Cluade-awsq": {
            "npm": "@ai-sdk/anthropic",
            "name": "Claude中转",
            "options": {
                "baseURL": "https://www.right.codes/claude-aws",
                "apiKey": ""
            },
            "models": {
                "claude-4.5-opus": {
                    "id": "claude-opus-4-5-20251101",
                    "name": "Claude 4.5 Opus"
                },
                "claude-4.5-sonnet": {
                    "id": "claude-sonnet-4-5-20250929",
                    "name": "Claude 4.5 Sonnet"
                },
                "claude-4.5-haiku": {
                    "id": "claude-haiku-4-5-20251001",
                    "name": "Claude 4.5 Haiku"
                }
            }
        },
        
    "google": {
      "models": {
        "antigravity-gemini-3-pro": {
          "id": "antigravity-gemini-3-pro",
          "name": "#01 Gemini 3 Pro (Antigravity)",
          "reasoning": true,
          "limit": { "context": 1048576, "output": 65535 },
          "cost": { "input": 0, "output": 0 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
            "high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
          }
        },
        "antigravity-gemini-3-flash": {
          "id": "antigravity-gemini-3-flash",
          "name": "#02 Gemini 3 Flash (Antigravity)",
          "reasoning": true,
          "limit": { "context": 1048576, "output": 65536 },
          "cost": { "input": 0, "output": 0 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "minimal": { "options": { "thinkingConfig": { "thinkingLevel": "minimal", "includeThoughts": true } } },
            "low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
            "medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
            "high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
          }
        },
        "antigravity-claude-opus-4-5-thinking": {
          "id": "antigravity-claude-opus-4-5-thinking",
          "name": "#03 Claude Opus 4.5 Thinking (Antigravity)",
          "reasoning": true,
          "limit": { "context": 200000, "output": 64000 },
          "cost": { "input": 0, "output": 0 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "low": { "options": { "thinkingConfig": { "thinkingBudget": 8192, "includeThoughts": true } } },
            "medium": { "options": { "thinkingConfig": { "thinkingBudget": 16384, "includeThoughts": true } } },
            "high": { "options": { "thinkingConfig": { "thinkingBudget": 32768, "includeThoughts": true } } }
          }
        },
        "antigravity-claude-sonnet-4-5-thinking": {
          "id": "antigravity-claude-sonnet-4-5-thinking",
          "name": "#04 Claude Sonnet 4.5 Thinking (Antigravity)",
          "reasoning": true,
          "limit": { "context": 200000, "output": 64000 },
          "cost": { "input": 0, "output": 0 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "low": { "options": { "thinkingConfig": { "thinkingBudget": 8192, "includeThoughts": true } } },
            "medium": { "options": { "thinkingConfig": { "thinkingBudget": 16384, "includeThoughts": true } } },
            "high": { "options": { "thinkingConfig": { "thinkingBudget": 32768, "includeThoughts": true } } }
          }
        },
        "antigravity-claude-sonnet-4-5": {
          "id": "antigravity-claude-sonnet-4-5",
          "name": "#05 Claude Sonnet 4.5 (Antigravity)",
          "reasoning": false,
          "limit": { "context": 200000, "output": 64000 },
          "cost": { "input": 0, "output": 0 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
        },
        "gemini-3-pro-preview": {
          "id": "gemini-3-pro-preview",
          "name": "#06 Gemini 3 Pro (CLI)",
          "reasoning": true,
          "limit": { "context": 1000000, "output": 64000 },
          "cost": { "input": 0, "output": 0 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
            "medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
            "high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
          }
        },
        "gemini-3-flash-preview": {
          "id": "gemini-3-flash-preview",
          "name": "#07 Gemini 3 Flash (CLI)",
          "reasoning": true,
          "limit": { "context": 1048576, "output": 65536 },
          "cost": { "input": 0, "output": 0 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
          "variants": {
            "minimal": { "options": { "thinkingConfig": { "thinkingLevel": "minimal", "includeThoughts": true } } },
            "low": { "options": { "thinkingConfig": { "thinkingLevel": "low", "includeThoughts": true } } },
            "medium": { "options": { "thinkingConfig": { "thinkingLevel": "medium", "includeThoughts": true } } },
            "high": { "options": { "thinkingConfig": { "thinkingLevel": "high", "includeThoughts": true } } }
          }
        },
        "gemini-2.5-pro": {
          "id": "gemini-2.5-pro",
          "name": "#08 Gemini 2.5 Pro (CLI)",
          "reasoning": true,
          "limit": { "context": 1048576, "output": 65536 },
          "cost": { "input": 0, "output": 0 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
        },
        "gemini-2.5-flash": {
          "id": "gemini-2.5-flash",
          "name": "#09 Gemini 2.5 Flash (CLI)",
          "reasoning": false,
          "limit": { "context": 1048576, "output": 65536 },
          "cost": { "input": 0, "output": 0 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
        },
        "gemini-2.5-flash-lite": {
          "id": "gemini-2.5-flash-lite",
          "name": "#10 Gemini 2.5 Flash Lite (CLI)",
          "reasoning": false,
          "limit": { "context": 1048576, "output": 65536 },
          "cost": { "input": 0, "output": 0 },
          "modalities": { "input": ["text", "image", "pdf"], "output": ["text"] }
        }
      }
    }
  }
}

Logo

AtomGit 是由开放原子开源基金会联合 CSDN 等生态伙伴共同推出的新一代开源与人工智能协作平台。平台坚持“开放、中立、公益”的理念,把代码托管、模型共享、数据集托管、智能体开发体验和算力服务整合在一起,为开发者提供从开发、训练到部署的一站式体验。

更多推荐