OpenCode + Antigravity Tools 配置

OpenCode + Antigravity Tools 配置

LINUX DO - 最新话题 (shaynewang)

我的codex是老农的中转,codex需要自行配置

~/.config/opencode/opencode.jsonc

{
"plugin": [
"oh-my-opencode"
],
"$schema": "https://opencode.ai/config.json",
"mcp": {
"context7": {
"type": "local",
"command": [
"pnpx",
"@upstash/context7-mcp"
],
"enabled": true
}
},
"provider": {
"antigravity-tools": {
"npm":"@ai-sdk/anthropic",
"options": {
"baseURL": "http://127.0.0.1:8045/v1",
"apiKey": "sk-123"
},
"models": {
"gemini-3-flash": {
"name": "Gemini 3 Flash (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
}
},
"gemini-3-pro-high": {
"name": "Gemini 3 Pro High (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
}
},
"gemini-3-pro-low": {
"name": "Gemini 3 Pro Low (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
}
},
"gemini-3-pro-image": {
"name": "Gemini 3 Pro Image (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"image"
],
"output": [
"image"
]
}
},
"gemini-2.5-flash": {
"name": "Gemini 2.5 Flash (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
}
},
"gemini-2.5-flash-lite": {
"name": "Gemini 2.5 Flash Lite (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
}
},
"gemini-2.5-pro": {
"name": "Gemini 2.5 Pro (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
}
},
"gemini-2.5-flash-thinking": {
"name": "Gemini 2.5 Flash Thinking (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
}
},
"claude-sonnet-4-5": {
"name": "Claude Sonnet 4.5 (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
}
},
"claude-sonnet-4-5-thinking": {
"name": "Claude Sonnet 4.5 Think (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
}
},
"claude-opus-4-5-thinking": {
"name": "Claude Opus 4.5 Think (Antigravity)",
"attachment": true,
"limit": {
"context": 1048576,
"output": 65535
},
"modalities": {
"input": [
"text",
"image",
"pdf"
],
"output": [
"text"
]
}
}
}
},
"linuxdo": {
"npm":"@ai-sdk/openai",
"options": {
"baseURL": "https://中转站/v1",
"apiKey": "sk-123",
"reasoningEffort": "medium",
"reasoningSummary": "auto",
"textVerbosity": "medium",
"include": [
"reasoning.encrypted_content"
],
"store": false
},
"models": {
"gpt-5.2-codex-low": {
"name": "GPT 5.2 Codex Low (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "low",
"reasoningSummary": "auto",
"textVerbosity": "medium",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
},
"gpt-5.2-codex-medium": {
"name": "GPT 5.2 Codex Medium (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "medium",
"reasoningSummary": "auto",
"textVerbosity": "medium",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
},
"gpt-5.2-codex-high": {
"name": "GPT 5.2 Codex High (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "high",
"reasoningSummary": "detailed",
"textVerbosity": "medium",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
},
"gpt-5.1-codex-max": {
"name": "GPT 5.1 Codex Max (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "high",
"reasoningSummary": "detailed",
"textVerbosity": "medium",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
},
"gpt-5.1-codex-max-low": {
"name": "GPT 5.1 Codex Max Low (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "low",
"reasoningSummary": "detailed",
"textVerbosity": "medium",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
},
"gpt-5.1-codex-max-medium": {
"name": "GPT 5.1 Codex Max Medium (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "medium",
"reasoningSummary": "detailed",
"textVerbosity": "medium",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
},
"gpt-5.1-codex-max-high": {
"name": "GPT 5.1 Codex Max High (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "high",
"reasoningSummary": "detailed",
"textVerbosity": "medium",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
},
"gpt-5.1-codex-max-xhigh": {
"name": "GPT 5.1 Codex Max Extra High (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "xhigh",
"reasoningSummary": "detailed",
"textVerbosity": "medium",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
},
"gpt-5.2-low": {
"name": "GPT 5.2 Low (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "low",
"reasoningSummary": "auto",
"textVerbosity": "low",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
},
"gpt-5.2-medium": {
"name": "GPT 5.2 Medium (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "medium",
"reasoningSummary": "auto",
"textVerbosity": "medium",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
},
"gpt-5.2-high": {
"name": "GPT 5.2 High (OAuth)",
"limit": {
"context": 272000,
"output": 128000
},
"options": {
"reasoningEffort": "high",
"reasoningSummary": "detailed",
"textVerbosity": "high",
"include": [
"reasoning.encrypted_content"
],
"store": false
}
}
}
}
}
}

~/.config/opencode/oh-my-opencode.jsonc

这块模型仁者见仁~

{
"$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
"google_auth": false,
"claude_code": { // 我不希望 OpenCode 自动读取 Claude 的配置
"mcp": false,
"commands": false,
"skills": false,
"agents": false,
"hooks": false
},
"agents": {
"Sisyphus": {
"model": "antigravity-tools/claude-opus-4-5-thinking"
},
"oracle": {
"model": "linuxdo/gpt-5.2-high"
},
"librarian": {
"model": "linuxdo/gpt-5.2-high"
},
"explore": {
"model": "antigravity-tools/claude-sonnet-4-5"
},
"frontend-ui-ux-engineer": {
"model": "antigravity-tools/gemini-3-pro-high"
},
"document-writer": {
"model": "antigravity-tools/gemini-3-flash"
},
"multimodal-looker": {
"model": "antigravity-tools/gemini-3-flash"
}
}
}

1 post - 1 participant

Read full topic

Generated by RSStT. The copyright belongs to the original author.

Source

Report Page