KUAPI DOCUMENTATION帮助文档

帮助文档 opencode接入模型

opencode接入模型

opencode接入模型

windows路径配置:C:\Users\用户名\.config\opencode\opencode.json linux路径:~/.config/opencode/opencode.json 写入以下配置文件:

bash
{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "anthropic": {
      "npm": "@ai-sdk/anthropic",
      "name": "kuapi",
      "options": {
        "baseURL": "https://kuapi.cc/v1",
        "apiKey": "sk-你的密钥填这里"
      },
      "models": {
        "claude-fable-5": {
          "name": "claude-fable-5",
          "limit": {
            "context": 1000000,
            "output": 64000
          }
        },
		"claude-opus-5": {
          "name": "claude-opus-5",
          "limit": {
            "context": 1000000,
            "output": 64000
          }
        },
		"claude-sonnet-5": {
          "name": "claude-sonnet-5",
          "limit": {
            "context": 1000000,
            "output": 64000
          }
        }
      }
    }
  },
  "model": "anthropic/claude-fable-5"
}