Skip to content

Commit e490cf9

Browse files
committed
feat(core): remove previewFeatures and default to Gemini 3
1 parent fe975da commit e490cf9

53 files changed

Lines changed: 75 additions & 762 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/a2a-server/src/config/config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import {
1818
loadServerHierarchicalMemory,
1919
GEMINI_DIR,
2020
DEFAULT_GEMINI_EMBEDDING_MODEL,
21-
DEFAULT_GEMINI_MODEL,
2221
type ExtensionLoader,
2322
startupProfiler,
2423
PREVIEW_GEMINI_MODEL,
@@ -60,9 +59,7 @@ export async function loadConfig(
6059

6160
const configParams: ConfigParameters = {
6261
sessionId: taskId,
63-
model: settings.general?.previewFeatures
64-
? PREVIEW_GEMINI_MODEL
65-
: DEFAULT_GEMINI_MODEL,
62+
model: PREVIEW_GEMINI_MODEL,
6663
embeddingModel: DEFAULT_GEMINI_EMBEDDING_MODEL,
6764
sandbox: undefined, // Sandbox might not be relevant for a server-side agent
6865
targetDir: workspaceDir, // Or a specific directory the agent operates on
@@ -104,7 +101,6 @@ export async function loadConfig(
104101
trustedFolder: true,
105102
extensionLoader,
106103
checkpointing,
107-
previewFeatures: settings.general?.previewFeatures,
108104
interactive: true,
109105
enableInteractiveShell: true,
110106
ptyInfo: 'auto',

packages/a2a-server/src/config/settings.test.ts

Lines changed: 0 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -89,67 +89,6 @@ describe('loadSettings', () => {
8989
vi.restoreAllMocks();
9090
});
9191

92-
it('should load nested previewFeatures from user settings', () => {
93-
const settings = {
94-
general: {
95-
previewFeatures: true,
96-
},
97-
};
98-
fs.writeFileSync(USER_SETTINGS_PATH, JSON.stringify(settings));
99-
100-
const result = loadSettings(mockWorkspaceDir);
101-
expect(result.general?.previewFeatures).toBe(true);
102-
});
103-
104-
it('should load nested previewFeatures from workspace settings', () => {
105-
const settings = {
106-
general: {
107-
previewFeatures: true,
108-
},
109-
};
110-
const workspaceSettingsPath = path.join(
111-
mockGeminiWorkspaceDir,
112-
'settings.json',
113-
);
114-
fs.writeFileSync(workspaceSettingsPath, JSON.stringify(settings));
115-
116-
const result = loadSettings(mockWorkspaceDir);
117-
expect(result.general?.previewFeatures).toBe(true);
118-
});
119-
120-
it('should prioritize workspace settings over user settings', () => {
121-
const userSettings = {
122-
general: {
123-
previewFeatures: false,
124-
},
125-
};
126-
fs.writeFileSync(USER_SETTINGS_PATH, JSON.stringify(userSettings));
127-
128-
const workspaceSettings = {
129-
general: {
130-
previewFeatures: true,
131-
},
132-
};
133-
const workspaceSettingsPath = path.join(
134-
mockGeminiWorkspaceDir,
135-
'settings.json',
136-
);
137-
fs.writeFileSync(workspaceSettingsPath, JSON.stringify(workspaceSettings));
138-
139-
const result = loadSettings(mockWorkspaceDir);
140-
expect(result.general?.previewFeatures).toBe(true);
141-
});
142-
143-
it('should handle missing previewFeatures', () => {
144-
const settings = {
145-
general: {},
146-
};
147-
fs.writeFileSync(USER_SETTINGS_PATH, JSON.stringify(settings));
148-
149-
const result = loadSettings(mockWorkspaceDir);
150-
expect(result.general?.previewFeatures).toBeUndefined();
151-
});
152-
15392
it('should load other top-level settings correctly', () => {
15493
const settings = {
15594
showMemoryUsage: true,

packages/a2a-server/src/config/settings.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@ export interface Settings {
3131
showMemoryUsage?: boolean;
3232
checkpointing?: CheckpointingSettings;
3333
folderTrust?: boolean;
34-
general?: {
35-
previewFeatures?: boolean;
36-
};
3734

3835
// Git-aware file filtering settings
3936
fileFiltering?: {

packages/cli/src/config/config.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ import {
1515
setGeminiMdFilename as setServerGeminiMdFilename,
1616
getCurrentGeminiMdFilename,
1717
ApprovalMode,
18-
DEFAULT_GEMINI_MODEL_AUTO,
1918
DEFAULT_GEMINI_EMBEDDING_MODEL,
2019
DEFAULT_FILE_FILTERING_OPTIONS,
2120
DEFAULT_MEMORY_FILE_FILTERING_OPTIONS,
@@ -662,9 +661,7 @@ export async function loadCliConfig(
662661
);
663662
policyEngineConfig.nonInteractive = !interactive;
664663

665-
const defaultModel = settings.general?.previewFeatures
666-
? PREVIEW_GEMINI_MODEL_AUTO
667-
: DEFAULT_GEMINI_MODEL_AUTO;
664+
const defaultModel = PREVIEW_GEMINI_MODEL_AUTO;
668665
const specifiedModel =
669666
argv.model || process.env['GEMINI_MODEL'] || settings.model?.name;
670667

@@ -740,7 +737,6 @@ export async function loadCliConfig(
740737
settings.context?.loadMemoryFromIncludeDirectories || false,
741738
debugMode,
742739
question,
743-
previewFeatures: settings.general?.previewFeatures,
744740

745741
coreTools: settings.tools?.core || undefined,
746742
allowedTools: allowedTools.length > 0 ? allowedTools : undefined,

packages/cli/src/config/settingsSchema.test.ts

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -328,30 +328,6 @@ describe('SettingsSchema', () => {
328328
).toBe('Enable debug logging of keystrokes to the console.');
329329
});
330330

331-
it('should have previewFeatures setting in schema', () => {
332-
expect(
333-
getSettingsSchema().general.properties.previewFeatures,
334-
).toBeDefined();
335-
expect(getSettingsSchema().general.properties.previewFeatures.type).toBe(
336-
'boolean',
337-
);
338-
expect(
339-
getSettingsSchema().general.properties.previewFeatures.category,
340-
).toBe('General');
341-
expect(
342-
getSettingsSchema().general.properties.previewFeatures.default,
343-
).toBe(false);
344-
expect(
345-
getSettingsSchema().general.properties.previewFeatures.requiresRestart,
346-
).toBe(false);
347-
expect(
348-
getSettingsSchema().general.properties.previewFeatures.showInDialog,
349-
).toBe(true);
350-
expect(
351-
getSettingsSchema().general.properties.previewFeatures.description,
352-
).toBe('Enable preview features (e.g., preview models).');
353-
});
354-
355331
it('should have enableAgents setting in schema', () => {
356332
const setting = getSettingsSchema().experimental.properties.enableAgents;
357333
expect(setting).toBeDefined();

packages/cli/src/config/settingsSchema.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -162,15 +162,6 @@ const SETTINGS_SCHEMA = {
162162
description: 'General application settings.',
163163
showInDialog: false,
164164
properties: {
165-
previewFeatures: {
166-
type: 'boolean',
167-
label: 'Preview Features (e.g., models)',
168-
category: 'General',
169-
requiresRestart: false,
170-
default: false,
171-
description: 'Enable preview features (e.g., preview models).',
172-
showInDialog: true,
173-
},
174165
preferredEditor: {
175166
type: 'string',
176167
label: 'Preferred Editor',

packages/cli/src/config/settings_repro.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,6 @@ describe('Settings Repro', () => {
134134
enablePromptCompletion: false,
135135
preferredEditor: 'vim',
136136
vimMode: false,
137-
previewFeatures: false,
138137
},
139138
security: {
140139
auth: {

packages/cli/src/test-utils/mockConfig.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,6 @@ export const createMockConfig = (overrides: Partial<Config> = {}): Config =>
151151
getAllowedMcpServers: vi.fn().mockReturnValue([]),
152152
getBlockedMcpServers: vi.fn().mockReturnValue([]),
153153
getExperiments: vi.fn().mockReturnValue(undefined),
154-
getPreviewFeatures: vi.fn().mockReturnValue(false),
155154
getHasAccessToPreviewModel: vi.fn().mockReturnValue(false),
156155
...overrides,
157156
}) as unknown as Config;

packages/cli/src/ui/AppContainer.tsx

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1780,15 +1780,6 @@ Logging in with Google... Restarting Gemini CLI to continue.
17801780
setDefaultBannerText(defaultBanner);
17811781
setWarningBannerText(warningBanner);
17821782
setBannerVisible(true);
1783-
const authType = config.getContentGeneratorConfig()?.authType;
1784-
if (
1785-
authType === AuthType.USE_GEMINI ||
1786-
authType === AuthType.USE_VERTEX_AI
1787-
) {
1788-
setDefaultBannerText(
1789-
'Gemini 3 Flash and Pro are now available. \nEnable "Preview features" in /settings. \nLearn more at https://goo.gle/enable-preview-features',
1790-
);
1791-
}
17921783
}
17931784
};
17941785
// eslint-disable-next-line @typescript-eslint/no-floating-promises

packages/cli/src/ui/components/AppHeader.test.tsx

Lines changed: 0 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -89,53 +89,6 @@ describe('<AppHeader />', () => {
8989
unmount();
9090
});
9191

92-
it('should render the banner when previewFeatures is disabled', () => {
93-
const mockConfig = makeFakeConfig({ previewFeatures: false });
94-
const uiState = {
95-
history: [],
96-
bannerData: {
97-
defaultText: 'This is the default banner',
98-
warningText: '',
99-
},
100-
bannerVisible: true,
101-
};
102-
103-
const { lastFrame, unmount } = renderWithProviders(
104-
<AppHeader version="1.0.0" />,
105-
{
106-
config: mockConfig,
107-
uiState,
108-
},
109-
);
110-
111-
expect(lastFrame()).toContain('This is the default banner');
112-
expect(lastFrame()).toMatchSnapshot();
113-
unmount();
114-
});
115-
116-
it('should not render the banner when previewFeatures is enabled', () => {
117-
const mockConfig = makeFakeConfig({ previewFeatures: true });
118-
const uiState = {
119-
history: [],
120-
bannerData: {
121-
defaultText: 'This is the default banner',
122-
warningText: '',
123-
},
124-
};
125-
126-
const { lastFrame, unmount } = renderWithProviders(
127-
<AppHeader version="1.0.0" />,
128-
{
129-
config: mockConfig,
130-
uiState,
131-
},
132-
);
133-
134-
expect(lastFrame()).not.toContain('This is the default banner');
135-
expect(lastFrame()).toMatchSnapshot();
136-
unmount();
137-
});
138-
13992
it('should not render the default banner if shown count is 5 or more', () => {
14093
const mockConfig = makeFakeConfig();
14194
const uiState = {

0 commit comments

Comments
 (0)