mirror of
https://github.com/Gitlawb/openclaude.git
synced 2026-11-06 20:58:14 -04:00
fix(gemini-vertex): add CLAUDE_CODE_USE_GEMINI_VERTEX to isUsing3PServices()
The exported isUsing3PServices() helper was missing the Gemini Vertex flag, causing /login //logout to remain visible and auth status to report as first-party when CLAUDE_CODE_USE_GEMINI_VERTEX=1. The local is3P check inside isAnthropicAuthEnabled() was already correct; this aligns the exported helper to match. Adds a dedicated drift guard test targeting isUsing3PServices() directly, since the existing test only covered the separate local is3P block. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
f4f6a27f97
commit
6fce68b90c
@@ -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(
|
||||
|
||||
@@ -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)
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user