diff --git a/src/__tests__/bugfixes.test.ts b/src/__tests__/bugfixes.test.ts index 9b3cf3f54..bdb5dcf4c 100644 --- a/src/__tests__/bugfixes.test.ts +++ b/src/__tests__/bugfixes.test.ts @@ -594,6 +594,17 @@ describe('Gemini Vertex provider drift guards', () => { expect(is3PSection).toContain('CLAUDE_CODE_USE_GEMINI_VERTEX') }) + test('isUsing3PServices() includes Gemini Vertex flag', async () => { + const content = await file('utils/auth.ts').text() + const using3PSection = sectionBetween( + content, + 'export function isUsing3PServices', + 'function getConfiguredOtelHeadersHelper', + ) + + expect(using3PSection).toContain('CLAUDE_CODE_USE_GEMINI_VERTEX') + }) + test('API preconnect skips Gemini Vertex routing', async () => { const content = await file('utils/apiPreconnect.ts').text() const cloudSkipSection = sectionBetween( diff --git a/src/utils/auth.ts b/src/utils/auth.ts index 1e975a113..aba9d401d 100644 --- a/src/utils/auth.ts +++ b/src/utils/auth.ts @@ -1759,6 +1759,7 @@ export function isUsing3PServices(): boolean { isEnvTruthy(process.env.CLAUDE_CODE_USE_FOUNDRY) || isEnvTruthy(process.env.CLAUDE_CODE_USE_OPENAI) || isEnvTruthy(process.env.CLAUDE_CODE_USE_GEMINI) || + isEnvTruthy(process.env.CLAUDE_CODE_USE_GEMINI_VERTEX) || isEnvTruthy(process.env.CLAUDE_CODE_USE_MISTRAL) || isEnvTruthy(process.env.CLAUDE_CODE_USE_GITHUB) )