Skip to content

Commit ae1a3b1

Browse files
only21milclaude
andauthored
fix(claude): keep model upgrade notices when signed out (pingdotgg#23272)
Co-authored-by: Claude Opus 5.5 <[email protected]>
1 parent 13c7de2 commit ae1a3b1

2 files changed

Lines changed: 37 additions & 0 deletions

File tree

‎apps/server/src/provider/ClaudeProvider.ts‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ export const checkClaudeProviderStatus = Effect.fn("checkClaudeProviderStatus")(
612612
enabled: claudeSettings.enabled,
613613
checkedAt,
614614
models,
615+
updateRequiredModels,
615616
slashCommands: dedupedSlashCommands,
616617
skills,
617618
probe: {

‎apps/server/src/provider/ProviderRegistry.test.ts‎

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2465,6 +2465,42 @@ it.layer(
24652465
),
24662466
);
24672467

2468+
it.effect("tells a logged-out CLI which models need a Claude Code update", () =>
2469+
Effect.gen(function* () {
2470+
const status = yield* checkClaudeProviderStatus(
2471+
defaultClaudeSettings,
2472+
claudeCapabilities({
2473+
tokenSource: "none",
2474+
apiKeySource: "none",
2475+
apiProvider: "firstParty",
2476+
}),
2477+
{ ANTHROPIC_BASE_URL: "" },
2478+
undefined,
2479+
{
2480+
models: [
2481+
{
2482+
model: { slug: "claude-next", name: "Next", isCustom: false, capabilities: null },
2483+
runtime: {},
2484+
compatibility: { minVersion: "1.1.0" },
2485+
},
2486+
],
2487+
},
2488+
);
2489+
assert.strictEqual(status.auth.status, "unauthenticated");
2490+
assert.deepStrictEqual(status.updateRequiredModels, [
2491+
{ slug: "claude-next", name: "Next", minVersion: "1.1.0" },
2492+
]);
2493+
}).pipe(
2494+
Effect.provide(
2495+
layerMockSpawner((args) => {
2496+
const joined = args.join(" ");
2497+
if (joined === "--version") return { stdout: "1.0.0\n", stderr: "", code: 0 };
2498+
throw new Error(`Unexpected args: ${joined}`);
2499+
}),
2500+
),
2501+
),
2502+
);
2503+
24682504
it.effect.each([
24692505
{ source: "inherited HTTPS endpoint", baseUrl: "https://proxy.example/api", overrides: [] },
24702506
{

0 commit comments

Comments
 (0)