import { ModelSettings } from "@inkeep/agents-core";

//#region src/domains/run/utils/model-context-utils.d.ts

/**
 * Get context window information for a model
 */
interface ModelContextInfo {
  contextWindow: number | null;
  hasValidContextWindow: boolean;
  modelId: string;
  source: 'llm-info' | 'fallback';
}
/**
 * Extract model ID from model string for llm-info lookup
 * Includes smart mapping to find dated versions for models that don't have exact matches
 */
declare function extractModelIdForLlmInfo(modelInput: string): string;
declare function extractModelIdForLlmInfo(modelSettings?: ModelSettings): string | null;
/**
 * Get context window size for a model using llm-info
 * Falls back to default values if model not found
 */
declare function getModelContextWindow(modelSettings?: ModelSettings): ModelContextInfo;
/**
 * Get compression configuration based on model context window
 * Uses actual model context window when available, otherwise falls back to environment variables
 * @param modelSettings - Model settings to get context window for
 * @param targetPercentage - Target percentage of context window to use (e.g., 0.5 for conversation, undefined for model-aware defaults)
 */
declare function getCompressionConfigForModel(modelSettings?: ModelSettings, targetPercentage?: number): {
  hardLimit: number;
  safetyBuffer: number;
  enabled: boolean;
  source: string;
  modelContextInfo: ModelContextInfo;
};
//#endregion
export { ModelContextInfo, extractModelIdForLlmInfo, getCompressionConfigForModel, getModelContextWindow };