diff --git a/packages/ai/src/providers/ollama.ts b/packages/ai/src/providers/ollama.ts index eb7689d25..22186b0cf 100644 --- a/packages/ai/src/providers/ollama.ts +++ b/packages/ai/src/providers/ollama.ts @@ -1,3 +1,4 @@ +import { abortableSleep } from "@oh-my-pi/pi-utils"; import type { TSchema } from "@sinclair/typebox"; import { getEnvApiKey } from "../stream"; import type { @@ -14,7 +15,6 @@ import type { ToolResultMessage, UserMessage, } from "../types"; -import { abortableSleep } from "@oh-my-pi/pi-utils"; import { normalizeSystemPrompts } from "../utils"; import { AssistantMessageEventStream } from "../utils/event-stream"; import { finalizeErrorMessage, type RawHttpRequestDump } from "../utils/http-inspector"; diff --git a/packages/ai/test/auth-storage-credential-disabled-event.test.ts b/packages/ai/test/auth-storage-credential-disabled-event.test.ts index 63f086ab2..6c3bb0f6d 100644 --- a/packages/ai/test/auth-storage-credential-disabled-event.test.ts +++ b/packages/ai/test/auth-storage-credential-disabled-event.test.ts @@ -4,6 +4,7 @@ import * as os from "node:os"; import * as path from "node:path"; import { AuthCredentialStore, AuthStorage, type CredentialDisabledEvent } from "../src/auth-storage"; import * as oauthUtils from "../src/utils/oauth"; + // Env vars short-circuit AuthStorage.getApiKey before the OAuth refresh path runs; suppress // them for every test in this file so the credential-disable code path can be exercised. const SUPPRESS_ANTHROPIC_ENV = ["ANTHROPIC_API_KEY", "ANTHROPIC_OAUTH_TOKEN"] as const;