/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { isAutoModel, resolveModel } from '../../config/models.js';
/**
 * Handles cases where the user explicitly specifies a model (override).
 */
export class OverrideStrategy {
    name = 'override';
    async route(context, config, _baseLlmClient, _localLiteRtLmClient) {
        const overrideModel = context.requestedModel ?? config.getModel();
        // If the model is 'auto' we should pass to the next strategy.
        if (isAutoModel(overrideModel, config)) {
            return null;
        }
        // Return the overridden model name.
        return {
            model: resolveModel(overrideModel, config.getGemini31LaunchedSync?.() ?? false),
            metadata: {
                source: this.name,
                latencyMs: 0,
                reasoning: `Routing bypassed by forced model directive. Using: ${overrideModel}`,
            },
        };
    }
}
//# sourceMappingURL=overrideStrategy.js.map