chore(core): refactor model resolution and cleanup fallback logic (#15228)

This commit is contained in:
Adam Weidman
2025-12-22 10:18:51 -05:00
committed by GitHub
parent 58fd00a3df
commit d6a2f1d670
9 changed files with 28 additions and 60 deletions

View File

@@ -7,8 +7,8 @@
import type { Config } from '../../config/config.js';
import {
DEFAULT_GEMINI_MODEL_AUTO,
getEffectiveModel,
PREVIEW_GEMINI_MODEL_AUTO,
resolveModel,
} from '../../config/models.js';
import type { BaseLlmClient } from '../../core/baseLlmClient.js';
import type {
@@ -39,7 +39,7 @@ export class OverrideStrategy implements RoutingStrategy {
// Return the overridden model name.
return {
model: getEffectiveModel(overrideModel, config.getPreviewFeatures()),
model: resolveModel(overrideModel, config.getPreviewFeatures()),
metadata: {
source: this.name,
latencyMs: 0,