import { T as ThinkingLevelMap, m as OpenAIResponsesCompat, p as OpenAICompletionsCompat, t as AnthropicMessagesCompat } from "./types-CBQ0-JNc.js"; import { l as SecretInput } from "./types.secrets-tbFW-hY6.js"; import { s as AgentRuntimePolicyConfig, t as ConfiguredModelProviderRequest } from "./types.provider-request-DjXDZnyb.js"; //#region src/config/types.models.d.ts declare const MODEL_APIS: readonly ["openai-completions", "openai-responses", "openai-codex-responses", "anthropic-messages", "google-generative-ai", "google-vertex", "github-copilot", "bedrock-converse-stream", "ollama", "azure-openai-responses"]; type ModelApi = (typeof MODEL_APIS)[number]; type SupportedOpenAICompatFields = Pick; type SupportedOpenAIResponsesCompatFields = Pick; type SupportedAnthropicMessagesCompatFields = Pick; type SupportedThinkingFormat = NonNullable | "deepseek" | "openrouter" | "together"; declare const MODEL_THINKING_FORMATS: readonly ["openai", "openrouter", "deepseek", "together", "qwen", "qwen-chat-template", "zai"]; declare function isModelThinkingFormat(value: string): value is SupportedThinkingFormat; type ModelCompatConfig = SupportedOpenAICompatFields & SupportedOpenAIResponsesCompatFields & SupportedAnthropicMessagesCompatFields & { thinkingFormat?: SupportedThinkingFormat; supportedReasoningEfforts?: string[]; reasoningEffortMap?: Record; visibleReasoningDetailTypes?: string[]; supportsTools?: boolean; supportsPromptCacheKey?: boolean; requiresStringContent?: boolean; strictMessageKeys?: boolean; toolSchemaProfile?: string; unsupportedToolSchemaKeywords?: string[]; nativeWebSearchTool?: boolean; toolCallArgumentsEncoding?: string; requiresMistralToolIds?: boolean; requiresOpenAiAnthropicToolPayload?: boolean; }; type ModelImageInputConfig = { /** Provider-documented maximum encoded image payload size. */maxBytes?: number; /** Provider-documented maximum accepted input pixels. */ maxPixels?: number; /** Provider-documented maximum accepted width/height in pixels. */ maxSidePx?: number; /** Preferred resize side for the default balanced compression policy. */ preferredSidePx?: number; /** Token accounting style, used as documentation for provider-owned policy. */ tokenMode?: "tile" | "detail" | "provider"; }; type ModelMediaInputConfig = { image?: ModelImageInputConfig; }; type ModelProviderAuthMode = "api-key" | "aws-sdk" | "oauth" | "token"; type ModelProviderLocalServiceConfig = { command: string; args?: string[]; cwd?: string; env?: Record; healthUrl?: string; readyTimeoutMs?: number; idleStopMs?: number; }; type ModelDefinitionConfig = { id: string; name: string; api?: ModelApi; baseUrl?: string; reasoning: boolean; input: Array<"text" | "image" | "video" | "audio">; cost: { input: number; output: number; cacheRead: number; cacheWrite: number; /** Optional tiered pricing. When present, cost calculation uses * per-tier rates instead of the flat rates above. Prices are * USD / million tokens; ranges are half-open `[start, end)` on the * input-token axis. */ tieredPricing?: Array<{ input: number; output: number; cacheRead: number; cacheWrite: number; /** Bounded tier: `[start, end)`. Open-ended top tier: `[start]` (normalized to `[start, Infinity]` at load time). */ range: [number, number] | [number]; }>; }; contextWindow: number; /** * Optional effective runtime cap used for compaction/session budgeting. * Keeps provider/native contextWindow metadata intact while letting configs * prefer a smaller practical window. */ contextTokens?: number; maxTokens: number; /** Maps OpenClaw thinking levels to provider/model-specific values. */ thinkingLevelMap?: ThinkingLevelMap; /** Provider-specific request/runtime parameters passed through to provider plugins. */ params?: Record; /** Optional agent execution runtime override for this provider/model pair. */ agentRuntime?: AgentRuntimePolicyConfig; headers?: Record; compat?: ModelCompatConfig; mediaInput?: ModelMediaInputConfig; metadataSource?: "models-add"; }; type ModelProviderConfig = { baseUrl: string; apiKey?: SecretInput; auth?: ModelProviderAuthMode; api?: ModelApi; contextWindow?: number; contextTokens?: number; maxTokens?: number; timeoutSeconds?: number; /** Optional provider deployment/API region used by provider plugins that expose regional endpoints. */ region?: string; injectNumCtxForOpenAICompat?: boolean; /** Provider-specific runtime parameters interpreted by provider plugins. */ params?: Record; /** Optional default agent execution runtime for models under this provider. */ agentRuntime?: AgentRuntimePolicyConfig; /** Optional local service to start before calling this provider. */ localService?: ModelProviderLocalServiceConfig; headers?: Record; authHeader?: boolean; request?: ConfiguredModelProviderRequest; models: ModelDefinitionConfig[]; }; type ModelProviderDeclarationConfig = ModelProviderConfig; type ModelProviderConfigInput = Omit, "models"> & { models?: ModelDefinitionConfig[]; }; type BedrockDiscoveryConfig = { enabled?: boolean; region?: string; providerFilter?: string[]; refreshInterval?: number; defaultContextWindow?: number; defaultMaxTokens?: number; }; type DiscoveryToggleConfig = { enabled?: boolean; }; type ModelPricingConfig = { enabled?: boolean; }; type ModelsConfig = { mode?: "merge" | "replace"; providers?: Record; pricing?: ModelPricingConfig; }; type ModelsConfigInput = Omit & { providers?: Record; }; //#endregion export { ModelsConfigInput as _, ModelApi as a, ModelImageInputConfig as c, ModelProviderAuthMode as d, ModelProviderConfig as f, ModelsConfig as g, ModelProviderLocalServiceConfig as h, MODEL_THINKING_FORMATS as i, ModelMediaInputConfig as l, ModelProviderDeclarationConfig as m, DiscoveryToggleConfig as n, ModelCompatConfig as o, ModelProviderConfigInput as p, MODEL_APIS as r, ModelDefinitionConfig as s, BedrockDiscoveryConfig as t, ModelPricingConfig as u, SupportedThinkingFormat as v, isModelThinkingFormat as y };