import { r as KlawConfig } from "../../types.klaw-DO97PAYX.js";
import { l as SecretInput } from "../../types.secrets-DmO1nOFl.js";
import { l as ModelProviderConfig, o as ModelDefinitionConfig } from "../../types.models-yaTLgoam.js";
import { n as RuntimeEnv } from "../../runtime-BZLec2f6.js";
import { i as WizardPrompter } from "../../prompts-DoE_QK8k.js";
import { t as SecretInputMode } from "../../provider-auth-types-CXh4A-Yb.js";
import { f as resolveOllamaCompatNumCtxEnabled, l as isOllamaCompatProvider, m as wrapOllamaCompatNumCtx, o as createConfiguredOllamaCompatStreamWrapper, p as shouldInjectOllamaCompatNumCtx, r as buildOllamaChatRequest } from "../../stream-C7-Ojc60.js";

//#region extensions/ollama/src/defaults.d.ts
declare const OLLAMA_DEFAULT_BASE_URL = "http://127.0.0.1:11434";
declare const OLLAMA_DEFAULT_CONTEXT_WINDOW = 128000;
declare const OLLAMA_DEFAULT_MAX_TOKENS = 8192;
declare const OLLAMA_DEFAULT_COST: {
  input: number;
  output: number;
  cacheRead: number;
  cacheWrite: number;
};
declare const OLLAMA_DEFAULT_MODEL = "gemma4";
//#endregion
//#region extensions/ollama/src/provider-models.d.ts
type OllamaTagModel = {
  name: string;
  modified_at?: string;
  size?: number;
  digest?: string;
  remote_host?: string;
  details?: {
    family?: string;
    parameter_size?: string;
  };
};
type OllamaTagsResponse = {
  models?: OllamaTagModel[];
};
type OllamaModelWithContext = OllamaTagModel & {
  contextWindow?: number;
  capabilities?: string[];
};
declare function resolveOllamaApiBase(configuredBaseUrl?: string): string;
type OllamaModelShowInfo = {
  contextWindow?: number;
  capabilities?: string[];
};
declare function queryOllamaModelShowInfo(apiBase: string, modelName: string): Promise<OllamaModelShowInfo>;
/** @deprecated Use queryOllamaModelShowInfo instead. */
declare function queryOllamaContextWindow(apiBase: string, modelName: string): Promise<number | undefined>;
declare function enrichOllamaModelsWithContext(apiBase: string, models: OllamaTagModel[], opts?: {
  concurrency?: number;
}): Promise<OllamaModelWithContext[]>;
declare function isReasoningModelHeuristic(modelId: string): boolean;
declare function buildOllamaModelDefinition(modelId: string, contextWindow?: number, capabilities?: string[]): ModelDefinitionConfig;
declare function fetchOllamaModels(baseUrl: string): Promise<{
  reachable: boolean;
  models: OllamaTagModel[];
}>;
declare function buildOllamaProvider(configuredBaseUrl?: string, opts?: {
  quiet?: boolean;
}): Promise<ModelProviderConfig>;
//#endregion
//#region extensions/ollama/src/setup.d.ts
type OllamaSetupOptions = {
  customBaseUrl?: string;
  customModelId?: string;
};
type OllamaSetupResult = {
  config: KlawConfig;
  credential: SecretInput;
  credentialMode?: SecretInputMode;
};
declare function promptAndConfigureOllama(params: {
  cfg: KlawConfig;
  env?: NodeJS.ProcessEnv;
  opts?: Record<string, unknown>;
  prompter: WizardPrompter;
  secretInputMode?: SecretInputMode;
  allowSecretRefPrompt?: boolean;
}): Promise<OllamaSetupResult>;
declare function configureOllamaNonInteractive(params: {
  nextConfig: KlawConfig;
  opts: OllamaSetupOptions;
  runtime: RuntimeEnv;
  agentDir?: string;
}): Promise<KlawConfig>;
declare function ensureOllamaModelPulled(params: {
  config: KlawConfig;
  model: string;
  prompter: WizardPrompter;
}): Promise<void>;
//#endregion
export { OLLAMA_DEFAULT_BASE_URL, OLLAMA_DEFAULT_CONTEXT_WINDOW, OLLAMA_DEFAULT_COST, OLLAMA_DEFAULT_MAX_TOKENS, OLLAMA_DEFAULT_MODEL, type OllamaModelShowInfo, type OllamaModelWithContext, type OllamaTagModel, type OllamaTagsResponse, buildOllamaChatRequest, buildOllamaModelDefinition, buildOllamaProvider, configureOllamaNonInteractive, createConfiguredOllamaCompatStreamWrapper, enrichOllamaModelsWithContext, ensureOllamaModelPulled, fetchOllamaModels, isOllamaCompatProvider, isReasoningModelHeuristic, promptAndConfigureOllama, queryOllamaContextWindow, queryOllamaModelShowInfo, resolveOllamaApiBase, resolveOllamaCompatNumCtxEnabled, shouldInjectOllamaCompatNumCtx, wrapOllamaCompatNumCtx };