forked from agents/opencode
Compare commits
28 Commits
e3f9b17753
...
codex
| Author | SHA1 | Date | |
|---|---|---|---|
| 8400b997b7 | |||
| b3df515775 | |||
| d9f89b3b28 | |||
| cdabb9fd16 | |||
| caf20d861d | |||
| b4569fa6a9 | |||
| db8880c833 | |||
| 681d8340cb | |||
| f8a349f478 | |||
| 8fdfb38e84 | |||
| 9c768870e3 | |||
| 8978eeb5de | |||
| 3a35190250 | |||
| b9650bfde8 | |||
| 8573f89db7 | |||
| 069684079a | |||
| 472294b787 | |||
| f087f34a96 | |||
| cd4dd39670 | |||
| 9de3f60156 | |||
| 9384469551 | |||
| 09407f9980 | |||
| 12d944efb4 | |||
| 8ca07bcdf5 | |||
| 8ea1baccf2 | |||
| f4cc4c6f29 | |||
| 294451814e | |||
| 0296ca6564 |
@@ -7,4 +7,4 @@ EXA_API_KEY=
|
|||||||
CONTEXT7_API_KEY=
|
CONTEXT7_API_KEY=
|
||||||
|
|
||||||
# Windows
|
# Windows
|
||||||
OPENCODE_GIT_BASH_PATH=%USERPROFILE%\scoop\apps\git\current\bin\bash.exe
|
OPENCODE_GIT_BASH_PATH=%USERPROFILE%\scoop\shims\bash.exe
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -4,4 +4,3 @@ bun.lock
|
|||||||
|
|
||||||
.DS_Store
|
.DS_Store
|
||||||
Thumbs.db
|
Thumbs.db
|
||||||
.env
|
|
||||||
|
|||||||
31
README.md
31
README.md
@@ -1,31 +0,0 @@
|
|||||||
# opencode-config
|
|
||||||
|
|
||||||
个人 [OpenCode](https://opencode.ai) 配置文件。
|
|
||||||
|
|
||||||
## 使用
|
|
||||||
|
|
||||||
1. 安装 OpenCode
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm i -g opencode-ai
|
|
||||||
# 或
|
|
||||||
bun add -g opencode-ai
|
|
||||||
```
|
|
||||||
|
|
||||||
2. 克隆配置到 `~/.config/opencode`
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone <repo-url> ~/.config/opencode
|
|
||||||
```
|
|
||||||
|
|
||||||
3. 参考 `.env.example` 将以下环境变量配置到系统中
|
|
||||||
|
|
||||||
| 变量 | 必填 | 说明 |
|
|
||||||
|------|------|------|
|
|
||||||
| `LITELLM_BASE_URL` | 是 | 模型服务端点 |
|
|
||||||
| `LITELLM_API_KEY` | 是 | 模型服务密钥 |
|
|
||||||
| `EXA_API_KEY` | 否 | [Exa](https://exa.ai) 搜索,提供联网能力,不配则使用默认额度 |
|
|
||||||
| `CONTEXT7_API_KEY` | 否 | [Context7](https://context7.com) 文档查询,提供库文档检索,不配则使用默认额度 |
|
|
||||||
| `OPENCODE_GIT_BASH_PATH` | 否 | Windows 用户需指定 Git Bash 路径,否则工具调用可能异常 |
|
|
||||||
|
|
||||||
4. 运行 `opencode`
|
|
||||||
@@ -1,27 +1,27 @@
|
|||||||
{
|
{
|
||||||
"$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
|
"$schema": "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json",
|
||||||
"agents": {
|
"agents": {
|
||||||
"sisyphus": { "model": "anthropic/claude-opus-4-6", "variant": "high" },
|
"sisyphus": { "model": "openai/gpt-5.4", "variant": "medium" },
|
||||||
"hephaestus": { "model": "openai/gpt-5.3-codex", "variant": "medium" },
|
"hephaestus": { "model": "openai/gpt-5.3-codex", "variant": "medium" },
|
||||||
"oracle": { "model": "openai/gpt-5.4", "variant": "high" },
|
"oracle": { "model": "openai/gpt-5.4", "variant": "high" },
|
||||||
"librarian": { "model": "litellm/minimax-m2.5" },
|
"librarian": { "model": "openai/gpt-5.4-mini" },
|
||||||
"explore": { "model": "litellm/grok-code-fast-1" },
|
"explore": { "model": "openai/gpt-5.4-mini" },
|
||||||
"multimodal-looker": { "model": "openai/gpt-5.4", "variant": "medium" },
|
"multimodal-looker": { "model": "openai/gpt-5.4", "variant": "medium" },
|
||||||
"prometheus": { "model": "anthropic/claude-opus-4-6", "variant": "high" },
|
"prometheus": { "model": "openai/gpt-5.4", "variant": "high" },
|
||||||
"metis": { "model": "anthropic/claude-opus-4-6", "variant": "high" },
|
"metis": { "model": "openai/gpt-5.4", "variant": "high" },
|
||||||
"momus": { "model": "openai/gpt-5.4", "variant": "xhigh" },
|
"momus": { "model": "openai/gpt-5.4", "variant": "xhigh" },
|
||||||
"atlas": { "model": "anthropic/claude-sonnet-4-6" },
|
"atlas": { "model": "openai/gpt-5.4", "variant": "medium" },
|
||||||
"sisyphus-junior": { "model": "anthropic/claude-sonnet-4-6" }
|
"sisyphus-junior": { "model": "openai/gpt-5.4", "variant": "medium" }
|
||||||
},
|
},
|
||||||
"categories": {
|
"categories": {
|
||||||
"visual-engineering": { "model": "google/gemini-3.1-pro-preview", "variant": "high" },
|
"visual-engineering": { "model": "openai/gpt-5.4", "variant": "medium" },
|
||||||
"ultrabrain": { "model": "openai/gpt-5.4", "variant": "xhigh" },
|
"ultrabrain": { "model": "openai/gpt-5.3-codex", "variant": "xhigh" },
|
||||||
"deep": { "model": "openai/gpt-5.3-codex", "variant": "medium" },
|
"deep": { "model": "openai/gpt-5.3-codex", "variant": "medium" },
|
||||||
"artistry": { "model": "google/gemini-3.1-pro-preview", "variant": "high" },
|
"artistry": { "model": "openai/gpt-5.4", "variant": "medium" },
|
||||||
"quick": { "model": "openai/gpt-5.4-mini" },
|
"quick": { "model": "openai/gpt-5.4-mini" },
|
||||||
"unspecified-low": { "model": "anthropic/claude-sonnet-4-6" },
|
"unspecified-low": { "model": "openai/gpt-5.4", "variant": "medium" },
|
||||||
"unspecified-high": { "model": "anthropic/claude-opus-4-6", "variant": "high" },
|
"unspecified-high": { "model": "openai/gpt-5.4", "variant": "high" },
|
||||||
"writing": { "model": "google/gemini-3-flash-preview" }
|
"writing": { "model": "openai/gpt-5.4", "variant": "medium" }
|
||||||
},
|
},
|
||||||
"experimental": {
|
"experimental": {
|
||||||
"dynamic_context_pruning": {
|
"dynamic_context_pruning": {
|
||||||
|
|||||||
@@ -2,36 +2,9 @@
|
|||||||
"$schema": "https://opencode.ai/config.json",
|
"$schema": "https://opencode.ai/config.json",
|
||||||
"plugin": ["oh-my-opencode@latest"],
|
"plugin": ["oh-my-opencode@latest"],
|
||||||
"autoupdate": false,
|
"autoupdate": false,
|
||||||
"model": "anthropic/claude-opus-4-6",
|
"model": "openai/gpt-5.4",
|
||||||
"small_model": "anthropic/claude-haiku-4-5",
|
"small_model": "openai/gpt-5.4-mini",
|
||||||
"provider": {
|
"provider": {
|
||||||
"anthropic": {
|
|
||||||
"npm": "@ai-sdk/anthropic",
|
|
||||||
"options": {
|
|
||||||
"baseURL": "{env:LITELLM_BASE_URL}/v1",
|
|
||||||
"apiKey": "{env:LITELLM_API_KEY}"
|
|
||||||
},
|
|
||||||
"models": {
|
|
||||||
"claude-opus-4-6": {
|
|
||||||
"name": "Claude Opus 4.6",
|
|
||||||
"reasoning": true,
|
|
||||||
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
||||||
"limit": { "context": 1000000, "output": 128000 }
|
|
||||||
},
|
|
||||||
"claude-sonnet-4-6": {
|
|
||||||
"name": "Claude Sonnet 4.6",
|
|
||||||
"reasoning": true,
|
|
||||||
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
||||||
"limit": { "context": 200000, "output": 64000 }
|
|
||||||
},
|
|
||||||
"claude-haiku-4-5": {
|
|
||||||
"name": "Claude Haiku 4.5",
|
|
||||||
"reasoning": true,
|
|
||||||
"modalities": { "input": ["text", "image", "pdf"], "output": ["text"] },
|
|
||||||
"limit": { "context": 200000, "output": 64000 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"openai": {
|
"openai": {
|
||||||
"npm": "@ai-sdk/openai",
|
"npm": "@ai-sdk/openai",
|
||||||
"options": {
|
"options": {
|
||||||
@@ -58,61 +31,6 @@
|
|||||||
"limit": { "context": 400000, "input": 272000, "output": 128000 }
|
"limit": { "context": 400000, "input": 272000, "output": 128000 }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"google": {
|
|
||||||
"npm": "@ai-sdk/google",
|
|
||||||
"options": {
|
|
||||||
"baseURL": "{env:LITELLM_BASE_URL}/v1beta",
|
|
||||||
"apiKey": "{env:LITELLM_API_KEY}"
|
|
||||||
},
|
|
||||||
"models": {
|
|
||||||
"gemini-3.1-pro-preview": {
|
|
||||||
"name": "Gemini 3.1 Pro",
|
|
||||||
"reasoning": true,
|
|
||||||
"modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] },
|
|
||||||
"limit": { "context": 1048576, "output": 65536 }
|
|
||||||
},
|
|
||||||
"gemini-3-flash-preview": {
|
|
||||||
"name": "Gemini 3 Flash",
|
|
||||||
"reasoning": true,
|
|
||||||
"modalities": { "input": ["text", "image", "video", "audio", "pdf"], "output": ["text"] },
|
|
||||||
"limit": { "context": 1048576, "output": 65536 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"litellm": {
|
|
||||||
"name": "LiteLLM",
|
|
||||||
"npm": "@ai-sdk/openai-compatible",
|
|
||||||
"options": {
|
|
||||||
"baseURL": "{env:LITELLM_BASE_URL}/v1",
|
|
||||||
"apiKey": "{env:LITELLM_API_KEY}"
|
|
||||||
},
|
|
||||||
"models": {
|
|
||||||
"grok-code-fast-1": {
|
|
||||||
"name": "Grok Code Fast 1",
|
|
||||||
"reasoning": true,
|
|
||||||
"modalities": { "input": ["text"], "output": ["text"] },
|
|
||||||
"limit": { "context": 256000, "output": 10000 }
|
|
||||||
},
|
|
||||||
"glm-5": {
|
|
||||||
"name": "GLM-5",
|
|
||||||
"reasoning": true,
|
|
||||||
"modalities": { "input": ["text"], "output": ["text"] },
|
|
||||||
"limit": { "context": 204800, "output": 131072 }
|
|
||||||
},
|
|
||||||
"kimi-k2.5": {
|
|
||||||
"name": "Kimi K2.5",
|
|
||||||
"reasoning": true,
|
|
||||||
"modalities": { "input": ["text", "image", "video"], "output": ["text"] },
|
|
||||||
"limit": { "context": 262144, "output": 262144 }
|
|
||||||
},
|
|
||||||
"minimax-m2.5": {
|
|
||||||
"name": "MiniMax M2.5",
|
|
||||||
"reasoning": true,
|
|
||||||
"modalities": { "input": ["text"], "output": ["text"] },
|
|
||||||
"limit": { "context": 204800, "output": 131072 }
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"experimental": {
|
"experimental": {
|
||||||
|
|||||||
Reference in New Issue
Block a user