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;