@molecule/api-ai-zhipu 1.0.1 → 1.0.2

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/README.md CHANGED
@@ -3,7 +3,7 @@ AUTO-GENERATED — DO NOT EDIT THIS FILE.
3
3
  Generated by `mlcl sync-docs` from the package's src/index.ts JSDoc + mlcl/registry.json.
4
4
  Edits here are overwritten on the next commit (molecule's pre-commit hook regenerates).
5
5
  To change this document, edit the module-level JSDoc in src/index.ts.
6
- Generated: 2026-08-04T01:47:42.307Z
6
+ Generated: 2026-08-26T19:42:20.290Z
7
7
  -->
8
8
 
9
9
  # @molecule/api-ai-zhipu
@@ -52,7 +52,7 @@ interface ZhipuConfig {
52
52
  onRateLimit?: AiRateLimitCallback
53
53
  /** API key. Defaults to ZHIPU_API_KEY env var. */
54
54
  apiKey?: string
55
- /** Default model. Defaults to 'glm-5.2'. */
55
+ /** Default model. Defaults to 'glm-5.3'. */
56
56
  defaultModel?: string
57
57
  /** Maximum tokens for completions. */
58
58
  maxTokens?: number
@@ -1 +1 @@
1
- {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,UAAU,EAOX,MAAM,kBAAkB,CAAA;AASzB,OAAO,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAilB7C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,UAAU,CAE/D"}
1
+ {"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../src/provider.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,KAAK,EACV,UAAU,EAOX,MAAM,kBAAkB,CAAA;AASzB,OAAO,cAAc,CAAA;AAErB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AAmlB7C;;;;;GAKG;AACH,wBAAgB,cAAc,CAAC,MAAM,CAAC,EAAE,WAAW,GAAG,UAAU,CAE/D"}
package/dist/provider.js CHANGED
@@ -15,8 +15,10 @@ import './secrets.js';
15
15
  /**
16
16
  * Fallback: map thinking budget tokens to a Zhipu reasoning_effort level when
17
17
  * the caller didn't resolve a native value from the model catalog. Note
18
- * `reasoning_effort` is only honored on glm-5.2+ (values minimal | none | low |
19
- * medium | high | xhigh | max; low/medium coerce to high, xhigh to max) —
18
+ * `reasoning_effort` is only honored on glm-5.2+ (glm-5.2 takes minimal | none |
19
+ * low | medium | high | xhigh | max, where low/medium coerce to high and xhigh
20
+ * to max; glm-5.3 narrows this to low | high | max and can no longer disable
21
+ * reasoning at all — both accept the `'high'`/`'low'` this returns) —
20
22
  * callers should prefer passing `thinking.effort`; older GLM models only
21
23
  * support thinking on/off and should not receive a thinking param at all.
22
24
  *
@@ -42,7 +44,7 @@ class ZhipuAIProvider {
42
44
  onRateLimit;
43
45
  constructor(config = {}) {
44
46
  this.apiKey = config.apiKey ?? process.env.ZHIPU_API_KEY ?? '';
45
- this.defaultModel = config.defaultModel ?? 'glm-5.2';
47
+ this.defaultModel = config.defaultModel ?? 'glm-5.3';
46
48
  this.maxTokens = config.maxTokens ?? 4096;
47
49
  this.baseUrl = config.baseUrl ?? process.env.ZHIPU_BASE_URL ?? 'https://api.z.ai/api/paas';
48
50
  this.completionsPath =
package/dist/types.d.ts CHANGED
@@ -12,7 +12,7 @@ export interface ZhipuConfig {
12
12
  onRateLimit?: AiRateLimitCallback;
13
13
  /** API key. Defaults to ZHIPU_API_KEY env var. */
14
14
  apiKey?: string;
15
- /** Default model. Defaults to 'glm-5.2'. */
15
+ /** Default model. Defaults to 'glm-5.3'. */
16
16
  defaultModel?: string;
17
17
  /** Maximum tokens for completions. */
18
18
  maxTokens?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@molecule/api-ai-zhipu",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Zhipu GLM AI provider for molecule.dev",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -33,7 +33,7 @@
33
33
  "directory": "packages/api/bonds/ai/zhipu"
34
34
  },
35
35
  "devDependencies": {
36
- "@molecule/api-ai": "1.0.1",
36
+ "@molecule/api-ai": "1.1.0",
37
37
  "@molecule/api-bond": "1.0.1",
38
38
  "@types/node": "26.1.2",
39
39
  "typescript": "6.0.3",