From bd2798ec5f1f89d2df21b5833da01fbc88c5f4bc Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Mon, 6 Apr 2026 23:24:22 +0100 Subject: [PATCH] refactor: dedupe pi model discovery record helper --- src/agents/pi-model-discovery.ts | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/agents/pi-model-discovery.ts b/src/agents/pi-model-discovery.ts index 5f908551949..bec81772585 100644 --- a/src/agents/pi-model-discovery.ts +++ b/src/agents/pi-model-discovery.ts @@ -15,6 +15,7 @@ import { resolveProviderSyntheticAuthWithPlugin, } from "../plugins/provider-runtime.js"; import type { ProviderRuntimeModel } from "../plugins/types.js"; +import { isRecord } from "../utils.js"; import { ensureAuthProfileStore } from "./auth-profiles.js"; import { resolveProviderEnvApiKeyCandidates } from "./model-auth-env-vars.js"; import { resolveEnvApiKey } from "./model-auth-env.js"; @@ -54,10 +55,6 @@ function createInMemoryAuthStorageBackend( }; } -function isRecord(value: unknown): value is Record { - return typeof value === "object" && value !== null && !Array.isArray(value); -} - function normalizeRegistryModel(value: T, agentDir: string): T { if (!isRecord(value)) { return value;