@tscgoods/antigravity-effort-discovery 0.3.0 → 0.4.3
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.
- package/package.json +2 -2
- package/scripts/probe.mjs +9 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tscgoods/antigravity-effort-discovery",
|
|
3
|
-
"version": "0.3
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "Antigravity CLI plugin: probe which reasoning-effort levels your gateway accepts, inject the result into sessions, and optionally generate customModels entries.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,4 +30,4 @@
|
|
|
30
30
|
"engines": {
|
|
31
31
|
"node": ">=20"
|
|
32
32
|
}
|
|
33
|
-
}
|
|
33
|
+
}
|
package/scripts/probe.mjs
CHANGED
|
@@ -87,13 +87,18 @@ for (const model of models) {
|
|
|
87
87
|
headers: entry.headers ?? {},
|
|
88
88
|
})
|
|
89
89
|
const agy = args.agy ? agyAvailable(model) : undefined
|
|
90
|
+
|
|
91
|
+
// 网关不校验时,agy 自己的模型元数据是唯一可信来源
|
|
92
|
+
const gatewayLevels = Array.isArray(probed.levels) && probed.levels.length > 0 ? probed.levels : null
|
|
93
|
+
const authority = gatewayLevels ? "gateway" : Array.isArray(agy) && agy.length > 0 ? "agy" : null
|
|
94
|
+
const base = gatewayLevels ?? (Array.isArray(agy) && agy.length > 0 ? agy : null)
|
|
95
|
+
|
|
90
96
|
result.models[model] = {
|
|
91
97
|
...probed,
|
|
92
98
|
agyAvailable: agy ?? null,
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
: null,
|
|
99
|
+
authority,
|
|
100
|
+
/// 实际可用档位:网关证据优先,否则用 agy 自身元数据兜底
|
|
101
|
+
effective: base ? base.filter((level) => AGY_LEVELS.includes(level)) : null,
|
|
97
102
|
}
|
|
98
103
|
await new Promise((resolve) => setTimeout(resolve, 200))
|
|
99
104
|
}
|