From 3e81882b97b0ea5ea50e488c094e297fe439d4f8 Mon Sep 17 00:00:00 2001 From: JATMN Date: Fri, 23 Oct 2026 13:36:44 -0700 Subject: [PATCH] test: clear provider model cache after request tests (#2359) --- src/services/api/client.test.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/api/client.test.ts b/src/services/api/client.test.ts index 28a75d137..1f43a2756 100644 --- a/src/services/api/client.test.ts +++ b/src/services/api/client.test.ts @@ -7,6 +7,7 @@ import { registerGateway, } from '../../integrations/index.js' import { publicBuildVersion } from '../../utils/version.js' +import { resetModelStringsForTestingOnly } from '../../bootstrap/state.js' // bun:test keeps mock.module() registrations process-global across test files. // Load and re-register the real module before importing the client so a prior @@ -328,6 +329,7 @@ afterEach(() => { originalEnv.CLAUDE_CODE_PROVIDER_PROFILE_ENV_APPLIED_ID, ) globalThis.fetch = originalFetch + resetModelStringsForTestingOnly() } finally { releaseSharedMutationLock() }