"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
    return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.getMaxCompletionTokensForDeployment = exports.clampMaxCompletionTokens = exports.DEFAULT_AZURE_MAX_COMPLETION_TOKENS = void 0;
exports.throwConfigurationError = throwConfigurationError;
exports.calculateAzureCost = calculateAzureCost;
const dedent_1 = __importDefault(require("dedent"));
const shared_1 = require("../shared");
const maxOutputTokens_1 = require("../maxOutputTokens");
Object.defineProperty(exports, "clampMaxCompletionTokens", { enumerable: true, get: function () { return maxOutputTokens_1.clampMaxCompletionTokens; } });
Object.defineProperty(exports, "getMaxCompletionTokensForDeployment", { enumerable: true, get: function () { return maxOutputTokens_1.getMaxCompletionTokensForDeployment; } });
const defaults_1 = require("./defaults");
/** @deprecated Use DEFAULT_MAX_COMPLETION_TOKENS_FALLBACK from maxOutputTokens */
exports.DEFAULT_AZURE_MAX_COMPLETION_TOKENS = maxOutputTokens_1.DEFAULT_MAX_COMPLETION_TOKENS_FALLBACK;
/**
 * Throws a configuration error with standard formatting and documentation link
 */
function throwConfigurationError(message) {
    throw new Error((0, dedent_1.default) `
    ${message}
  `);
}
/**
 * Calculate Azure cost based on model name and token usage
 */
function calculateAzureCost(modelName, config, promptTokens, completionTokens) {
    return (0, shared_1.calculateCost)(modelName, { cost: undefined }, promptTokens, completionTokens, defaults_1.AZURE_MODELS);
}
//# sourceMappingURL=util.js.map