Kouri Ai应用配置
OpenCode
OpenCode 是一款开源的命令行 AI 编程助手,支持多种 AI 提供商,可以帮助您进行代码编写、调试和项目管理。
关于 OpenCode
OpenCode 是一款开源的命令行 AI 编程助手。它支持多种 AI 提供商(包括 OpenAI、Anthropic、Google 等),可以直接在终端中使用,帮助您编写代码、调试问题、理解代码库和执行各种开发任务。
安装
使用 Homebrew 安装 (macOS/Linux)
brew install opencode-ai/tap/opencode使用安装脚本
curl -fsSL https://opencode.ai/install.sh | bash配置步骤
OpenCode 支持通过配置文件或环境变量进行配置。
使用配置文件(推荐)
在您的项目根目录或 ~/.config/opencode/ 目录下创建 opencode.json 文件:
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"kouri": {
"npm": "@ai-sdk/anthropic",
"name": "Kouri Ai",
"options": {
"baseURL": "https://api.kourichat.com/v1"
},
"models": {
"claude-opus-4-5-20251101": {
"name": "Opus 4.5",
"tool_call": true,
"temperature": true,
"thinking": true,
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 32000
}
},
"limit": {
"context": 200000,
"output": 64000
}
},
"claude-sonnet-4-5-20250929": {
"name": "Sonnet 4.5",
"tool_call": true,
"temperature": true,
"thinking": true,
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 32000
}
},
"limit": {
"context": 200000,
"output": 64000
}
},
"claude-haiku-4-5-20251001": {
"name": "Haiku 4.5",
"tool_call": true,
"temperature": true,
"thinking": true,
"options": {
"thinking": {
"type": "enabled",
"budgetTokens": 16000
}
},
"limit": {
"context": 200000,
"output": 64000
}
},
"glm-4.7": {
"name": "GLM 4.7",
"tool_call": true,
"temperature": true,
"thinking": true,
"limit": {
"context": 205000,
"output": 131000
}
},
"minimax-m2.1": {
"name": "MiniMax M2.1",
"tool_call": true,
"temperature": true,
"thinking": true,
"limit": {
"context": 205000,
"output": 131000
}
},
"gemini-3-pro-preview": {
"name": "Gemini 3 Pro Preview",
"tool_call": true,
"temperature": true,
"thinking": true,
"limit": {
"context": 1000000,
"output": 66000
}
},
"gemini-3-flash-preview": {
"name": "Gemini 3 Flash Preview",
"tool_call": true,
"temperature": true,
"thinking": true,
"limit": {
"context": 1000000,
"output": 66000
}
}
}
}
}
}开始使用
配置完成后,在终端运行以下命令启动 OpenCode:
opencode更多信息
OpenCode 是开源项目,支持多种 AI 提供商。您也可以修改配置文件,来使用其他您想使用的模型。模型上下文窗口等信息可以参考Kouri Ai 模型页面。 更多高级功能和使用方法,请参考 OpenCode GitHub 仓库。