@agent-proxy/zcode 0.20.1 → 0.20.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/dist/catalog.d.ts +6 -1
- package/dist/catalog.js +23 -18
- package/dist/resources/models.js +0 -4
- package/package.json +5 -5
package/dist/catalog.d.ts
CHANGED
|
@@ -13,7 +13,12 @@ export declare function zcodeAPIProviderIDFromModel(model: string): string | und
|
|
|
13
13
|
export declare function zcodeUpstreamModel(model: string, snapshot: ZcodeProviderSnapshot): string | undefined;
|
|
14
14
|
/**
|
|
15
15
|
* 仅由模型包的厂商预设合成全量裸 ID 目录。纯内存计算,
|
|
16
|
-
*
|
|
16
|
+
* 重建成本与模型条数同级,不需要磁盘缓存,不携带任何套餐或授权信息。
|
|
17
|
+
* 合成策略与其余 agent 插件(agy/qoder/zen/codebuddy)一致:以 Codex 基线整包
|
|
18
|
+
* 克隆为底座,厂商预设作为自定义替换层逐字段覆盖——tool_mode、multi_agent_version、
|
|
19
|
+
* use_responses_lite 等 Codex 行为字段默认继承基线(客户端据此组装 additional_tools
|
|
20
|
+
* 与全量 MCP 工具集),z.ai 预设声明真实能力(context_window、reasoning 档位)并以
|
|
21
|
+
* 空值中和不适用的基线字段(base_instructions 置空、experimental_supported_tools 清空)。
|
|
17
22
|
*/
|
|
18
23
|
export declare function buildZcodeVendorCatalog(): ModelCatalog;
|
|
19
24
|
/** /models 只按快照套餐的支持集合筛选并加套餐作用域前缀,不重新合成厂商元数据。 */
|
package/dist/catalog.js
CHANGED
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import fs from "node:fs";
|
|
2
2
|
import { createHash } from "node:crypto";
|
|
3
|
-
import { getVendorModelPresets } from "./resources/models.js";
|
|
4
|
-
import { compileModelOverrides, synthesizeModelEntry } from "@agent-proxy/plugin-api";
|
|
3
|
+
import { getCodexBaselineEntry, getVendorModelPresets } from "./resources/models.js";
|
|
5
4
|
import { atomicWrite } from "@agent-proxy/plugin-api";
|
|
6
5
|
const vendorModelIds = () => (getVendorModelPresets()["z.ai"] ?? []).map((model) => model.name);
|
|
7
6
|
/** 旧版单 API Key 命名空间;新版多 Key 目录不再生成该前缀。 */
|
|
@@ -84,24 +83,30 @@ function stripZcodeChannelLabel(name) {
|
|
|
84
83
|
}
|
|
85
84
|
/**
|
|
86
85
|
* 仅由模型包的厂商预设合成全量裸 ID 目录。纯内存计算,
|
|
87
|
-
*
|
|
86
|
+
* 重建成本与模型条数同级,不需要磁盘缓存,不携带任何套餐或授权信息。
|
|
87
|
+
* 合成策略与其余 agent 插件(agy/qoder/zen/codebuddy)一致:以 Codex 基线整包
|
|
88
|
+
* 克隆为底座,厂商预设作为自定义替换层逐字段覆盖——tool_mode、multi_agent_version、
|
|
89
|
+
* use_responses_lite 等 Codex 行为字段默认继承基线(客户端据此组装 additional_tools
|
|
90
|
+
* 与全量 MCP 工具集),z.ai 预设声明真实能力(context_window、reasoning 档位)并以
|
|
91
|
+
* 空值中和不适用的基线字段(base_instructions 置空、experimental_supported_tools 清空)。
|
|
88
92
|
*/
|
|
89
93
|
export function buildZcodeVendorCatalog() {
|
|
90
|
-
const
|
|
91
|
-
const
|
|
92
|
-
const
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
94
|
+
const presets = getVendorModelPresets()["z.ai"] ?? [];
|
|
95
|
+
const base = getCodexBaselineEntry();
|
|
96
|
+
const models = presets.map((preset, index) => {
|
|
97
|
+
const { name, display_name, ...overrides } = preset;
|
|
98
|
+
const entry = { ...structuredClone(base), ...overrides };
|
|
99
|
+
entry.slug = name;
|
|
100
|
+
entry.display_name = typeof display_name === "string" && display_name ? display_name : name;
|
|
101
|
+
entry.priority = index;
|
|
102
|
+
return entry;
|
|
103
|
+
});
|
|
104
|
+
return { models: models.map((entry) => ({
|
|
105
|
+
...entry,
|
|
106
|
+
prefer_websockets: false,
|
|
107
|
+
// zcode 链路已把 Responses web_search 原生映射为 web_search_20250305(实测 z.ai 支持)。
|
|
108
|
+
supports_search_tool: true,
|
|
109
|
+
})) };
|
|
105
110
|
}
|
|
106
111
|
/** /models 只按快照套餐的支持集合筛选并加套餐作用域前缀,不重新合成厂商元数据。 */
|
|
107
112
|
export function createZcodeCatalog(snapshot, cached) {
|
package/dist/resources/models.js
CHANGED
|
@@ -5871,7 +5871,6 @@ var vendor_models_default = {
|
|
|
5871
5871
|
max_context_window: 1048576,
|
|
5872
5872
|
effective_context_window_percent: 95,
|
|
5873
5873
|
supports_parallel_tool_calls: true,
|
|
5874
|
-
experimental_supported_tools: [],
|
|
5875
5874
|
input_modalities: ["text", "image"]
|
|
5876
5875
|
},
|
|
5877
5876
|
{
|
|
@@ -5910,7 +5909,6 @@ var vendor_models_default = {
|
|
|
5910
5909
|
max_context_window: 1048576,
|
|
5911
5910
|
effective_context_window_percent: 95,
|
|
5912
5911
|
supports_parallel_tool_calls: true,
|
|
5913
|
-
experimental_supported_tools: [],
|
|
5914
5912
|
input_modalities: ["text", "image"]
|
|
5915
5913
|
},
|
|
5916
5914
|
{
|
|
@@ -5949,7 +5947,6 @@ var vendor_models_default = {
|
|
|
5949
5947
|
max_context_window: 1048576,
|
|
5950
5948
|
effective_context_window_percent: 95,
|
|
5951
5949
|
supports_parallel_tool_calls: true,
|
|
5952
|
-
experimental_supported_tools: [],
|
|
5953
5950
|
input_modalities: ["text", "image"]
|
|
5954
5951
|
},
|
|
5955
5952
|
{
|
|
@@ -5975,7 +5972,6 @@ var vendor_models_default = {
|
|
|
5975
5972
|
max_context_window: 204800,
|
|
5976
5973
|
effective_context_window_percent: 95,
|
|
5977
5974
|
supports_parallel_tool_calls: true,
|
|
5978
|
-
experimental_supported_tools: [],
|
|
5979
5975
|
input_modalities: ["text"]
|
|
5980
5976
|
}
|
|
5981
5977
|
],
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agent-proxy/zcode",
|
|
3
|
-
"version": "0.20.
|
|
3
|
+
"version": "0.20.3",
|
|
4
4
|
"description": "Agent Proxy zcode 插件;保留基线转换行为。",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"url": "git+https://github.com/aceHubert/codex-cliproxy-gateway.git"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@agent-proxy/models": "0.20.
|
|
38
|
+
"@agent-proxy/models": "0.20.2"
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@agent-proxy/llm-bridge": "0.20.
|
|
42
|
-
"@agent-proxy/plugin-api": "0.20.
|
|
41
|
+
"@agent-proxy/llm-bridge": "0.20.3",
|
|
42
|
+
"@agent-proxy/plugin-api": "0.20.2"
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "b5922449d4fc9c2952b324031aee4f254e1b4d14"
|
|
45
45
|
}
|