Remove previewFeatures and default to Gemini 3 (#18414)

This commit is contained in:
Sehoon Shon
2026-02-06 13:02:57 -05:00
committed by GitHub
parent 1495294cc0
commit 61d92c4a21
57 changed files with 91 additions and 797 deletions

View File

@@ -75,7 +75,6 @@ const createMockConfig = (overrides: Partial<Config> = {}): Config =>
),
getActiveModel: vi.fn(() => MOCK_PRO_MODEL),
getModel: vi.fn(() => MOCK_PRO_MODEL),
getPreviewFeatures: vi.fn(() => false),
getUserTier: vi.fn(() => undefined),
isInteractive: vi.fn(() => false),
...overrides,
@@ -141,7 +140,6 @@ describe('handleFallback', () => {
it('uses availability selection with correct candidates when enabled', async () => {
// Direct mock manipulation since it's already a vi.fn()
vi.mocked(policyConfig.getPreviewFeatures).mockReturnValue(true);
vi.mocked(policyConfig.getModel).mockReturnValue(
DEFAULT_GEMINI_MODEL_AUTO,
);
@@ -210,7 +208,6 @@ describe('handleFallback', () => {
it('does not wrap around to upgrade candidates if the current model was selected at the end (e.g. by router)', async () => {
// Last-resort failure (Flash) in [Preview, Pro, Flash] checks Preview then Pro (all upstream).
vi.mocked(policyConfig.getPreviewFeatures).mockReturnValue(true);
vi.mocked(policyConfig.getModel).mockReturnValue(
DEFAULT_GEMINI_MODEL_AUTO,
);
@@ -241,7 +238,6 @@ describe('handleFallback', () => {
skipped: [],
});
policyHandler.mockResolvedValue('retry_once');
vi.mocked(policyConfig.getPreviewFeatures).mockReturnValue(true);
vi.mocked(policyConfig.getActiveModel).mockReturnValue(
PREVIEW_GEMINI_MODEL,
);