mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-26 21:14:35 -07:00
feat(vertex): add settings for Vertex AI request routing (#25513)
This commit is contained in:
@@ -836,12 +836,37 @@ describe('Server Config (config.ts)', () => {
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
);
|
||||
// Verify that contentGeneratorConfig is updated
|
||||
expect(config.getContentGeneratorConfig()).toEqual(mockContentConfig);
|
||||
expect(GeminiClient).toHaveBeenCalledWith(config);
|
||||
});
|
||||
|
||||
it('should pass Vertex AI routing settings when refreshing auth', async () => {
|
||||
const vertexAiRouting = {
|
||||
requestType: 'shared' as const,
|
||||
sharedRequestType: 'priority' as const,
|
||||
};
|
||||
const config = new Config({
|
||||
...baseParams,
|
||||
vertexAiRouting,
|
||||
});
|
||||
|
||||
vi.mocked(createContentGeneratorConfig).mockResolvedValue({});
|
||||
|
||||
await config.refreshAuth(AuthType.USE_VERTEX_AI);
|
||||
|
||||
expect(createContentGeneratorConfig).toHaveBeenCalledWith(
|
||||
config,
|
||||
AuthType.USE_VERTEX_AI,
|
||||
undefined,
|
||||
undefined,
|
||||
undefined,
|
||||
vertexAiRouting,
|
||||
);
|
||||
});
|
||||
|
||||
it('should reset model availability status', async () => {
|
||||
const config = new Config(baseParams);
|
||||
const service = config.getModelAvailabilityService();
|
||||
|
||||
Reference in New Issue
Block a user