mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-05-03 06:00:49 +00:00
feat: add OpenAI and Qwen OAuth auth support to Zed ACP integration (#678)
- Add USE_OPENAI and QWEN_OAUTH authentication methods to GeminiAgent's authMethods array - Enables Zed editor integration to support all available authentication options - Add test case for QWEN_OAUTH authentication configuration - Maintains backward compatibility with existing Google authentication methods This allows Zed users to authenticate using: - OpenAI API key (requires OPENAI_API_KEY environment variable) - Qwen OAuth (2000 daily requests with OAuth2 flow) - Existing Google authentication methods (unchanged)
This commit is contained in:
parent
014059e8a6
commit
deb99a3b21
2 changed files with 24 additions and 0 deletions
|
|
@ -126,6 +126,18 @@ describe('validateNonInterActiveAuth', () => {
|
|||
expect(refreshAuthMock).toHaveBeenCalledWith(AuthType.USE_OPENAI);
|
||||
});
|
||||
|
||||
it('uses configured QWEN_OAUTH if provided', async () => {
|
||||
const nonInteractiveConfig: NonInteractiveConfig = {
|
||||
refreshAuth: refreshAuthMock,
|
||||
};
|
||||
await validateNonInteractiveAuth(
|
||||
AuthType.QWEN_OAUTH,
|
||||
undefined,
|
||||
nonInteractiveConfig,
|
||||
);
|
||||
expect(refreshAuthMock).toHaveBeenCalledWith(AuthType.QWEN_OAUTH);
|
||||
});
|
||||
|
||||
it('uses USE_VERTEX_AI if GOOGLE_GENAI_USE_VERTEXAI is true (with GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION)', async () => {
|
||||
process.env['GOOGLE_GENAI_USE_VERTEXAI'] = 'true';
|
||||
process.env['GOOGLE_CLOUD_PROJECT'] = 'test-project';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue