coding-proxy 0.2.0a1__py3-none-any.whl → 0.2.0a2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of coding-proxy might be problematic. Click here for more details.
- coding/proxy/config/config.default.yaml +71 -70
- coding/proxy/config/routing.py +2 -0
- {coding_proxy-0.2.0a1.dist-info → coding_proxy-0.2.0a2.dist-info}/METADATA +1 -1
- {coding_proxy-0.2.0a1.dist-info → coding_proxy-0.2.0a2.dist-info}/RECORD +7 -7
- {coding_proxy-0.2.0a1.dist-info → coding_proxy-0.2.0a2.dist-info}/WHEEL +0 -0
- {coding_proxy-0.2.0a1.dist-info → coding_proxy-0.2.0a2.dist-info}/entry_points.txt +0 -0
- {coding_proxy-0.2.0a1.dist-info → coding_proxy-0.2.0a2.dist-info}/licenses/LICENSE +0 -0
|
@@ -26,12 +26,12 @@ logging:
|
|
|
26
26
|
# 示例 3:将 zhipu 提升为首选,anthropic 作为后备
|
|
27
27
|
# tiers: ["zhipu", "anthropic"]
|
|
28
28
|
|
|
29
|
-
tiers: ["
|
|
29
|
+
tiers: ["zhipu", "anthropic", "copilot", "antigravity"]
|
|
30
30
|
|
|
31
31
|
# === 供应商定义(vendors 列表) ===
|
|
32
32
|
#
|
|
33
33
|
# 每个 vendor 通过 vendor 字段指定供应商类型:
|
|
34
|
-
# anthropic |
|
|
34
|
+
# anthropic | zhipu | minimax | alibaba | xiaomi | kimi | doubao | copilot | antigravity
|
|
35
35
|
#
|
|
36
36
|
# 优先级规则:
|
|
37
37
|
# - 若配置了 tiers,以其指定的顺序为准
|
|
@@ -101,6 +101,7 @@ vendors:
|
|
|
101
101
|
|
|
102
102
|
# Vendor 3: 智谱 GLM(终端兜底,无 circuit_breaker)
|
|
103
103
|
- vendor: zhipu
|
|
104
|
+
enabled: true
|
|
104
105
|
base_url: "https://open.bigmodel.cn/api/anthropic"
|
|
105
106
|
api_key: "${ZHIPU_API_KEY}"
|
|
106
107
|
timeout_ms: 3000000
|
|
@@ -127,75 +128,75 @@ vendors:
|
|
|
127
128
|
recovery_timeout_seconds: 300
|
|
128
129
|
success_threshold: 2
|
|
129
130
|
quota_guard:
|
|
130
|
-
enabled:
|
|
131
|
+
enabled: false
|
|
131
132
|
token_budget: 1000000000
|
|
132
133
|
window_hours: 24.0
|
|
133
134
|
threshold_percent: 95.0
|
|
134
135
|
probe_interval_seconds: 300
|
|
135
136
|
|
|
136
|
-
# Vendor 5:
|
|
137
|
-
- vendor:
|
|
137
|
+
# Vendor 5: 阿里 Qwen(默认禁用)
|
|
138
|
+
- vendor: alibaba
|
|
138
139
|
enabled: false
|
|
139
|
-
base_url: "https://
|
|
140
|
-
api_key: "${
|
|
140
|
+
base_url: "https://coding-intl.dashscope.aliyuncs.com/apps/anthropic"
|
|
141
|
+
api_key: "${ALIBABA_API_KEY}"
|
|
141
142
|
timeout_ms: 3000000
|
|
142
143
|
circuit_breaker:
|
|
143
144
|
failure_threshold: 3
|
|
144
145
|
recovery_timeout_seconds: 300
|
|
145
146
|
success_threshold: 2
|
|
146
147
|
quota_guard:
|
|
147
|
-
enabled:
|
|
148
|
+
enabled: false
|
|
148
149
|
token_budget: 1000000000
|
|
149
150
|
window_hours: 24.0
|
|
150
151
|
threshold_percent: 95.0
|
|
151
152
|
probe_interval_seconds: 300
|
|
152
153
|
|
|
153
|
-
# Vendor 6:
|
|
154
|
-
- vendor:
|
|
154
|
+
# Vendor 6: 小米 MiMo(默认禁用)
|
|
155
|
+
- vendor: xiaomi
|
|
155
156
|
enabled: false
|
|
156
|
-
base_url: "https://
|
|
157
|
-
api_key: "${
|
|
157
|
+
base_url: "https://token-plan-cn.xiaomimimo.com/anthropic"
|
|
158
|
+
api_key: "${XIAOMI_API_KEY}"
|
|
158
159
|
timeout_ms: 3000000
|
|
159
160
|
circuit_breaker:
|
|
160
161
|
failure_threshold: 3
|
|
161
162
|
recovery_timeout_seconds: 300
|
|
162
163
|
success_threshold: 2
|
|
163
164
|
quota_guard:
|
|
164
|
-
enabled:
|
|
165
|
+
enabled: false
|
|
165
166
|
token_budget: 1000000000
|
|
166
167
|
window_hours: 24.0
|
|
167
168
|
threshold_percent: 95.0
|
|
168
169
|
probe_interval_seconds: 300
|
|
169
170
|
|
|
170
|
-
# Vendor 7:
|
|
171
|
-
- vendor:
|
|
171
|
+
# Vendor 7: Kimi(默认禁用)
|
|
172
|
+
- vendor: kimi
|
|
172
173
|
enabled: false
|
|
173
|
-
base_url: "https://
|
|
174
|
-
api_key: "${
|
|
174
|
+
base_url: "https://api.kimi.com/coding/"
|
|
175
|
+
api_key: "${KIMI_API_KEY}"
|
|
175
176
|
timeout_ms: 3000000
|
|
176
177
|
circuit_breaker:
|
|
177
178
|
failure_threshold: 3
|
|
178
179
|
recovery_timeout_seconds: 300
|
|
179
180
|
success_threshold: 2
|
|
180
181
|
quota_guard:
|
|
181
|
-
enabled:
|
|
182
|
+
enabled: false
|
|
182
183
|
token_budget: 1000000000
|
|
183
184
|
window_hours: 24.0
|
|
184
185
|
threshold_percent: 95.0
|
|
185
186
|
probe_interval_seconds: 300
|
|
186
187
|
|
|
187
|
-
# Vendor 8:
|
|
188
|
-
- vendor:
|
|
188
|
+
# Vendor 8: 豆包 Doubao(默认禁用)
|
|
189
|
+
- vendor: doubao
|
|
189
190
|
enabled: false
|
|
190
|
-
base_url: "https://
|
|
191
|
-
api_key: "${
|
|
191
|
+
base_url: "https://ark.cn-beijing.volces.com/api/coding"
|
|
192
|
+
api_key: "${ARK_API_KEY}"
|
|
192
193
|
timeout_ms: 3000000
|
|
193
194
|
circuit_breaker:
|
|
194
195
|
failure_threshold: 3
|
|
195
196
|
recovery_timeout_seconds: 300
|
|
196
197
|
success_threshold: 2
|
|
197
198
|
quota_guard:
|
|
198
|
-
enabled:
|
|
199
|
+
enabled: false
|
|
199
200
|
token_budget: 1000000000
|
|
200
201
|
window_hours: 24.0
|
|
201
202
|
threshold_percent: 95.0
|
|
@@ -264,6 +265,32 @@ model_mapping:
|
|
|
264
265
|
vendors: ["minimax"]
|
|
265
266
|
target: "minimax-m2.7"
|
|
266
267
|
is_regex: true
|
|
268
|
+
# 阿里 Qwen 模型映射(原生 Anthropic 兼容端点)
|
|
269
|
+
- pattern: "claude-sonnet-.*"
|
|
270
|
+
vendors: ["alibaba"]
|
|
271
|
+
target: "qwen3.6-plus"
|
|
272
|
+
is_regex: true
|
|
273
|
+
- pattern: "claude-opus-.*"
|
|
274
|
+
vendors: ["alibaba"]
|
|
275
|
+
target: "qwen3.6-plus"
|
|
276
|
+
is_regex: true
|
|
277
|
+
- pattern: "claude-haiku-.*"
|
|
278
|
+
vendors: ["alibaba"]
|
|
279
|
+
target: "qwen3.6-plus"
|
|
280
|
+
is_regex: true
|
|
281
|
+
# 小米 MiMo 模型映射(原生 Anthropic 兼容端点)
|
|
282
|
+
- pattern: "claude-sonnet-.*"
|
|
283
|
+
vendors: ["xiaomi"]
|
|
284
|
+
target: "mimo-v2-pro"
|
|
285
|
+
is_regex: true
|
|
286
|
+
- pattern: "claude-opus-.*"
|
|
287
|
+
vendors: ["xiaomi"]
|
|
288
|
+
target: "mimo-v2-pro"
|
|
289
|
+
is_regex: true
|
|
290
|
+
- pattern: "claude-haiku-.*"
|
|
291
|
+
vendors: ["xiaomi"]
|
|
292
|
+
target: "mimo-v2-pro"
|
|
293
|
+
is_regex: true
|
|
267
294
|
# Kimi 模型映射(原生 Anthropic 兼容端点)
|
|
268
295
|
- pattern: "claude-sonnet-.*"
|
|
269
296
|
vendors: ["kimi"]
|
|
@@ -290,32 +317,6 @@ model_mapping:
|
|
|
290
317
|
vendors: ["doubao"]
|
|
291
318
|
target: "doubao-seed-2.0-lite"
|
|
292
319
|
is_regex: true
|
|
293
|
-
# 小米 MiMo 模型映射(原生 Anthropic 兼容端点)
|
|
294
|
-
- pattern: "claude-sonnet-.*"
|
|
295
|
-
vendors: ["xiaomi"]
|
|
296
|
-
target: "mimo-v2-pro"
|
|
297
|
-
is_regex: true
|
|
298
|
-
- pattern: "claude-opus-.*"
|
|
299
|
-
vendors: ["xiaomi"]
|
|
300
|
-
target: "mimo-v2-pro"
|
|
301
|
-
is_regex: true
|
|
302
|
-
- pattern: "claude-haiku-.*"
|
|
303
|
-
vendors: ["xiaomi"]
|
|
304
|
-
target: "mimo-v2-pro"
|
|
305
|
-
is_regex: true
|
|
306
|
-
# 阿里 Qwen 模型映射(原生 Anthropic 兼容端点)
|
|
307
|
-
- pattern: "claude-sonnet-.*"
|
|
308
|
-
vendors: ["alibaba"]
|
|
309
|
-
target: "qwen3.6-plus"
|
|
310
|
-
is_regex: true
|
|
311
|
-
- pattern: "claude-opus-.*"
|
|
312
|
-
vendors: ["alibaba"]
|
|
313
|
-
target: "qwen3.6-plus"
|
|
314
|
-
is_regex: true
|
|
315
|
-
- pattern: "claude-haiku-.*"
|
|
316
|
-
vendors: ["alibaba"]
|
|
317
|
-
target: "qwen3.6-plus"
|
|
318
|
-
is_regex: true
|
|
319
320
|
|
|
320
321
|
# === 模型定价(USD / 1M tokens) ===
|
|
321
322
|
# vendor: 供应商名称(对应 `usage` 统计表中的"供应商"列)
|
|
@@ -434,6 +435,27 @@ pricing:
|
|
|
434
435
|
output_cost_per_mtok: ¥8.40
|
|
435
436
|
cache_write_cost_per_mtok: ¥2.625
|
|
436
437
|
cache_read_cost_per_mtok: ¥0.21
|
|
438
|
+
# ── 阿里 Qwen ──
|
|
439
|
+
- vendor: alibaba
|
|
440
|
+
model: qwen3.6-plus
|
|
441
|
+
input_cost_per_mtok: $0.276
|
|
442
|
+
output_cost_per_mtok: $1.651
|
|
443
|
+
# ── 小米 MiMo ──
|
|
444
|
+
- vendor: xiaomi
|
|
445
|
+
model: mimo-v2-pro
|
|
446
|
+
input_cost_per_mtok: ¥7.00
|
|
447
|
+
output_cost_per_mtok: ¥21.00
|
|
448
|
+
cache_read_cost_per_mtok: ¥1.40
|
|
449
|
+
- vendor: xiaomi
|
|
450
|
+
model: mimo-v2-omni
|
|
451
|
+
input_cost_per_mtok: ¥2.80
|
|
452
|
+
output_cost_per_mtok: ¥14.00
|
|
453
|
+
cache_read_cost_per_mtok: ¥0.56
|
|
454
|
+
- vendor: xiaomi
|
|
455
|
+
model: mimo-v2-flash
|
|
456
|
+
input_cost_per_mtok: ¥0.70
|
|
457
|
+
output_cost_per_mtok: ¥2.10
|
|
458
|
+
cache_read_cost_per_mtok: ¥0.07
|
|
437
459
|
# ── Kimi ──
|
|
438
460
|
- vendor: kimi
|
|
439
461
|
model: kimi-k2.5
|
|
@@ -458,27 +480,6 @@ pricing:
|
|
|
458
480
|
output_cost_per_mtok: ¥3.60
|
|
459
481
|
cache_write_cost_per_mtok: ¥0.12
|
|
460
482
|
cache_read_cost_per_mtok: ¥0.017
|
|
461
|
-
# ── 小米 MiMo ──
|
|
462
|
-
- vendor: xiaomi
|
|
463
|
-
model: mimo-v2-pro
|
|
464
|
-
input_cost_per_mtok: ¥7.00
|
|
465
|
-
output_cost_per_mtok: ¥21.00
|
|
466
|
-
cache_read_cost_per_mtok: ¥1.40
|
|
467
|
-
- vendor: xiaomi
|
|
468
|
-
model: mimo-v2-omni
|
|
469
|
-
input_cost_per_mtok: ¥2.80
|
|
470
|
-
output_cost_per_mtok: ¥14.00
|
|
471
|
-
cache_read_cost_per_mtok: ¥0.56
|
|
472
|
-
- vendor: xiaomi
|
|
473
|
-
model: mimo-v2-flash
|
|
474
|
-
input_cost_per_mtok: ¥0.70
|
|
475
|
-
output_cost_per_mtok: ¥2.10
|
|
476
|
-
cache_read_cost_per_mtok: ¥0.07
|
|
477
|
-
# ── 阿里 Qwen ──
|
|
478
|
-
- vendor: alibaba
|
|
479
|
-
model: qwen3.6-plus
|
|
480
|
-
input_cost_per_mtok: $0.276
|
|
481
|
-
output_cost_per_mtok: $1.651
|
|
482
483
|
|
|
483
484
|
database:
|
|
484
485
|
path: "~/.coding-proxy/usage.db"
|
coding/proxy/config/routing.py
CHANGED
|
@@ -295,6 +295,8 @@ class VendorConfig(BaseModel):
|
|
|
295
295
|
if vendor_type == self.vendor:
|
|
296
296
|
continue
|
|
297
297
|
for field_name in fields:
|
|
298
|
+
if field_name in exclusive:
|
|
299
|
+
continue
|
|
298
300
|
value = getattr(self, field_name, None)
|
|
299
301
|
if value and value != getattr(
|
|
300
302
|
VendorConfig.model_fields[field_name], "default", None
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coding-proxy
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.0a2
|
|
4
4
|
Summary: A High-Availability, Transparent, and Smart Multi-Vendor Proxy for Claude Code. Support Claude Plans, GitHub Copilot, Google Antigravity, ZAI/GLM.
|
|
5
5
|
Project-URL: Source Code, https://github.com/ThreeFish-AI/coding-proxy
|
|
6
6
|
Project-URL: User Guide, https://github.com/ThreeFish-AI/coding-proxy/blob/master/docs/user-guide.md
|
|
@@ -17,10 +17,10 @@ coding/proxy/compat/canonical.py,sha256=-zcuEwZ402xeH3C545RmuYRkT2HDuvFloyFydDv8
|
|
|
17
17
|
coding/proxy/compat/session_store.py,sha256=B9IFjjQJnHMg1244m__jG9gnqGWi26-JyEtwopEri6Q,5244
|
|
18
18
|
coding/proxy/config/__init__.py,sha256=hzgU5noJGecjj13UY38cC_p6jpWO3GO7okSW-A2XkJ0,127
|
|
19
19
|
coding/proxy/config/auth_schema.py,sha256=LYrJQU_fgW-6AoQdjXt4-MgPJjXjv9HrghlCcZwotnA,696
|
|
20
|
-
coding/proxy/config/config.default.yaml,sha256=
|
|
20
|
+
coding/proxy/config/config.default.yaml,sha256=oVs8vDylKW9MflEZWgroFZlHV1IrqS2UdhyZu2OMtDY,15695
|
|
21
21
|
coding/proxy/config/loader.py,sha256=1J_RBJgjuC8RwB2mwewLMS7vy9WEhUqttZG2igeDm-w,8984
|
|
22
22
|
coding/proxy/config/resiliency.py,sha256=GnzY-LoyfFqXFM1l6xEru418v-cKlv97-HM0noGPdks,1308
|
|
23
|
-
coding/proxy/config/routing.py,sha256=
|
|
23
|
+
coding/proxy/config/routing.py,sha256=aJMhfCRyoZIvemM3Q2_KV9rpWxUsFnoY0ZdCr4TwSs8,11765
|
|
24
24
|
coding/proxy/config/schema.py,sha256=yDPQfxUzJToAfXH-fJxoujXoYAb6WMeq7VyySbvMYC8,12205
|
|
25
25
|
coding/proxy/config/server.py,sha256=um6SJHat9Z_DPjE0AzpdbmbA0fTB0KovUlkNl_eJX-k,509
|
|
26
26
|
coding/proxy/config/vendors.py,sha256=Kw4IctoZBgB4yd7GlnoubWHRrKqmqSC6zY87oH3EPTQ,2796
|
|
@@ -78,8 +78,8 @@ coding/proxy/vendors/native_anthropic.py,sha256=SxtM71PDci0gqLqiwCrFnT410SnSoD7F
|
|
|
78
78
|
coding/proxy/vendors/token_manager.py,sha256=s10t4Com0jNnKGkPyJ_HpG5SjHrCEJvfArEOAaPKA_k,4189
|
|
79
79
|
coding/proxy/vendors/xiaomi.py,sha256=E-GcmJBZh7GOtDFonxZmlf0hKRhrlrXzL0IxHFRYcRo,860
|
|
80
80
|
coding/proxy/vendors/zhipu.py,sha256=3j_rqNFu1CX-B5ugtrL6Y1OeWSy9yiqsVa9Bi1ssaAA,1062
|
|
81
|
-
coding_proxy-0.2.
|
|
82
|
-
coding_proxy-0.2.
|
|
83
|
-
coding_proxy-0.2.
|
|
84
|
-
coding_proxy-0.2.
|
|
85
|
-
coding_proxy-0.2.
|
|
81
|
+
coding_proxy-0.2.0a2.dist-info/METADATA,sha256=XoO6Pxu5OOCNg8X8Rya0rvx85IJfkA9bmUZVZXYjGxc,10782
|
|
82
|
+
coding_proxy-0.2.0a2.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
83
|
+
coding_proxy-0.2.0a2.dist-info/entry_points.txt,sha256=moIVzt5ho0Wk9B47LOo2SEAbhzuDDHWi-EfM30U0XBg,54
|
|
84
|
+
coding_proxy-0.2.0a2.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
85
|
+
coding_proxy-0.2.0a2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|