feat(auth): discontinue Qwen OAuth free tier (2026-04-15 cutoff) (#3291)

* feat(auth): discontinue Qwen OAuth free tier (2026-04-15 cutoff)

The Qwen OAuth free tier has reached its end-of-life date. This updates
all client-side messaging, blocks new OAuth signups, and guides existing
users to alternative providers.

* fix(test): add getModelsConfig mock and update QWEN_OAUTH test expectations

- Add getModelsConfig() to Config mocks in gemini.test.tsx (3 failures)
- Update validateNonInterActiveAuth test to expect exit for QWEN_OAUTH
  since validateAuthMethod now returns an error for discontinued free tier
This commit is contained in:
tanzhenxin 2026-04-15 22:30:20 +08:00 committed by GitHub
parent 679446d1da
commit f6271c61b6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
27 changed files with 205 additions and 133 deletions

View file

@ -181,7 +181,7 @@ describe('validateNonInterActiveAuth', () => {
expect(refreshAuthMock).toHaveBeenCalledWith(AuthType.USE_OPENAI);
});
it('uses configured QWEN_OAUTH if provided', async () => {
it('exits with error for QWEN_OAUTH (free tier discontinued)', async () => {
const nonInteractiveConfig = createMockConfig({
refreshAuth: refreshAuthMock,
getModelsConfig: vi.fn().mockReturnValue({
@ -190,12 +190,12 @@ describe('validateNonInterActiveAuth', () => {
getGenerationConfig: vi.fn().mockReturnValue({}),
}),
});
await validateNonInteractiveAuth(
undefined,
nonInteractiveConfig,
mockSettings,
await expect(
validateNonInteractiveAuth(undefined, nonInteractiveConfig, mockSettings),
).rejects.toThrow('process.exit(1)');
expect(mockWriteStderrLine).toHaveBeenCalledWith(
expect.stringContaining('discontinued'),
);
expect(refreshAuthMock).toHaveBeenCalledWith(AuthType.QWEN_OAUTH);
});
it('exits if validateAuthMethod returns error', async () => {