Skip to content

Claude Code. Any Model. The most powerful AI coding agent now speaks every language.

fix(probe): show the Muse login fix when muse@ is dropped for no login

Jack Rudenko1a6acd805601
diff --git a/packages/cli/src/cli.ts b/packages/cli/src/cli.ts
index 7d1eac35..61551d52 100644
--- a/packages/cli/src/cli.ts
+++ b/packages/cli/src/cli.ts
@@ -1646,6 +1646,8 @@ async function probeModelRouting(
const probeCredentials: CredentialLookup = {
hintFor(provider) {
if (getProviderByName(provider)?.isLocal) return "enable local provider in global config";
+ // A dropped no-login muse@ row names the login fix, not an env var it has none of.
+ if (provider === "meta-muse-code") return describeMuseSigningSource().detail;
const keyInfo = API_KEY_MAP[provider];
if (!keyInfo?.envVar) return undefined;
return credentialHintFrom(
diff --git a/packages/cli/src/probe/probe-chain.ts b/packages/cli/src/probe/probe-chain.ts
index a2240061..827d6f6f 100644
--- a/packages/cli/src/probe/probe-chain.ts
+++ b/packages/cli/src/probe/probe-chain.ts
@@ -66,6 +66,8 @@ export interface ProbeDroppedLink {
outcome: DroppedOutcome;
/** The remedy, for a candidate the credential filter dropped. */
credentialHint?: string;
+ /** A no-credential candidate whose credential is not an env var (`effectiveLabel`). */
+ provenance?: KeyProvenance;
}
/** Where `--probe` reads a provider's credential remedy and key provenance from. */
@@ -132,6 +134,11 @@ function droppedLinkOf(
credentials: CredentialLookup
): ProbeDroppedLink {
const hint = outcome === "no-credential" ? credentials.hintFor(candidate.provider) : undefined;
+ // Only a credential that is not an env var (`effectiveLabel`: Muse Code's
+ // login, Vertex's project) says something an env-var name would not, so only
+ // that provenance rides on a dropped row, for the Key line when nothing was kept.
+ const provenance =
+ outcome === "no-credential" ? credentials.provenanceFor(candidate.provider) : undefined;
return {
provider: candidate.provider,
displayName: candidate.displayName,
@@ -141,6 +148,7 @@ function droppedLinkOf(
label: hopLabel(candidate),
outcome,
...(hint ? { credentialHint: hint } : {}),
+ ...(provenance?.effectiveLabel ? { provenance } : {}),
};
}
@@ -224,6 +232,7 @@ export function resultLinksFrom(
hasCredentials: entry.outcome === "not-served",
...(entry.credentialHint ? { credentialHint: entry.credentialHint } : {}),
dropped: entry.outcome,
+ ...withKeyLine(entry.provenance),
})
),
];
diff --git a/packages/cli/src/probe/probe-results-printer.ts b/packages/cli/src/probe/probe-results-printer.ts
index 4a0981a0..c4cdcd2e 100644
--- a/packages/cli/src/probe/probe-results-printer.ts
+++ b/packages/cli/src/probe/probe-results-printer.ts
@@ -374,6 +374,8 @@ export interface DroppedEntry {
label?: string;
outcome: DroppedOutcome;
credentialHint?: string;
+ /** A no-credential candidate whose credential is not an env var (Muse Code). */
+ provenance?: KeyProvenance;
}
export interface WiringInfo {
@@ -764,12 +766,17 @@ function formatContextWindow(ctx: number): string {
return `${Math.round(ctx / 1000)}K`;
}
-function buildKeyLine(activeEntry?: ChainEntry, directKeyVar?: string): string {
+function buildKeyLine(
+ activeEntry?: ChainEntry,
+ directKeyVar?: string,
+ droppedProvenance?: KeyProvenance
+): string {
if (activeEntry?.notProbed) {
return `${pc.bold}Key${pc.reset} ${pc.dim}Claude Code's own auth (not visible to this process)${pc.reset}`;
}
- if (activeEntry?.provenance) {
- const p = activeEntry.provenance;
+ const provenance = activeEntry?.provenance ?? droppedProvenance;
+ if (provenance) {
+ const p = provenance;
// `effectiveLabel` replaces `$ENV_VAR` for a provider whose credential is not
// an environment variable — Vertex, whose project comes from the ADC file or
// `gcloud config`. Printing `$VERTEX_PROJECT (not set)` there names a
@@ -845,7 +852,13 @@ function buildCardLayout(
result.chain.find((c) => c.probe?.state === "live") ??
result.chain.find((c) => c.hasCredentials);
- const keyLine = buildKeyLine(activeEntry, directKeyVar);
+ // Nothing kept: a dropped no-login candidate whose credential is not an env
+ // var (muse@ with no Muse Code login) still names its login state and fix,
+ // where `Key —` said nothing.
+ const droppedKey = activeEntry
+ ? undefined
+ : result.dropped?.find((d) => d.provenance?.effectiveLabel)?.provenance;
+ const keyLine = buildKeyLine(activeEntry, directKeyVar, droppedKey);
const wireLine =
result.wiring && !activeEntry?.notProbed
? buildWireLine(result.wiring, activeEntry?.displayName)