@stablekernel/pi-bifrost 0.1.3 → 0.2.0

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.3",
3
+ "version": "0.2.0",
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
@@ -264,7 +264,7 @@ function listModels(
264
264
  wire: "anthropic" | "openai",
265
265
  api: "anthropic-messages" | "openai-completions",
266
266
  ): ProviderModelConfig[] {
267
- const raw = run(["models", `--wire=${wire}`]);
267
+ const raw = run(["models", `--wire=${wire}`, "--all"]);
268
268
  if (!raw) return [];
269
269
  try {
270
270
  return toPiModels(JSON.parse(raw) as CliModels, api);
@@ -86,8 +86,8 @@ function mockCLI(responses: Record<string, string>) {
86
86
 
87
87
  const OK_CLI = {
88
88
  "resolve --json": JSON.stringify(RESOLUTION),
89
- "models --wire=anthropic": cliPayload([HAIKU]),
90
- "models --wire=openai": cliPayload([NOVA]),
89
+ "models --wire=anthropic --all": cliPayload([HAIKU]),
90
+ "models --wire=openai --all": cliPayload([NOVA]),
91
91
  };
92
92
 
93
93
  type Registered = { id: string; config: any };
@@ -130,8 +130,8 @@ describe("provider registration", () => {
130
130
  test("asks the CLI per wire, so each surface gets its own id spelling", async () => {
131
131
  const calls = mockCLI(OK_CLI);
132
132
  await runExtension();
133
- expect(calls).toContain("models --wire=anthropic");
134
- expect(calls).toContain("models --wire=openai");
133
+ expect(calls).toContain("models --wire=anthropic --all");
134
+ expect(calls).toContain("models --wire=openai --all");
135
135
  });
136
136
 
137
137
  test("never reads the key: model discovery goes through the CLI", async () => {
@@ -184,7 +184,7 @@ describe("provider registration", () => {
184
184
  test("skips a surface the CLI cannot list", async () => {
185
185
  mockCLI({
186
186
  "resolve --json": JSON.stringify(RESOLUTION),
187
- "models --wire=anthropic": cliPayload([HAIKU]),
187
+ "models --wire=anthropic --all": cliPayload([HAIKU]),
188
188
  // openai wire omitted: the command fails
189
189
  });
190
190
  const registered = await runExtension();
@@ -194,8 +194,8 @@ describe("provider registration", () => {
194
194
  test("registers nothing when the CLI emits unparseable output", async () => {
195
195
  mockCLI({
196
196
  "resolve --json": JSON.stringify(RESOLUTION),
197
- "models --wire=anthropic": "not json",
198
- "models --wire=openai": "not json",
197
+ "models --wire=anthropic --all": "not json",
198
+ "models --wire=openai --all": "not json",
199
199
  });
200
200
  expect(await runExtension()).toEqual([]);
201
201
  });