mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-07-22 07:41:23 -07:00
Respect previewFeatures value from the remote flag if undefined (#15214)
This commit is contained in:
@@ -38,6 +38,7 @@ import {
|
||||
DEFAULT_GEMINI_MODEL,
|
||||
DEFAULT_GEMINI_MODEL_AUTO,
|
||||
PREVIEW_GEMINI_MODEL,
|
||||
PREVIEW_GEMINI_MODEL_AUTO,
|
||||
} from './models.js';
|
||||
|
||||
vi.mock('fs', async (importOriginal) => {
|
||||
@@ -1862,6 +1863,15 @@ describe('Config Quota & Preview Model Access', () => {
|
||||
expect(config.getModel()).toBe(nonPreviewModel);
|
||||
});
|
||||
|
||||
it('should switch to preview auto model if enabling preview features while using default auto model', () => {
|
||||
config.setPreviewFeatures(false);
|
||||
config.setModel(DEFAULT_GEMINI_MODEL_AUTO);
|
||||
|
||||
config.setPreviewFeatures(true);
|
||||
|
||||
expect(config.getModel()).toBe(PREVIEW_GEMINI_MODEL_AUTO);
|
||||
});
|
||||
|
||||
it('should NOT reset model if enabling preview features', () => {
|
||||
config.setPreviewFeatures(false);
|
||||
config.setModel(PREVIEW_GEMINI_MODEL); // Just pretending it was set somehow
|
||||
|
||||
Reference in New Issue
Block a user