feat: add Gemini ADC and access token auth (#312)
* feat: add Gemini ADC and access token auth * feat: add Gemini token and ADC provider setup * feat: add Gemini token and ADC provider setup * fix: honor Gemini auth mode on restart
This commit is contained in:
@@ -197,6 +197,23 @@ test('buildProfileSaveMessage maps provider fields without echoing secrets', ()
|
||||
expect(message).not.toContain('sk-secret-12345678')
|
||||
})
|
||||
|
||||
test('buildProfileSaveMessage describes Gemini access token / ADC mode clearly', () => {
|
||||
const message = buildProfileSaveMessage(
|
||||
'gemini',
|
||||
{
|
||||
GEMINI_AUTH_MODE: 'access-token',
|
||||
GEMINI_MODEL: 'gemini-2.5-flash',
|
||||
GEMINI_BASE_URL: 'https://generativelanguage.googleapis.com/v1beta/openai',
|
||||
},
|
||||
'D:/codings/Opensource/openclaude/.openclaude-profile.json',
|
||||
)
|
||||
|
||||
expect(message).toContain('Saved Google Gemini profile.')
|
||||
expect(message).toContain('Model: gemini-2.5-flash')
|
||||
expect(message).toContain('Credentials: access token (stored securely)')
|
||||
expect(message).not.toContain('AIza')
|
||||
})
|
||||
|
||||
test('buildCurrentProviderSummary redacts poisoned model and endpoint values', () => {
|
||||
const summary = buildCurrentProviderSummary({
|
||||
processEnv: {
|
||||
|
||||
Reference in New Issue
Block a user