@agent-proxy/agy 0.12.2 → 0.14.0

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.
Files changed (2) hide show
  1. package/dist/catalog.js +10 -3
  2. package/package.json +4 -4
package/dist/catalog.js CHANGED
@@ -20,7 +20,8 @@ export const AGY_DISPLAY_PREFIX = "AGY/";
20
20
  * (v2:档位家族合并;v3:levels 按实际档位重建;v4:删 web_search_tool_type;
21
21
  * v5:v3/v4 的字段删除改为保留字段置中性值——缺字段疑似导致 Codex 弃用目录;
22
22
  * v6:系统提示词在合成时替换(base_instructions + model_messages 模板))。 */
23
- const CACHE_REVISION = 6;
23
+ /** 目录输出语义修订:变化时旧磁盘缓存整体失效(-disabled 剔除自 7 起)。 */
24
+ const CACHE_REVISION = 7;
24
25
  const CATALOG_TTL_MS = 6 * 60 * 1000;
25
26
  const FAILURE_COOLDOWN_MS = 30_000;
26
27
  const digest = (value) => createHash("sha256").update(JSON.stringify(value)).digest("hex");
@@ -76,6 +77,10 @@ export function parseAgyCatalogData(value) {
76
77
  seen.add(id);
77
78
  if (excluded.has(id))
78
79
  continue;
80
+ // 上游把当前下线的模型保留在目录里并以 `-disabled` 后缀命名,同步时整体剔除;
81
+ // 推荐位/档位里引用的同名 id 由 selection 重排自然跳过。
82
+ if (id.endsWith("-disabled"))
83
+ continue;
79
84
  if (selection !== undefined && !selection.includes(id))
80
85
  continue;
81
86
  const details = record(raw) ?? {};
@@ -109,8 +114,10 @@ export function parseAgyCatalogData(value) {
109
114
  if (deprecated) {
110
115
  for (const [oldId, info] of Object.entries(deprecated)) {
111
116
  const target = record(info);
112
- if (typeof target?.newModelId === "string" && target.newModelId && target.newModelId !== oldId) {
113
- reroute.set(oldId, target.newModelId);
117
+ const newModelId = typeof target?.newModelId === "string" ? target.newModelId : "";
118
+ // 重定向目标已被 `-disabled` 剔除时不产出重定向,避免把可请求的旧 id 指到下线模型。
119
+ if (newModelId && newModelId !== oldId && !newModelId.endsWith("-disabled")) {
120
+ reroute.set(oldId, newModelId);
114
121
  }
115
122
  }
116
123
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agent-proxy/agy",
3
- "version": "0.12.2",
3
+ "version": "0.14.0",
4
4
  "description": "Agent Proxy agy 插件;保留基线转换行为。",
5
5
  "type": "module",
6
6
  "exports": {
@@ -35,10 +35,10 @@
35
35
  "url": "git+https://github.com/aceHubert/codex-cliproxy-gateway.git"
36
36
  },
37
37
  "devDependencies": {
38
- "@agent-proxy/models": "0.12.2"
38
+ "@agent-proxy/models": "0.14.0"
39
39
  },
40
40
  "dependencies": {
41
- "@agent-proxy/plugin-api": "0.12.2"
41
+ "@agent-proxy/plugin-api": "0.14.0"
42
42
  },
43
- "gitHead": "3461eb517c21cd330f2c3495f6bc01ca4191690c"
43
+ "gitHead": "2a7800da5f8ec87fe5232bde145b7a0aa53199c0"
44
44
  }