@aliou/pi-synthetic 0.6.2 → 0.6.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/README.md +26 -0
- package/package.json +1 -1
- package/src/providers/models.ts +52 -0
package/README.md
CHANGED
|
@@ -41,6 +41,29 @@ Once installed, select `synthetic` as your provider and choose from available mo
|
|
|
41
41
|
/model synthetic hf:moonshotai/Kimi-K2.5
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
### Web Search Tool
|
|
45
|
+
|
|
46
|
+
The extension registers `synthetic_web_search` — a zero-data-retention web search tool. Available when you have an active Synthetic subscription.
|
|
47
|
+
|
|
48
|
+
### Reasoning Levels
|
|
49
|
+
|
|
50
|
+
For Synthetic models that support reasoning, Synthetic currently accepts only `low`, `medium`, and `high` reasoning effort values.
|
|
51
|
+
|
|
52
|
+
This extension clamps Pi reasoning levels to Synthetic's supported set:
|
|
53
|
+
- `minimal` -> `low`
|
|
54
|
+
- `low` -> `low`
|
|
55
|
+
- `medium` -> `medium`
|
|
56
|
+
- `high` -> `high`
|
|
57
|
+
- `xhigh` -> `high`
|
|
58
|
+
|
|
59
|
+
### Quotas Command
|
|
60
|
+
|
|
61
|
+
Check your API usage:
|
|
62
|
+
|
|
63
|
+
```
|
|
64
|
+
/synthetic:quotas
|
|
65
|
+
```
|
|
66
|
+
|
|
44
67
|
## Adding or Updating Models
|
|
45
68
|
|
|
46
69
|
Models are hardcoded in `src/providers/models.ts`. To add or update models:
|
|
@@ -77,6 +100,9 @@ pnpm run lint
|
|
|
77
100
|
|
|
78
101
|
# Format
|
|
79
102
|
pnpm run format
|
|
103
|
+
|
|
104
|
+
# Test
|
|
105
|
+
pnpm run test
|
|
80
106
|
```
|
|
81
107
|
|
|
82
108
|
### Test Locally
|
package/package.json
CHANGED
package/src/providers/models.ts
CHANGED
|
@@ -18,18 +18,33 @@ export interface SyntheticModelConfig {
|
|
|
18
18
|
compat?: {
|
|
19
19
|
supportsDeveloperRole?: boolean;
|
|
20
20
|
supportsReasoningEffort?: boolean;
|
|
21
|
+
reasoningEffortMap?: Partial<
|
|
22
|
+
Record<"minimal" | "low" | "medium" | "high" | "xhigh", string>
|
|
23
|
+
>;
|
|
21
24
|
maxTokensField?: "max_completion_tokens" | "max_tokens";
|
|
22
25
|
requiresToolResultName?: boolean;
|
|
23
26
|
requiresMistralToolIds?: boolean;
|
|
24
27
|
};
|
|
25
28
|
}
|
|
26
29
|
|
|
30
|
+
const SYNTHETIC_REASONING_EFFORT_MAP = {
|
|
31
|
+
minimal: "low",
|
|
32
|
+
low: "low",
|
|
33
|
+
medium: "medium",
|
|
34
|
+
high: "high",
|
|
35
|
+
xhigh: "high",
|
|
36
|
+
} as const;
|
|
37
|
+
|
|
27
38
|
export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
28
39
|
// API: hf:zai-org/GLM-4.7 → ctx=202752, out=65536
|
|
29
40
|
{
|
|
30
41
|
id: "hf:zai-org/GLM-4.7",
|
|
31
42
|
name: "zai-org/GLM-4.7",
|
|
32
43
|
reasoning: true,
|
|
44
|
+
compat: {
|
|
45
|
+
supportsReasoningEffort: true,
|
|
46
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
47
|
+
},
|
|
33
48
|
input: ["text"],
|
|
34
49
|
cost: {
|
|
35
50
|
input: 0.55,
|
|
@@ -45,6 +60,10 @@ export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
|
45
60
|
id: "hf:zai-org/GLM-4.7-Flash",
|
|
46
61
|
name: "zai-org/GLM-4.7-Flash",
|
|
47
62
|
reasoning: true,
|
|
63
|
+
compat: {
|
|
64
|
+
supportsReasoningEffort: true,
|
|
65
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
66
|
+
},
|
|
48
67
|
input: ["text"],
|
|
49
68
|
cost: {
|
|
50
69
|
input: 0.06,
|
|
@@ -60,6 +79,10 @@ export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
|
60
79
|
id: "hf:MiniMaxAI/MiniMax-M2.1",
|
|
61
80
|
name: "MiniMaxAI/MiniMax-M2.1",
|
|
62
81
|
reasoning: true,
|
|
82
|
+
compat: {
|
|
83
|
+
supportsReasoningEffort: true,
|
|
84
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
85
|
+
},
|
|
63
86
|
input: ["text"],
|
|
64
87
|
cost: {
|
|
65
88
|
input: 0.3,
|
|
@@ -90,6 +113,10 @@ export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
|
90
113
|
id: "hf:deepseek-ai/DeepSeek-R1-0528",
|
|
91
114
|
name: "deepseek-ai/DeepSeek-R1-0528",
|
|
92
115
|
reasoning: true,
|
|
116
|
+
compat: {
|
|
117
|
+
supportsReasoningEffort: true,
|
|
118
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
119
|
+
},
|
|
93
120
|
input: ["text"],
|
|
94
121
|
cost: {
|
|
95
122
|
input: 3,
|
|
@@ -135,6 +162,10 @@ export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
|
135
162
|
id: "hf:moonshotai/Kimi-K2-Thinking",
|
|
136
163
|
name: "moonshotai/Kimi-K2-Thinking",
|
|
137
164
|
reasoning: true,
|
|
165
|
+
compat: {
|
|
166
|
+
supportsReasoningEffort: true,
|
|
167
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
168
|
+
},
|
|
138
169
|
input: ["text"],
|
|
139
170
|
cost: {
|
|
140
171
|
input: 0.6,
|
|
@@ -165,6 +196,10 @@ export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
|
165
196
|
id: "hf:Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
166
197
|
name: "Qwen/Qwen3-Coder-480B-A35B-Instruct",
|
|
167
198
|
reasoning: true,
|
|
199
|
+
compat: {
|
|
200
|
+
supportsReasoningEffort: true,
|
|
201
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
202
|
+
},
|
|
168
203
|
input: ["text"],
|
|
169
204
|
cost: {
|
|
170
205
|
input: 2,
|
|
@@ -180,6 +215,10 @@ export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
|
180
215
|
id: "hf:moonshotai/Kimi-K2.5",
|
|
181
216
|
name: "moonshotai/Kimi-K2.5",
|
|
182
217
|
reasoning: true,
|
|
218
|
+
compat: {
|
|
219
|
+
supportsReasoningEffort: true,
|
|
220
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
221
|
+
},
|
|
183
222
|
input: ["text", "image"],
|
|
184
223
|
cost: {
|
|
185
224
|
input: 0.6,
|
|
@@ -195,6 +234,10 @@ export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
|
195
234
|
id: "hf:nvidia/Kimi-K2.5-NVFP4",
|
|
196
235
|
name: "nvidia/Kimi-K2.5-NVFP4",
|
|
197
236
|
reasoning: true,
|
|
237
|
+
compat: {
|
|
238
|
+
supportsReasoningEffort: true,
|
|
239
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
240
|
+
},
|
|
198
241
|
input: ["text", "image"],
|
|
199
242
|
cost: {
|
|
200
243
|
input: 0.6,
|
|
@@ -225,6 +268,10 @@ export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
|
225
268
|
id: "hf:Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
226
269
|
name: "Qwen/Qwen3-235B-A22B-Thinking-2507",
|
|
227
270
|
reasoning: true,
|
|
271
|
+
compat: {
|
|
272
|
+
supportsReasoningEffort: true,
|
|
273
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
274
|
+
},
|
|
228
275
|
input: ["text"],
|
|
229
276
|
cost: {
|
|
230
277
|
input: 0.65,
|
|
@@ -240,6 +287,10 @@ export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
|
240
287
|
id: "hf:Qwen/Qwen3.5-397B-A17B",
|
|
241
288
|
name: "Qwen/Qwen3.5-397B-A17B",
|
|
242
289
|
reasoning: true,
|
|
290
|
+
compat: {
|
|
291
|
+
supportsReasoningEffort: true,
|
|
292
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
293
|
+
},
|
|
243
294
|
input: ["text", "image"],
|
|
244
295
|
cost: {
|
|
245
296
|
input: 0.6,
|
|
@@ -266,6 +317,7 @@ export const SYNTHETIC_MODELS: SyntheticModelConfig[] = [
|
|
|
266
317
|
maxTokens: 65536,
|
|
267
318
|
compat: {
|
|
268
319
|
supportsReasoningEffort: true,
|
|
320
|
+
reasoningEffortMap: SYNTHETIC_REASONING_EFFORT_MAP,
|
|
269
321
|
maxTokensField: "max_completion_tokens",
|
|
270
322
|
},
|
|
271
323
|
},
|