coding-proxy 0.2.4a2__py3-none-any.whl → 0.2.4a3__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.
- coding/proxy/config/config.default.yaml +1 -1
- coding/proxy/server/dashboard.py +23 -9
- {coding_proxy-0.2.4a2.dist-info → coding_proxy-0.2.4a3.dist-info}/METADATA +3 -3
- {coding_proxy-0.2.4a2.dist-info → coding_proxy-0.2.4a3.dist-info}/RECORD +7 -7
- {coding_proxy-0.2.4a2.dist-info → coding_proxy-0.2.4a3.dist-info}/WHEEL +0 -0
- {coding_proxy-0.2.4a2.dist-info → coding_proxy-0.2.4a3.dist-info}/entry_points.txt +0 -0
- {coding_proxy-0.2.4a2.dist-info → coding_proxy-0.2.4a3.dist-info}/licenses/LICENSE +0 -0
coding/proxy/server/dashboard.py
CHANGED
|
@@ -911,8 +911,21 @@ function updateVendorStatus(status) {
|
|
|
911
911
|
}).join('');
|
|
912
912
|
}
|
|
913
913
|
|
|
914
|
+
// ── 按 tiers 顺序排序 vendor 列表 ─────────────────────────
|
|
915
|
+
function sortByTierOrder(vendors, tierOrder) {
|
|
916
|
+
if (!tierOrder || !tierOrder.length) return vendors.sort();
|
|
917
|
+
const orderMap = {};
|
|
918
|
+
tierOrder.forEach((name, i) => { orderMap[name] = i; });
|
|
919
|
+
const maxIdx = tierOrder.length;
|
|
920
|
+
return vendors.sort((a, b) => {
|
|
921
|
+
const ia = orderMap[a] ?? maxIdx;
|
|
922
|
+
const ib = orderMap[b] ?? maxIdx;
|
|
923
|
+
return ia !== ib ? ia - ib : a.localeCompare(b);
|
|
924
|
+
});
|
|
925
|
+
}
|
|
926
|
+
|
|
914
927
|
// ── 时序折线图(请求量,按 vendor)────────────────────────
|
|
915
|
-
function buildTimeline(rows) {
|
|
928
|
+
function buildTimeline(rows, tierOrder) {
|
|
916
929
|
const vendorDateMap = {};
|
|
917
930
|
const allDates = new Set();
|
|
918
931
|
for (const r of rows) {
|
|
@@ -923,7 +936,7 @@ function buildTimeline(rows) {
|
|
|
923
936
|
allDates.add(d);
|
|
924
937
|
}
|
|
925
938
|
const dates = [...allDates].sort();
|
|
926
|
-
const vendors = Object.keys(vendorDateMap)
|
|
939
|
+
const vendors = sortByTierOrder(Object.keys(vendorDateMap), tierOrder);
|
|
927
940
|
|
|
928
941
|
if (chartTimeline) chartTimeline.destroy();
|
|
929
942
|
const ctx = document.getElementById('chart-timeline').getContext('2d');
|
|
@@ -962,14 +975,14 @@ function buildTimeline(rows) {
|
|
|
962
975
|
}
|
|
963
976
|
|
|
964
977
|
// ── 供应商分布环形图 ──────────────────────────────────────
|
|
965
|
-
function buildVendorDist(rows) {
|
|
978
|
+
function buildVendorDist(rows, tierOrder) {
|
|
966
979
|
const vendorTotals = {};
|
|
967
980
|
for (const r of rows) {
|
|
968
981
|
const v = r.vendor;
|
|
969
982
|
if (!isValidLabel(v)) continue;
|
|
970
983
|
vendorTotals[v] = (vendorTotals[v] || 0) + (r.total_requests || 0);
|
|
971
984
|
}
|
|
972
|
-
const labels = Object.keys(vendorTotals)
|
|
985
|
+
const labels = sortByTierOrder(Object.keys(vendorTotals), tierOrder);
|
|
973
986
|
const data = labels.map(v => vendorTotals[v]);
|
|
974
987
|
|
|
975
988
|
if (chartVendorDist) chartVendorDist.destroy();
|
|
@@ -1027,7 +1040,7 @@ function buildVendorDist(rows) {
|
|
|
1027
1040
|
}
|
|
1028
1041
|
|
|
1029
1042
|
// ── Token 量趋势折线图(按 vendor)───────────────────────
|
|
1030
|
-
function buildTokenTimeline(rows) {
|
|
1043
|
+
function buildTokenTimeline(rows, tierOrder) {
|
|
1031
1044
|
const vendorDateMap = {};
|
|
1032
1045
|
const allDates = new Set();
|
|
1033
1046
|
for (const r of rows) {
|
|
@@ -1040,7 +1053,7 @@ function buildTokenTimeline(rows) {
|
|
|
1040
1053
|
allDates.add(d);
|
|
1041
1054
|
}
|
|
1042
1055
|
const dates = [...allDates].sort();
|
|
1043
|
-
const vendors = Object.keys(vendorDateMap)
|
|
1056
|
+
const vendors = sortByTierOrder(Object.keys(vendorDateMap), tierOrder);
|
|
1044
1057
|
|
|
1045
1058
|
if (chartTokenTimeline) chartTokenTimeline.destroy();
|
|
1046
1059
|
const ctx = document.getElementById('chart-token-timeline').getContext('2d');
|
|
@@ -1258,9 +1271,10 @@ async function refresh() {
|
|
|
1258
1271
|
updateChartTitles(days);
|
|
1259
1272
|
|
|
1260
1273
|
const rows = timeline.rows || [];
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1274
|
+
const tierOrder = (status.tiers || []).map(t => t.name);
|
|
1275
|
+
buildTimeline(rows, tierOrder);
|
|
1276
|
+
buildVendorDist(rows, tierOrder);
|
|
1277
|
+
buildTokenTimeline(rows, tierOrder);
|
|
1264
1278
|
buildModelTokenTimeline(rows);
|
|
1265
1279
|
|
|
1266
1280
|
document.getElementById('refresh-time').textContent = '上次刷新: ' + now();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: coding-proxy
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.4a3
|
|
4
4
|
Summary: A High-Availability, Transparent, and Smart Multi-Vendor Proxy for Claude Code. Support Claude Plans, GitHub Copilot, Google Antigravity, ZAI/GLM, MiniMax, Qwen, Xiaomi, Kimi, Doubao...
|
|
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
|
|
@@ -145,7 +145,7 @@ graph RL
|
|
|
145
145
|
|
|
146
146
|
subgraph CodingProxy["⚡ coding-proxy"]
|
|
147
147
|
direction RL
|
|
148
|
-
|
|
148
|
+
|
|
149
149
|
Router["RequestRouter<br/><code>routing/router.py</code>"]:::router
|
|
150
150
|
|
|
151
151
|
Router -->NTier
|
|
@@ -178,7 +178,7 @@ graph RL
|
|
|
178
178
|
Tier2 -. "🆘 Safety Net Downgrade" .-> TierN
|
|
179
179
|
end
|
|
180
180
|
|
|
181
|
-
end
|
|
181
|
+
end
|
|
182
182
|
|
|
183
183
|
Client -->|"POST /v1/messages"| CodingProxy
|
|
184
184
|
```
|
|
@@ -17,7 +17,7 @@ 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=Q7pfvyVfm63sBGsw5OWyBHILi4vp_ANcRQAfU_q-T9g,16579
|
|
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
23
|
coding/proxy/config/routing.py,sha256=aJMhfCRyoZIvemM3Q2_KV9rpWxUsFnoY0ZdCr4TwSs8,11765
|
|
@@ -56,7 +56,7 @@ coding/proxy/routing/usage_parser.py,sha256=j4G0ArFduQ2D4Yeuad94DVlwdc-JvSh7SJLV
|
|
|
56
56
|
coding/proxy/routing/usage_recorder.py,sha256=pObOrX2yIITTiyojl1fJcqO0yWWpbP4KqsJvFdmlt04,6273
|
|
57
57
|
coding/proxy/server/__init__.py,sha256=KeH7mEu36v9v27m3VgeSxSeFz9sLTJrxS_EVATJ7Vks,20
|
|
58
58
|
coding/proxy/server/app.py,sha256=kRGgb772dZu8200LPnn7Nt0IU5oagcbBf_Vc5ynxxzE,5599
|
|
59
|
-
coding/proxy/server/dashboard.py,sha256=
|
|
59
|
+
coding/proxy/server/dashboard.py,sha256=sCGuqBFqCrwB6zoyYXDdIfadZphHHhKJ9A9GjiHSHQU,55210
|
|
60
60
|
coding/proxy/server/factory.py,sha256=w8VFvxoogw9K9sO8MlT6bIP7xM7mR6sCohrZle9y_Gg,9985
|
|
61
61
|
coding/proxy/server/request_normalizer.py,sha256=1T2aqZFdB8kdLQsLJsXgEmi-z6d5OhaVv0dER8Vk6I4,21884
|
|
62
62
|
coding/proxy/server/responses.py,sha256=i0ugnLRNOdRYGHEWxkwsxR35ChmdMQsSaD8AjRluTn4,2167
|
|
@@ -80,8 +80,8 @@ coding/proxy/vendors/native_anthropic.py,sha256=SxtM71PDci0gqLqiwCrFnT410SnSoD7F
|
|
|
80
80
|
coding/proxy/vendors/token_manager.py,sha256=s10t4Com0jNnKGkPyJ_HpG5SjHrCEJvfArEOAaPKA_k,4189
|
|
81
81
|
coding/proxy/vendors/xiaomi.py,sha256=E-GcmJBZh7GOtDFonxZmlf0hKRhrlrXzL0IxHFRYcRo,860
|
|
82
82
|
coding/proxy/vendors/zhipu.py,sha256=3j_rqNFu1CX-B5ugtrL6Y1OeWSy9yiqsVa9Bi1ssaAA,1062
|
|
83
|
-
coding_proxy-0.2.
|
|
84
|
-
coding_proxy-0.2.
|
|
85
|
-
coding_proxy-0.2.
|
|
86
|
-
coding_proxy-0.2.
|
|
87
|
-
coding_proxy-0.2.
|
|
83
|
+
coding_proxy-0.2.4a3.dist-info/METADATA,sha256=qq4Z85g_AopMa_tZ5IjWsjgzRMQYNPF6yWQjQ7FhN1M,10880
|
|
84
|
+
coding_proxy-0.2.4a3.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
|
|
85
|
+
coding_proxy-0.2.4a3.dist-info/entry_points.txt,sha256=moIVzt5ho0Wk9B47LOo2SEAbhzuDDHWi-EfM30U0XBg,54
|
|
86
|
+
coding_proxy-0.2.4a3.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
87
|
+
coding_proxy-0.2.4a3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|