mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-04-27 21:44:25 -07:00
Co-authored-by: matt korwel <matt.korwel@gmail.com>
This commit is contained in:
@@ -12,7 +12,7 @@ import type {
|
||||
RoutingDecision,
|
||||
RoutingStrategy,
|
||||
} from '../routingStrategy.js';
|
||||
import { resolveClassifierModel } from '../../config/models.js';
|
||||
import { resolveClassifierModel, isGemini3Model } from '../../config/models.js';
|
||||
import { createUserContent, Type } from '@google/genai';
|
||||
import type { Config } from '../../config/config.js';
|
||||
import { debugLogger } from '../../utils/debugLogger.js';
|
||||
@@ -134,10 +134,15 @@ export class NumericalClassifierStrategy implements RoutingStrategy {
|
||||
): Promise<RoutingDecision | null> {
|
||||
const startTime = Date.now();
|
||||
try {
|
||||
const model = context.requestedModel ?? config.getModel();
|
||||
if (!(await config.getNumericalRoutingEnabled())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (!isGemini3Model(model, config.getPreviewFeatures())) {
|
||||
return null;
|
||||
}
|
||||
|
||||
const promptId = getPromptIdWithFallback('classifier-router');
|
||||
|
||||
const finalHistory = context.history.slice(-HISTORY_TURNS_FOR_CONTEXT);
|
||||
@@ -177,7 +182,7 @@ export class NumericalClassifierStrategy implements RoutingStrategy {
|
||||
);
|
||||
|
||||
const selectedModel = resolveClassifierModel(
|
||||
config.getModel(),
|
||||
model,
|
||||
modelAlias,
|
||||
config.getPreviewFeatures(),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user