mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-14 15:21:01 -07:00
feat(routing): A/B Test Numerical Complexity Scoring for Gemini 3 (#16041)
Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
This commit is contained in:
@@ -19,6 +19,7 @@ describe('experiments', () => {
|
||||
beforeEach(() => {
|
||||
// Reset modules to clear the cached `experimentsPromise`
|
||||
vi.resetModules();
|
||||
delete process.env['GEMINI_EXP'];
|
||||
|
||||
// Mock the dependencies that `getExperiments` relies on
|
||||
vi.mocked(getClientMetadata).mockResolvedValue({
|
||||
|
||||
@@ -12,12 +12,17 @@ import type { ListExperimentsResponse } from './types.js';
|
||||
import type { ClientMetadata } from '../types.js';
|
||||
|
||||
// Mock dependencies
|
||||
vi.mock('node:fs', () => ({
|
||||
promises: {
|
||||
readFile: vi.fn(),
|
||||
},
|
||||
readFileSync: vi.fn(),
|
||||
}));
|
||||
vi.mock('node:fs', async (importOriginal) => {
|
||||
const actual = await importOriginal<typeof import('node:fs')>();
|
||||
return {
|
||||
...actual,
|
||||
promises: {
|
||||
...actual.promises,
|
||||
readFile: vi.fn(),
|
||||
},
|
||||
readFileSync: vi.fn(),
|
||||
};
|
||||
});
|
||||
vi.mock('node:os');
|
||||
vi.mock('../server.js');
|
||||
vi.mock('./client_metadata.js', () => ({
|
||||
|
||||
@@ -10,6 +10,8 @@ export const ExperimentFlags = {
|
||||
BANNER_TEXT_NO_CAPACITY_ISSUES: 45740199,
|
||||
BANNER_TEXT_CAPACITY_ISSUES: 45740200,
|
||||
ENABLE_PREVIEW: 45740196,
|
||||
ENABLE_NUMERICAL_ROUTING: 45750526,
|
||||
CLASSIFIER_THRESHOLD: 45750527,
|
||||
ENABLE_ADMIN_CONTROLS: 45752213,
|
||||
} as const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user