Skip to content

Commit 2e2e540

Browse files
Vrtak-CZclaude
andcommitted
fix(server): disabling provider update checks no longer freezes model lists
The model manifest refresh was gated on `enableProviderUpdateChecks`, so turning off CLI version checks also stopped fetching new model metadata. The setting now only controls provider CLI version checks. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
1 parent 58d2532 commit 2e2e540

2 files changed

Lines changed: 4 additions & 15 deletions

File tree

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,7 +450,7 @@ describe("ModelManifest service", () => {
450450
),
451451
);
452452

453-
it.live("does not fetch when provider update checks are disabled", () =>
453+
it.live("still fetches when provider update checks are disabled", () =>
454454
Effect.gen(function* () {
455455
let fetchCount = 0;
456456
const service = yield* ModelManifest.make.pipe(
@@ -461,9 +461,9 @@ describe("ModelManifest service", () => {
461461
}),
462462
),
463463
);
464-
assert.deepStrictEqual(yield* service.refresh, ModelManifest.BUNDLED_MODEL_MANIFEST);
465-
assert.deepStrictEqual(yield* service.forceRefresh, ModelManifest.BUNDLED_MODEL_MANIFEST);
466-
assert.strictEqual(fetchCount, 0);
464+
assert.deepStrictEqual(yield* service.refresh, REMOTE_MANIFEST);
465+
assert.deepStrictEqual(yield* service.forceRefresh, REMOTE_MANIFEST);
466+
assert.strictEqual(fetchCount, 2);
467467
}).pipe(
468468
Effect.scoped,
469469
Effect.provide(

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ import { HttpClient, HttpClientResponse } from "effect/http";
3030

3131
import { writeFileStringAtomically } from "@t3tools/shared/atomicWrite";
3232
import { ServerConfig } from "../config.ts";
33-
import * as ServerSettings from "../serverSettings.ts";
3433
import { hasValidClaudeManifestAdapters } from "./ClaudeModelManifest.ts";
3534
import bundledManifestJson from "./model-manifest.json" with { type: "json" };
3635
import { ProviderCompatibilityPolicy } from "./providerCompatibility.ts";
@@ -220,7 +219,6 @@ export const make = Effect.gen(function* () {
220219
const fileSystem = yield* FileSystem.FileSystem;
221220
const path = yield* Path.Path;
222221
const config = yield* ServerConfig;
223-
const settingsService = yield* ServerSettings.ServerSettingsService;
224222
const httpClient = yield* HttpClient.HttpClient;
225223
const serviceScope = yield* Effect.scope;
226224

@@ -265,15 +263,6 @@ export const make = Effect.gen(function* () {
265263
if (!force && isWithin(fetchedAtMs, MANIFEST_TTL_MS)) return manifest;
266264
if (!force && isWithin(lastAttemptMs, MANIFEST_RETRY_MS)) return manifest;
267265

268-
// The same switch that gates provider CLI update checks. It stops network
269-
// fetches only: a manifest already cached on disk from an earlier fetch
270-
// stays in effect, since the setting is about phoning home, not about
271-
// discarding data the server already holds.
272-
const settings = yield* settingsService.getSettings.pipe(
273-
Effect.catchCause(() => Effect.succeed(null)),
274-
);
275-
if (settings !== null && !settings.enableProviderUpdateChecks) return manifest;
276-
277266
lastAttemptMs = now;
278267
const fetched = yield* httpClient.get(MODEL_MANIFEST_URL).pipe(
279268
Effect.flatMap(HttpClientResponse.filterStatusOk),

0 commit comments

Comments
 (0)