-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig.toml
More file actions
90 lines (84 loc) · 3.51 KB
/
config.toml
File metadata and controls
90 lines (84 loc) · 3.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
# Coding Plan Mask 配置文件
# 文档: https://github.com/systemime/coding-plan-mask
# ============================================================================
# 服务器配置
# ============================================================================
[server]
# 监听地址
listen_host = "127.0.0.1"
# 监听端口
listen_port = 8787
# 调试模式
debug = false
# 请求超时(秒)
timeout = 120
# 速率限制(每5分钟窗口)
rate_limit_requests = 100
# 最大请求体大小(字节)
max_request_body_size = 10485760
# ============================================================================
# 认证配置
# ============================================================================
[auth]
# 服务商: zhipu, zhipu_v2, aliyun, minimax, deepseek, moonshot, custom
provider = "zhipu"
# Coding Plan API Key (用于向云厂商发起请求)
# 获取方式: https://open.bigmodel.cn/
api_key = ""
# 本地 API Key (客户端连接代理时使用,留空则不验证)
local_api_key = "sk-local-your-secret-key"
# ============================================================================
# 端点配置
# ============================================================================
[endpoint]
# 是否使用 Coding Plan 端点
use_coding_endpoint = true
# 伪装工具: claudecode, kimicode, openclaw, custom
# 兼容旧值: opencode
disguise_tool = "claudecode"
# Claude Code 模式的默认 User-Agent
# 默认值基于当前 Claude Code CLI 的真实请求格式
claude_code_user_agent = "claude-cli/2.1.76 (external, cli)"
# OpenClaw 模式的兼容默认 User-Agent
# 该值用于兼容部分 OpenClaw 请求路径,可按需覆盖
openclaw_user_agent = "OpenClaw-Gateway/1.0"
# OpenCode 模式的默认 User-Agent
# 默认值基于本地抓包报告中的 OpenCode 1.2.27 请求格式
opencode_user_agent = "opencode/1.2.27 ai-sdk/provider-utils/3.0.20 runtime/bun/1.3.10"
# 自定义 User-Agent (留空使用默认,仅当 disguise_tool = "custom" 时生效)
custom_user_agent = ""
# ============================================================================
# API URL 配置 (可选 - 自定义 API 端点)
# 如果需要使用自定义 API 地址,可以在这里配置
# ============================================================================
[api]
# 自定义 API 基础 URL (留空使用服务商默认地址)
# 示例: base_url = "https://api.example.com/v1"
base_url = ""
# Coding Plan 端点 URL (留空使用服务商默认地址或 base_url)
# 示例: coding_url = "https://api.example.com/coding/v1"
coding_url = ""
# 认证头名称 (留空使用默认 "Authorization")
auth_header = ""
# 认证前缀 (留空使用默认 "Bearer ")
auth_prefix = ""
# ============================================================================
# 服务商默认 URL 参考
# ============================================================================
# zhipu: https://open.bigmodel.cn/api/coding/paas/v4
# zhipu_v2: https://api.z.ai/api/coding/paas/v4
# aliyun: https://dashscope.aliyuncs.com/compatible-mode/v1
# minimax: https://api.minimax.chat/v1
# deepseek: https://api.deepseek.com/v1
# moonshot: https://api.moonshot.cn/v1
# ============================================================================
# 自定义服务商示例 (provider = "custom")
# ============================================================================
# [auth]
# provider = "custom"
#
# [api]
# base_url = "https://your-custom-api.com/v1"
# coding_url = "https://your-custom-api.com/coding/v1"
# auth_header = "Authorization"
# auth_prefix = "Bearer "