pi-dashscope 1.0.0 → 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.
Files changed (2) hide show
  1. package/index.ts +9 -6
  2. package/package.json +1 -1
package/index.ts CHANGED
@@ -57,7 +57,7 @@ const DASHSCOPE_MODELS = [
57
57
  contextWindow: 983616,
58
58
  maxTokens: 65536,
59
59
  cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
60
- compat: { thinkingFormat: "qwen" },
60
+ compat: { thinkingFormat: "qwen", supportsDeveloperRole: false },
61
61
  },
62
62
  // ── Qwen3 Max 2026-01-23 ───────────────────────────────────────────────
63
63
  // Extended thinking enabled | 252K context | 32K output
@@ -69,7 +69,7 @@ const DASHSCOPE_MODELS = [
69
69
  contextWindow: 258048,
70
70
  maxTokens: 32768,
71
71
  cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
72
- compat: { thinkingFormat: "qwen" },
72
+ compat: { thinkingFormat: "qwen", supportsDeveloperRole: false },
73
73
  },
74
74
  // ── Qwen3 Coder Plus ───────────────────────────────────────────────────
75
75
  // No thinking | 975K context | 64K output
@@ -81,6 +81,7 @@ const DASHSCOPE_MODELS = [
81
81
  contextWindow: 997952,
82
82
  maxTokens: 65536,
83
83
  cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
84
+ compat: { supportsDeveloperRole: false },
84
85
  },
85
86
  // ── Qwen3 Coder Next ───────────────────────────────────────────────────
86
87
  // No thinking | 200K context | 64K output
@@ -92,6 +93,7 @@ const DASHSCOPE_MODELS = [
92
93
  contextWindow: 204800,
93
94
  maxTokens: 65536,
94
95
  cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
96
+ compat: { supportsDeveloperRole: false },
95
97
  },
96
98
  // ── GLM-4.7 ────────────────────────────────────────────────────────────
97
99
  // Extended thinking enabled | 166K context | 16K output
@@ -103,7 +105,7 @@ const DASHSCOPE_MODELS = [
103
105
  contextWindow: 169984,
104
106
  maxTokens: 16384,
105
107
  cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
106
- compat: { thinkingFormat: "qwen" },
108
+ compat: { thinkingFormat: "qwen", supportsDeveloperRole: false },
107
109
  },
108
110
  // ── Kimi K2.5 ─────────────────────────────────────────────────────────
109
111
  // Extended thinking enabled | 252K context | 32K output
@@ -115,7 +117,7 @@ const DASHSCOPE_MODELS = [
115
117
  contextWindow: 258048,
116
118
  maxTokens: 32768,
117
119
  cost: { input: 0, output: 0, cacheRead: 0, cacheWrite: 0 },
118
- compat: { thinkingFormat: "zai" },
120
+ compat: { thinkingFormat: "zai", supportsDeveloperRole: false },
119
121
  },
120
122
  ];
121
123
 
@@ -160,8 +162,9 @@ export default function (pi: ExtensionAPI) {
160
162
  const trimmedKey = apiKey.trim();
161
163
  saveKey(trimmedKey);
162
164
 
163
- // Re-register provider immediately with the new key no reload needed.
164
- pi.registerProvider("dashscope", {
165
+ // Update the live model registry directlypi.registerProvider() only
166
+ // queues to pendingProviderRegistrations which is drained once at startup.
167
+ ctx.modelRegistry.registerProvider("dashscope", {
165
168
  baseUrl: DASHSCOPE_BASE_URL,
166
169
  apiKey: trimmedKey,
167
170
  api: "openai-completions",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-dashscope",
3
- "version": "1.0.0",
3
+ "version": "1.0.2",
4
4
  "description": "Alibaba DashScope (ModelStudio) provider for pi.dev — Qwen3, GLM-4, Kimi via OpenAI-compatible coding API",
5
5
  "type": "module",
6
6
  "license": "MIT",