pi-baseten-provider 1.0.8 → 1.0.9

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
@@ -69,19 +69,20 @@ pi
69
69
 
70
70
  | Model | Context | Vision | Reasoning | Input $/M | Output $/M |
71
71
  |-------|---------|--------|-----------|-----------|------------|
72
- | DeepSeek V4 Pro | 131K | ❌ | ✅ | $1.74 | $3.48 |
72
+ | Deepseek V4 Flash 0731 | 1.0M | ❌ | ✅ | $0.13 | $0.26 |
73
+ | Deepseek V4 Pro | 262K | ❌ | ✅ | $1.74 | $3.48 |
73
74
  | GLM 4.7 | 200K | ❌ | ✅ | $0.60 | $2.20 |
74
75
  | GLM 5.2 | 1.0M | ❌ | ✅ | $1.40 | $4.40 |
75
76
  | GLM 5.2 Fast | 524K | ❌ | ✅ | $2.10 | $6.60 |
76
- | Inkling | 1.0M | | ✅ | $1.00 | $4.05 |
77
- | Inkling Small | 1.0M | | ✅ | Free | Free |
78
- | Kimi K2.6 | 262K | ✅ | ✅ | $0.60 | $3.00 |
79
- | Kimi K2.7 Code | 262K | | ✅ | $0.95 | $4.00 |
80
- | Kimi K3 | 1.0M | | ✅ | $3.00 | $15.00 |
77
+ | Inkling | 1.0M | | ✅ | $1.00 | $4.05 |
78
+ | Inkling Small | 1.0M | | ✅ | $0.50 | $1.20 |
79
+ | Kimi K2.6 | 262K | ✅ | ✅ | $0.95 | $4.00 |
80
+ | Kimi K2.7 Code | 262K | | ✅ | $0.95 | $4.00 |
81
+ | Kimi K3 | 1.0M | | ✅ | $3.00 | $15.00 |
81
82
  | Mercury 2 | 8K | ❌ | ✅ | Free | Free |
82
83
  | Nemotron Ultra | 203K | ❌ | ✅ | $0.60 | $2.40 |
83
84
  | OpenAI GPT 120B | 128K | ❌ | ✅ | $0.10 | $0.50 |
84
- | SID-1 | 33K | ❌ | | Free | Free |
85
+ | SID-1 | 33K | ❌ | | Free | Free |
85
86
 
86
87
  *Costs are per million tokens. Prices subject to change — check [baseten.co/pricing](https://www.baseten.co/pricing/) for current pricing.*
87
88
 
@@ -1,24 +1 @@
1
- [
2
- {
3
- "id": "deepseek-ai/DeepSeek-V4-Pro",
4
- "name": "DeepSeek V4 Pro",
5
- "reasoning": true,
6
- "input": [
7
- "text"
8
- ],
9
- "cost": {
10
- "input": 1.74,
11
- "output": 3.48,
12
- "cacheRead": 0.15,
13
- "cacheWrite": 0
14
- },
15
- "contextWindow": 131000,
16
- "maxTokens": 131000,
17
- "compat": {
18
- "supportsDeveloperRole": true,
19
- "supportsStore": false,
20
- "maxTokensField": "max_completion_tokens",
21
- "thinkingFormat": "openai"
22
- }
23
- }
24
- ]
1
+ []
package/index.ts CHANGED
@@ -49,6 +49,7 @@ interface JsonModel {
49
49
  contextWindow: number;
50
50
  maxTokens: number;
51
51
  thinkingLevelMap?: {
52
+ off?: string | null;
52
53
  minimal?: string | null;
53
54
  low?: string | null;
54
55
  medium?: string | null;
@@ -60,8 +61,10 @@ interface JsonModel {
60
61
  supportsDeveloperRole?: boolean;
61
62
  supportsStore?: boolean;
62
63
  maxTokensField?: "max_completion_tokens" | "max_tokens";
63
- thinkingFormat?: "openai" | "zai" | "qwen" | "qwen-chat-template";
64
+ thinkingFormat?: "openai" | "zai" | "qwen" | "qwen-chat-template" | "chat-template";
64
65
  supportsReasoningEffort?: boolean;
66
+ requiresReasoningContentOnAssistantMessages?: boolean;
67
+ chatTemplateKwargs?: Record<string, unknown>;
65
68
  };
66
69
  }
67
70
 
@@ -181,15 +184,18 @@ function transformApiModel(apiModel: any): JsonModel | null {
181
184
  cost: {
182
185
  input: toPerM(pricing.prompt),
183
186
  output: toPerM(pricing.completion),
184
- cacheRead: toPerM(pricing.cache_prompt),
187
+ cacheRead: toPerM(pricing.input_cache_read ?? pricing.cache_prompt),
185
188
  cacheWrite: 0,
186
189
  },
187
190
  contextWindow: apiModel.context_length || 131072,
188
191
  maxTokens: apiModel.max_completion_tokens || 131072,
189
192
  };
190
- if (features.includes("reasoning_effort")) {
191
- model.compat = { ...model.compat, supportsReasoningEffort: true };
192
- }
193
+ model.compat = {
194
+ supportsDeveloperRole: true,
195
+ supportsStore: false,
196
+ maxTokensField: "max_completion_tokens",
197
+ ...(features.includes("reasoning_effort") ? { supportsReasoningEffort: true } : {}),
198
+ };
193
199
  return model;
194
200
  }
195
201
 
package/models.json CHANGED
@@ -1,4 +1,26 @@
1
1
  [
2
+ {
3
+ "id": "deepseek-ai/DeepSeek-V4-Flash-0731",
4
+ "name": "Deepseek V4 Flash 0731",
5
+ "reasoning": true,
6
+ "input": [
7
+ "text"
8
+ ],
9
+ "cost": {
10
+ "input": 0.13,
11
+ "output": 0.26,
12
+ "cacheRead": 0.028,
13
+ "cacheWrite": 0
14
+ },
15
+ "contextWindow": 1048576,
16
+ "maxTokens": 1048576,
17
+ "compat": {
18
+ "supportsDeveloperRole": true,
19
+ "supportsStore": false,
20
+ "maxTokensField": "max_completion_tokens",
21
+ "thinkingFormat": "openai"
22
+ }
23
+ },
2
24
  {
3
25
  "id": "deepseek-ai/DeepSeek-V4-Pro",
4
26
  "name": "Deepseek V4 Pro",
@@ -9,7 +31,7 @@
9
31
  "cost": {
10
32
  "input": 1.74,
11
33
  "output": 3.48,
12
- "cacheRead": 0,
34
+ "cacheRead": 0.145,
13
35
  "cacheWrite": 0
14
36
  },
15
37
  "contextWindow": 262144,
@@ -31,7 +53,7 @@
31
53
  "cost": {
32
54
  "input": 0.6,
33
55
  "output": 2.2,
34
- "cacheRead": 0,
56
+ "cacheRead": 0.12,
35
57
  "cacheWrite": 0
36
58
  },
37
59
  "contextWindow": 200000,
@@ -53,7 +75,7 @@
53
75
  "cost": {
54
76
  "input": 1.4,
55
77
  "output": 4.4,
56
- "cacheRead": 0,
78
+ "cacheRead": 0.14,
57
79
  "cacheWrite": 0
58
80
  },
59
81
  "contextWindow": 1048576,
@@ -75,7 +97,7 @@
75
97
  "cost": {
76
98
  "input": 2.1,
77
99
  "output": 6.6,
78
- "cacheRead": 0,
100
+ "cacheRead": 0.21,
79
101
  "cacheWrite": 0
80
102
  },
81
103
  "contextWindow": 524288,
@@ -92,12 +114,13 @@
92
114
  "name": "Inkling",
93
115
  "reasoning": true,
94
116
  "input": [
95
- "text"
117
+ "text",
118
+ "image"
96
119
  ],
97
120
  "cost": {
98
121
  "input": 1,
99
122
  "output": 4.05,
100
- "cacheRead": 0,
123
+ "cacheRead": 0.17,
101
124
  "cacheWrite": 0
102
125
  },
103
126
  "contextWindow": 1048576,
@@ -114,12 +137,13 @@
114
137
  "name": "Inkling Small",
115
138
  "reasoning": true,
116
139
  "input": [
117
- "text"
140
+ "text",
141
+ "image"
118
142
  ],
119
143
  "cost": {
120
- "input": 0,
121
- "output": 0,
122
- "cacheRead": 0,
144
+ "input": 0.5,
145
+ "output": 1.2,
146
+ "cacheRead": 0.1,
123
147
  "cacheWrite": 0
124
148
  },
125
149
  "contextWindow": 1048576,
@@ -142,7 +166,7 @@
142
166
  "cost": {
143
167
  "input": 0.95,
144
168
  "output": 4,
145
- "cacheRead": 0,
169
+ "cacheRead": 0.16,
146
170
  "cacheWrite": 0
147
171
  },
148
172
  "contextWindow": 262000,
@@ -159,12 +183,13 @@
159
183
  "name": "Kimi K2.7 Code",
160
184
  "reasoning": true,
161
185
  "input": [
162
- "text"
186
+ "text",
187
+ "image"
163
188
  ],
164
189
  "cost": {
165
190
  "input": 0.95,
166
191
  "output": 4,
167
- "cacheRead": 0,
192
+ "cacheRead": 0.16,
168
193
  "cacheWrite": 0
169
194
  },
170
195
  "contextWindow": 262000,
@@ -181,12 +206,13 @@
181
206
  "name": "Kimi K3",
182
207
  "reasoning": true,
183
208
  "input": [
184
- "text"
209
+ "text",
210
+ "image"
185
211
  ],
186
212
  "cost": {
187
213
  "input": 3,
188
214
  "output": 15,
189
- "cacheRead": 0,
215
+ "cacheRead": 0.3,
190
216
  "cacheWrite": 0
191
217
  },
192
218
  "contextWindow": 1048576,
@@ -230,7 +256,7 @@
230
256
  "cost": {
231
257
  "input": 0.6,
232
258
  "output": 2.4,
233
- "cacheRead": 0,
259
+ "cacheRead": 0.12,
234
260
  "cacheWrite": 0
235
261
  },
236
262
  "contextWindow": 202800,
@@ -252,7 +278,7 @@
252
278
  "cost": {
253
279
  "input": 0.1,
254
280
  "output": 0.5,
255
- "cacheRead": 0,
281
+ "cacheRead": 0.1,
256
282
  "cacheWrite": 0
257
283
  },
258
284
  "contextWindow": 128072,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-baseten-provider",
3
- "version": "1.0.8",
3
+ "version": "1.0.9",
4
4
  "description": "Baseten provider extension for pi - Access DeepSeek, Kimi, GLM, MiniMax, Nemotron, and GPT-OSS models through the Baseten Model API",
5
5
  "author": "monotykamary",
6
6
  "homepage": "https://github.com/monotykamary/pi-baseten-provider#readme",
package/patch.json CHANGED
@@ -1,54 +1,219 @@
1
1
  {
2
- "moonshotai/Kimi-K2.6": {
3
- "reasoning": true,
4
- "cost": {
5
- "input": 0.6,
6
- "output": 3.0
2
+ "deepseek-ai/DeepSeek-V4-Flash-0731": {
3
+ "thinkingLevelMap": {
4
+ "off": "none",
5
+ "minimal": null,
6
+ "low": "low",
7
+ "medium": null,
8
+ "high": "high",
9
+ "xhigh": null,
10
+ "max": "max"
7
11
  },
8
12
  "compat": {
9
- "thinkingFormat": "qwen-chat-template"
13
+ "thinkingFormat": "chat-template",
14
+ "supportsReasoningEffort": false,
15
+ "requiresReasoningContentOnAssistantMessages": true,
16
+ "chatTemplateKwargs": {
17
+ "thinking": {
18
+ "$var": "thinking.enabled"
19
+ },
20
+ "reasoning_effort": {
21
+ "$var": "thinking.effort"
22
+ }
23
+ }
10
24
  }
11
25
  },
12
- "moonshotai/Kimi-K2.5": {
13
- "reasoning": true,
26
+ "deepseek-ai/DeepSeek-V4-Pro": {
27
+ "thinkingLevelMap": {
28
+ "off": "none",
29
+ "minimal": "minimal",
30
+ "low": "low",
31
+ "medium": "medium",
32
+ "high": "high",
33
+ "xhigh": "xhigh",
34
+ "max": "max"
35
+ },
14
36
  "compat": {
15
- "thinkingFormat": "qwen-chat-template"
37
+ "thinkingFormat": "openai",
38
+ "supportsReasoningEffort": true,
39
+ "requiresReasoningContentOnAssistantMessages": true
16
40
  }
17
41
  },
18
42
  "zai-org/GLM-4.7": {
19
43
  "reasoning": true,
44
+ "thinkingLevelMap": {
45
+ "off": "none",
46
+ "minimal": null,
47
+ "low": null,
48
+ "medium": null,
49
+ "high": "high",
50
+ "xhigh": null,
51
+ "max": null
52
+ },
20
53
  "compat": {
21
- "thinkingFormat": "qwen-chat-template"
54
+ "thinkingFormat": "qwen-chat-template",
55
+ "supportsReasoningEffort": false,
56
+ "requiresReasoningContentOnAssistantMessages": true
22
57
  }
23
58
  },
24
- "zai-org/GLM-5": {
25
- "reasoning": true,
59
+ "zai-org/GLM-5.2": {
60
+ "thinkingLevelMap": {
61
+ "off": "none",
62
+ "minimal": null,
63
+ "low": null,
64
+ "medium": null,
65
+ "high": "high",
66
+ "xhigh": null,
67
+ "max": "max"
68
+ },
26
69
  "compat": {
27
- "thinkingFormat": "qwen-chat-template"
70
+ "thinkingFormat": "openai",
71
+ "supportsReasoningEffort": true,
72
+ "requiresReasoningContentOnAssistantMessages": true
28
73
  }
29
74
  },
30
- "zai-org/GLM-5.2": {
75
+ "zai-org/GLM-5.2-Fast": {
76
+ "thinkingLevelMap": {
77
+ "off": "none",
78
+ "minimal": null,
79
+ "low": null,
80
+ "medium": null,
81
+ "high": "high",
82
+ "xhigh": null,
83
+ "max": "max"
84
+ },
31
85
  "compat": {
32
- "thinkingFormat": "qwen-chat-template"
86
+ "thinkingFormat": "openai",
87
+ "supportsReasoningEffort": true,
88
+ "requiresReasoningContentOnAssistantMessages": true
89
+ }
90
+ },
91
+ "thinkingmachines/inkling": {
92
+ "thinkingLevelMap": {
93
+ "off": "none",
94
+ "minimal": "minimal",
95
+ "low": "low",
96
+ "medium": "medium",
97
+ "high": "high",
98
+ "xhigh": "xhigh",
99
+ "max": "max"
33
100
  },
101
+ "compat": {
102
+ "thinkingFormat": "openai",
103
+ "supportsReasoningEffort": true
104
+ }
105
+ },
106
+ "thinkingmachines/inkling-small": {
34
107
  "thinkingLevelMap": {
108
+ "off": "none",
35
109
  "minimal": "minimal",
36
110
  "low": "low",
37
111
  "medium": "medium",
38
112
  "high": "high",
113
+ "xhigh": "xhigh",
39
114
  "max": "max"
115
+ },
116
+ "compat": {
117
+ "thinkingFormat": "openai",
118
+ "supportsReasoningEffort": true
119
+ }
120
+ },
121
+ "moonshotai/Kimi-K2.6": {
122
+ "thinkingLevelMap": {
123
+ "off": "none",
124
+ "minimal": null,
125
+ "low": null,
126
+ "medium": null,
127
+ "high": "high",
128
+ "xhigh": null,
129
+ "max": null
130
+ },
131
+ "compat": {
132
+ "thinkingFormat": "qwen-chat-template",
133
+ "supportsReasoningEffort": false,
134
+ "requiresReasoningContentOnAssistantMessages": true
40
135
  }
41
136
  },
42
137
  "moonshotai/Kimi-K2.7-Code": {
43
138
  "thinkingLevelMap": {
139
+ "off": "none",
140
+ "minimal": null,
141
+ "low": null,
142
+ "medium": null,
143
+ "high": "high",
144
+ "xhigh": null,
145
+ "max": null
146
+ },
147
+ "compat": {
148
+ "thinkingFormat": "qwen-chat-template",
149
+ "supportsReasoningEffort": false,
150
+ "requiresReasoningContentOnAssistantMessages": true
151
+ }
152
+ },
153
+ "moonshotai/Kimi-K3": {
154
+ "thinkingLevelMap": {
155
+ "off": "none",
156
+ "minimal": null,
157
+ "low": "low",
158
+ "medium": null,
159
+ "high": "high",
160
+ "xhigh": null,
161
+ "max": "max"
162
+ },
163
+ "compat": {
164
+ "thinkingFormat": "openai",
165
+ "supportsReasoningEffort": true,
166
+ "requiresReasoningContentOnAssistantMessages": true
167
+ }
168
+ },
169
+ "nvidia/NVIDIA-Nemotron-3-Ultra-550B-A55B": {
170
+ "thinkingLevelMap": {
171
+ "off": "none",
44
172
  "minimal": null,
173
+ "low": null,
174
+ "medium": null,
175
+ "high": "high",
176
+ "xhigh": null,
177
+ "max": null
178
+ },
179
+ "compat": {
180
+ "thinkingFormat": "qwen-chat-template",
181
+ "supportsReasoningEffort": false,
182
+ "requiresReasoningContentOnAssistantMessages": true
183
+ }
184
+ },
185
+ "openai/gpt-oss-120b": {
186
+ "thinkingLevelMap": {
187
+ "off": "none",
188
+ "minimal": "minimal",
189
+ "low": "low",
190
+ "medium": "medium",
191
+ "high": "high",
192
+ "xhigh": "xhigh",
193
+ "max": "max"
194
+ },
195
+ "compat": {
196
+ "thinkingFormat": "openai",
197
+ "supportsReasoningEffort": true
198
+ }
199
+ },
200
+ "inception/mercury-2": {
201
+ "reasoning": true,
202
+ "thinkingLevelMap": {
203
+ "off": "instant",
204
+ "minimal": "low",
45
205
  "low": "low",
46
206
  "medium": "medium",
47
207
  "high": "high",
48
- "xhigh": null
208
+ "xhigh": null,
209
+ "max": null
210
+ },
211
+ "compat": {
212
+ "thinkingFormat": "openai",
213
+ "supportsReasoningEffort": true
49
214
  }
50
215
  },
51
- "nvidia/Nemotron-120B-A12B": {
52
- "reasoning": true
216
+ "sid/sid-1": {
217
+ "reasoning": false
53
218
  }
54
219
  }
@@ -96,16 +96,17 @@ function transformApiModel(apiModel, existingModelsMap) {
96
96
  }
97
97
  // Update features from API
98
98
  const features = apiModel.supported_features || [];
99
- existing.reasoning = features.includes('reasoning') ?? existing.reasoning;
100
- if (features.includes('vision') && !existing.input.includes('image')) {
101
- existing.input = ['text', 'image'];
102
- }
99
+ existing.reasoning = features.includes('reasoning');
100
+ const hasVision = (apiModel.input_modalities || []).includes('image');
101
+ existing.input = hasVision ? ['text', 'image'] : ['text'];
103
102
  // Update pricing from API
104
103
  const pricing = apiModel.pricing || {};
105
104
  const inputCost = toPerMillion(pricing.prompt);
106
105
  const outputCost = toPerMillion(pricing.completion);
107
- if (inputCost !== null && inputCost > 0) existing.cost.input = inputCost;
108
- if (outputCost !== null && outputCost > 0) existing.cost.output = outputCost;
106
+ const cacheReadCost = toPerMillion(pricing.input_cache_read ?? pricing.cache_prompt);
107
+ if (inputCost !== null) existing.cost.input = inputCost;
108
+ if (outputCost !== null) existing.cost.output = outputCost;
109
+ if (cacheReadCost !== null) existing.cost.cacheRead = cacheReadCost;
109
110
  return existing;
110
111
  }
111
112
 
@@ -113,7 +114,7 @@ function transformApiModel(apiModel, existingModelsMap) {
113
114
  const features = apiModel.supported_features || [];
114
115
  const pricing = apiModel.pricing || {};
115
116
  const hasReasoning = features.includes('reasoning');
116
- const hasVision = features.includes('vision');
117
+ const hasVision = (apiModel.input_modalities || []).includes('image');
117
118
 
118
119
  const inputTypes = ['text'];
119
120
  if (hasVision) inputTypes.push('image');
@@ -130,7 +131,7 @@ function transformApiModel(apiModel, existingModelsMap) {
130
131
  cost: {
131
132
  input: inputCost,
132
133
  output: outputCost,
133
- cacheRead: 0,
134
+ cacheRead: toPerMillion(pricing.input_cache_read ?? pricing.cache_prompt) || 0,
134
135
  cacheWrite: 0,
135
136
  },
136
137
  contextWindow: apiModel.context_length || 131072,