The best way to control Claude Code, Codex and more from any computer or phone
fix(models): new models also surface the CLI update that supports them (#33515)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Theo Browne committed
Nov 9, 2026 at 12:03 UTC
eb6e7fa2f6a47522fa44bbf1b942ba7157860b43
4 files changed
+11
-3
apps/server/src/provider/ProviderRegistry.test.ts
+5
-2
@@ -1574,9 +1574,9 @@ it.layer(
1574
["codex_second-package", "1.0.0"],
1575
]),
1576
);
1577
- const readCachedVersion = (key: string) =>
1577
+ const readCachedVersion = (key: string, latest = "2.0.0") =>
1578
ProviderLatestVersions.ProviderLatestVersions.use((latestVersions) =>
1579
- latestVersions.cached(key, Effect.succeed("2.0.0")),
1579
+ latestVersions.cached(key, Effect.succeed(latest)),
1580
);
1581
1582
yield* Effect.gen(function* () {
@@ -1615,6 +1615,7 @@ it.layer(
1615
const probesBefore = yield* Ref.get(second.probes);
1616
yield* registry.refreshModelCatalog;
1617
assert.strictEqual(yield* Ref.get(second.probes), probesBefore);
1618
+ assert.strictEqual(yield* readCachedVersion("codex_second-package", "3.0.0"), "2.0.0");
1619
yield* Ref.set(manifest, {
1620
...ModelManifest.BUNDLED_MODEL_MANIFEST,
1621
updatedAt: "2999-01-01T00:00:00Z",
@@ -1622,6 +1623,8 @@ it.layer(
1623
yield* registry.refreshModelCatalog;
1624
yield* registry.refreshModelCatalog;
1625
assert.strictEqual(yield* Ref.get(second.probes), probesBefore + 1);
1626
+ // A changed manifest also rechecks latest CLI versions.
1627
+ assert.strictEqual(yield* readCachedVersion("codex_second-package", "3.0.0"), "3.0.0");
1628
}).pipe(
1629
Effect.provide(
1630
ProviderRegistry.layer.pipe(
apps/server/src/provider/ProviderRegistry.ts
+3
-1
@@ -94,7 +94,7 @@ export class ProviderRegistry extends Context.Service<
94
95
/**
96
* For an opened model picker: refetch a model manifest older than a few
97
- * minutes, and probe providers only when it has models they have not seen.
97
+ * minutes. When it changed, recheck latest CLI versions and probe providers.
98
*/
99
readonly refreshModelCatalog: Effect.Effect<void>;
100
@@ -1088,6 +1088,8 @@ export const layer = Layer.effect(
1088
// The first pass can be one that started before the fetch, so allow one more.
1089
for (let pass = 0; pass < 2; pass++) {
1090
if ((yield* Ref.get(probedManifestUpdatedAt)) === updatedAt) return;
1091
+ // A new model usually ships with the CLI release that supports it.
1092
+ yield* latestVersions.invalidateAll;
1093
yield* refreshAll();
1094
}
1095
});
apps/server/src/provider/providerMaintenanceRunner.test.ts
+1
@@ -272,6 +272,7 @@ function layerFailingLatestLookupAfterFirst() {
272
return yield* lookup;
273
}),
274
invalidate: () => Effect.void,
275
+ invalidateAll: Effect.void,
276
});
277
}
278
packages/provider-core/src/server/ProviderLatestVersions.ts
+2
@@ -26,6 +26,7 @@ export class ProviderLatestVersions extends Context.Service<
26
options?: { readonly fresh?: boolean },
27
) => Effect.Effect<string | null, E, R>;
28
readonly invalidate: (key: string) => Effect.Effect<void>;
29
+ readonly invalidateAll: Effect.Effect<void>;
30
}
31
>()("@t3tools/provider-core/server/ProviderLatestVersions") {}
32
@@ -84,6 +85,7 @@ export const make = Effect.fn("ProviderLatestVersions.make")(function* (
85
return next;
86
});
87
}),
88
+ invalidateAll: Ref.set(entries, new Map()),
89
});
90
});
91