mu-agent 0.2.6 → 0.2.7

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.
@@ -279,6 +279,21 @@ for (const model of new Set(askedTiers.map(classifierOf).filter((judge) => judge
279
279
  }
280
280
  }
281
281
 
282
+ // OpenAI's decision model (gpt-6-luna) through its Decisions API, for the tiers and routes that use it. Its own key goes
283
+ // to its address; at OpenAI's own address, an OpenAI key of mu's `openai` provider works too (kyrn-judge/src/registry.ts).
284
+ const OPENAI_JUDGE = { type: "openai" };
285
+ const openaiOf = (tier) => config?.judges?.[tier] ?? (tier === "openai" ? OPENAI_JUDGE : undefined);
286
+ for (const judge of new Set(askedTiers.map(openaiOf).filter((judge) => judge?.type === "openai"))) {
287
+ const name = judge.apiKeyEnv ?? "MU_JUDGE_OPENAI_KEY";
288
+ const host = judge.baseUrl && URL.canParse(judge.baseUrl) ? new URL(judge.baseUrl).host : "api.openai.com";
289
+ const model = judge.model || "gpt-6-luna";
290
+ const providerKey = host === "api.openai.com" && name === "MU_JUDGE_OPENAI_KEY";
291
+ if (has(name)) row("ok", "openai", `${name} is set: ${model} is called at ${host} (value not shown)`);
292
+ else if (providerKey && has("OPENAI_API_KEY")) row("ok", "openai", `OPENAI_API_KEY is set: ${model} is called at ${host} (value not shown)`);
293
+ else if (providerKey && authBytes > 8) row("--", "openai", `${name} not set; an OpenAI API key stored with mu setup or /login works too (not read here)`);
294
+ else row("fix", "openai", `${name} not set: add it ${where}${providerKey ? ", or set up an OpenAI API key with mu setup" : ""}`);
295
+ }
296
+
282
297
  // CLM-8B behind `clm-serve` (github.com/Contrastive-LM/CLM), for the tiers and routes that use it.
283
298
  /** As packages/kyrn-judge/src/providers/typesafe.ts reads a CLM address: `http://host:8700` is enough. */
284
299
  function clmEndpoint(baseUrl) {
@@ -359,7 +374,8 @@ const canRelate = (tier) =>
359
374
  tier === "gateway" ||
360
375
  tier.startsWith("llm:") ||
361
376
  tier.startsWith("classifier:") ||
362
- ["llm", "clm", "classifier"].includes(judgeOf(tier)?.type);
377
+ tier === "openai" ||
378
+ ["llm", "clm", "classifier", "openai"].includes(judgeOf(tier)?.type);
363
379
  const browseTiers = config?.routes?.["browser.step"] ?? tiers;
364
380
  const routed = Object.entries(config?.routes ?? {});
365
381
  if (routed.length > 0) row("--", "routes", routed.map(([id, value]) => `${id} -> ${[value].flat().join(" > ")}`).join(" · "));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mu-agent",
3
- "version": "0.2.6",
3
+ "version": "0.2.7",
4
4
  "description": "mu: a coding agent that hands its routine decisions to a small, fast judge model, so the main model can keep its attention on the work. Built on pi.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -42,6 +42,6 @@
42
42
  "muBuild": {
43
43
  "pi": "1.3.0",
44
44
  "judge": "0.1.0",
45
- "commit": "bd42ca6ba"
45
+ "commit": "f162089db"
46
46
  }
47
47
  }