@stablekernel/pi-bifrost 0.1.0 → 0.1.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stablekernel/pi-bifrost",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Pi extension that registers the Bifrost gateway as a model provider, resolving per-project virtual keys via gateway-cli.",
5
5
  "type": "module",
6
6
  "files": [
package/src/index.ts CHANGED
@@ -37,6 +37,7 @@ type ProviderModelConfig = {
37
37
  /** Provider/model compat flags pi reads. Only the subset this provider sets. */
38
38
  compat?: {
39
39
  supportsReasoningEffort?: boolean;
40
+ supportsDeveloperRole?: boolean;
40
41
  forceAdaptiveThinking?: boolean;
41
42
  };
42
43
  };
@@ -200,13 +201,22 @@ export function toPiModels(
200
201
  // pi-ai sends `reasoning_effort` only when supportsReasoningEffort is
201
202
  // true and the user has picked a thinking level; the map translates
202
203
  // pi's levels to the provider's values and nulls the rest.
204
+ // supportsDeveloperRole:false on every reasoning model: auto-detection
205
+ // assumes developer-role support for unrecognized origins, and the
206
+ // Fireworks-upstream Qwen route 500s on it (verified live 2026-08-20).
203
207
  if (map) {
204
208
  model.thinkingLevelMap = map;
205
- model.compat = { supportsReasoningEffort: true };
209
+ model.compat = {
210
+ supportsReasoningEffort: true,
211
+ supportsDeveloperRole: false,
212
+ };
206
213
  } else {
207
214
  // Toggle-only reasoning: no effort levels to map. Flag the
208
215
  // capability; pi leaves the provider's default on/off path alone.
209
- model.compat = { supportsReasoningEffort: false };
216
+ model.compat = {
217
+ supportsReasoningEffort: false,
218
+ supportsDeveloperRole: false,
219
+ };
210
220
  }
211
221
  }
212
222
  // Anthropic-messages surface: reasoning:true tells pi the model can
@@ -256,7 +256,10 @@ describe("reasoning", () => {
256
256
  const { toPiModels } = await import("./index.js");
257
257
  const [model] = toPiModels({ models: [KIMI] }, "openai-completions");
258
258
  expect(model.reasoning).toBe(true);
259
- expect(model.compat).toEqual({ supportsReasoningEffort: true });
259
+ expect(model.compat).toEqual({
260
+ supportsReasoningEffort: true,
261
+ supportsDeveloperRole: false,
262
+ });
260
263
  // Levels the model accepts map to the provider value; pi levels with no
261
264
  // counterpart are null (hidden), not passed through by name.
262
265
  expect(model.thinkingLevelMap).toEqual({
@@ -296,7 +299,10 @@ describe("reasoning", () => {
296
299
  const [model] = toPiModels({ models: [TOGGLE_ONLY] }, "openai-completions");
297
300
  expect(model.reasoning).toBe(true);
298
301
  expect(model.thinkingLevelMap).toBeUndefined();
299
- expect(model.compat).toEqual({ supportsReasoningEffort: false });
302
+ expect(model.compat).toEqual({
303
+ supportsReasoningEffort: false,
304
+ supportsDeveloperRole: false,
305
+ });
300
306
  });
301
307
 
302
308
  test("leaves a non-reasoning model alone", async () => {