|
| 1 | +# Coding Plan Mask 配置文件 |
| 2 | +# 文档: https://github.com/systemime/coding-plan-mask |
| 3 | + |
| 4 | +# ============================================================================ |
| 5 | +# 服务器配置 |
| 6 | +# ============================================================================ |
| 7 | +[server] |
| 8 | +# 监听地址 |
| 9 | +listen_host = "127.0.0.1" |
| 10 | +# 监听端口 |
| 11 | +listen_port = 8787 |
| 12 | +# 调试模式 |
| 13 | +debug = false |
| 14 | +# 请求超时(秒) |
| 15 | +timeout = 120 |
| 16 | +# 速率限制(每5分钟窗口) |
| 17 | +rate_limit_requests = 100 |
| 18 | +# 最大请求体大小(字节) |
| 19 | +max_request_body_size = 10485760 |
| 20 | + |
| 21 | +# ============================================================================ |
| 22 | +# 认证配置 |
| 23 | +# ============================================================================ |
| 24 | +[auth] |
| 25 | +# 服务商: zhipu, zhipu_v2, aliyun, minimax, deepseek, moonshot, custom |
| 26 | +provider = "zhipu" |
| 27 | +# Coding Plan API Key (用于向云厂商发起请求) |
| 28 | +# 获取方式: https://open.bigmodel.cn/ |
| 29 | +api_key = "" |
| 30 | +# 本地 API Key (客户端连接代理时使用,留空则不验证) |
| 31 | +local_api_key = "sk-local-your-secret-key" |
| 32 | + |
| 33 | +# ============================================================================ |
| 34 | +# 端点配置 |
| 35 | +# ============================================================================ |
| 36 | +[endpoint] |
| 37 | +# 是否使用 Coding Plan 端点 |
| 38 | +use_coding_endpoint = true |
| 39 | +# 伪装工具: opencode, openclaw, custom |
| 40 | +disguise_tool = "opencode" |
| 41 | +# 自定义 User-Agent (留空使用默认,仅当 disguise_tool = "custom" 时生效) |
| 42 | +custom_user_agent = "" |
| 43 | + |
| 44 | +# ============================================================================ |
| 45 | +# API URL 配置 (可选 - 自定义 API 端点) |
| 46 | +# 如果需要使用自定义 API 地址,可以在这里配置 |
| 47 | +# ============================================================================ |
| 48 | +[api] |
| 49 | +# 自定义 API 基础 URL (留空使用服务商默认地址) |
| 50 | +# 示例: base_url = "https://api.example.com/v1" |
| 51 | +base_url = "" |
| 52 | +# Coding Plan 端点 URL (留空使用服务商默认地址或 base_url) |
| 53 | +# 示例: coding_url = "https://api.example.com/coding/v1" |
| 54 | +coding_url = "" |
| 55 | +# 认证头名称 (留空使用默认 "Authorization") |
| 56 | +auth_header = "" |
| 57 | +# 认证前缀 (留空使用默认 "Bearer ") |
| 58 | +auth_prefix = "" |
| 59 | + |
| 60 | +# ============================================================================ |
| 61 | +# 服务商默认 URL 参考 |
| 62 | +# ============================================================================ |
| 63 | +# zhipu: https://open.bigmodel.cn/api/coding/paas/v4 |
| 64 | +# zhipu_v2: https://api.z.ai/api/coding/paas/v4 |
| 65 | +# aliyun: https://dashscope.aliyuncs.com/compatible-mode/v1 |
| 66 | +# minimax: https://api.minimax.chat/v1 |
| 67 | +# deepseek: https://api.deepseek.com/v1 |
| 68 | +# moonshot: https://api.moonshot.cn/v1 |
| 69 | + |
| 70 | +# ============================================================================ |
| 71 | +# 自定义服务商示例 (provider = "custom") |
| 72 | +# ============================================================================ |
| 73 | +# [auth] |
| 74 | +# provider = "custom" |
| 75 | +# |
| 76 | +# [api] |
| 77 | +# base_url = "https://your-custom-api.com/v1" |
| 78 | +# coding_url = "https://your-custom-api.com/coding/v1" |
| 79 | +# auth_header = "Authorization" |
| 80 | +# auth_prefix = "Bearer " |
0 commit comments