From 96e4fdb443c5f3c922ea5efb90ae5780630ea873 Mon Sep 17 00:00:00 2001 From: Peter Steinberger Date: Sun, 11 Jan 2026 11:24:25 +0000 Subject: [PATCH] test: skip codex refresh token reuse --- src/gateway/gateway-models.profiles.live.test.ts | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/gateway/gateway-models.profiles.live.test.ts b/src/gateway/gateway-models.profiles.live.test.ts index c08f3a861..86b393c22 100644 --- a/src/gateway/gateway-models.profiles.live.test.ts +++ b/src/gateway/gateway-models.profiles.live.test.ts @@ -75,6 +75,10 @@ function isGoogleModelNotFoundText(text: string): boolean { return false; } +function isRefreshTokenReused(error: string): boolean { + return /refresh_token_reused/i.test(error); +} + function randomImageProbeCode(len = 10): string { const alphabet = "2345689ABCEF"; const bytes = randomBytes(len); @@ -533,7 +537,15 @@ describeLive("gateway live (dev agent, profile keys)", () => { } } } catch (err) { - failures.push({ model: modelKey, error: String(err) }); + const message = String(err); + // OpenAI Codex refresh tokens can become single-use; skip instead of failing all live tests. + if ( + model.provider === "openai-codex" && + isRefreshTokenReused(message) + ) { + continue; + } + failures.push({ model: modelKey, error: message }); } }