Skip to content

Commit 499732b

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) <noreply@anthropic.com>
1 parent fd7ee2c commit 499732b

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
@@ -556,7 +556,7 @@ describe("ModelManifest service", () => {
556556
),
557557
);
558558

559-
it.live("does not fetch when provider update checks are disabled", () =>
559+
it.live("still fetches when provider update checks are disabled", () =>
560560
Effect.gen(function* () {
561561
let fetchCount = 0;
562562
const service = yield* ModelManifest.make.pipe(
@@ -567,9 +567,9 @@ describe("ModelManifest service", () => {
567567
}),
568568
),
569569
);
570-
assert.deepStrictEqual(yield* service.refresh, ModelManifest.BUNDLED_MODEL_MANIFEST);
571-
assert.deepStrictEqual(yield* service.forceRefresh, ModelManifest.BUNDLED_MODEL_MANIFEST);
572-
assert.strictEqual(fetchCount, 0);
570+
assert.deepStrictEqual(yield* service.refresh, REMOTE_MANIFEST);
571+
assert.deepStrictEqual(yield* service.forceRefresh, REMOTE_MANIFEST);
572+
assert.strictEqual(fetchCount, 2);
573573
}).pipe(
574574
Effect.scoped,
575575
Effect.provide(

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

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ import * as Semaphore from "effect/Semaphore";
3131
import { HttpClient, HttpClientResponse } from "effect/unstable/http";
3232

3333
import { ServerConfig } from "../config.ts";
34-
import * as ServerSettings from "../serverSettings.ts";
3534
import { hasValidClaudeManifestAdapters } from "./ClaudeModelManifest.ts";
3635
import bundledManifestJson from "./model-manifest.json" with { type: "json" };
3736
import { ProviderCompatibilityPolicy } from "./providerCompatibility.ts";
@@ -340,7 +339,6 @@ export const make = Effect.gen(function* () {
340339
const fileSystem = yield* FileSystem.FileSystem;
341340
const path = yield* Path.Path;
342341
const config = yield* ServerConfig;
343-
const settingsService = yield* ServerSettings.ServerSettingsService;
344342
const httpClient = yield* HttpClient.HttpClient;
345343
const serviceScope = yield* Effect.scope;
346344

@@ -385,15 +383,6 @@ export const make = Effect.gen(function* () {
385383
if (!force && isWithin(fetchedAtMs, MANIFEST_TTL_MS)) return manifest;
386384
if (!force && isWithin(lastAttemptMs, MANIFEST_RETRY_MS)) return manifest;
387385

388-
// The same switch that gates provider CLI update checks. It stops network
389-
// fetches only: a manifest already cached on disk from an earlier fetch
390-
// stays in effect, since the setting is about phoning home, not about
391-
// discarding data the server already holds.
392-
const settings = yield* settingsService.getSettings.pipe(
393-
Effect.catchCause(() => Effect.succeed(null)),
394-
);
395-
if (settings !== null && !settings.enableProviderUpdateChecks) return manifest;
396-
397386
lastAttemptMs = now;
398387
const fetched = yield* httpClient.get(MODEL_MANIFEST_URL).pipe(
399388
Effect.flatMap(HttpClientResponse.filterStatusOk),

0 commit comments

Comments
 (0)