import type { ChatStopReason } from './interface.js'; /** Maps Anthropic raw stop_reason values to the canonical ChatStopReason vocab. */ export declare const ANTHROPIC_STOP_REASON_MAP: Readonly>; export declare function mapAnthropicStopReason(raw: string | null | undefined): ChatStopReason; /** * Raw provider stop-reason strings that mean "the model's context window filled * up while generating this response". Covers providers whose raw value passes * through unmapped (openai-compatible local servers vary in spelling). */ export declare const CONTEXT_OVERFLOW_RAW_STOP_REASONS: ReadonlySet; /** * True when a chat response carries a context-window warning from the model or * provider, either the normalized 'context_overflow' stop reason or a raw * provider value naming context exhaustion. Consumers treat this as an * immediate compaction trigger: the provider's own report is authoritative and * overrides local token estimates. */ export declare function isContextOverflowSignal(stopReason: ChatStopReason, providerStopReason?: string | undefined): boolean; /** Maps OpenAI finish_reason values to the canonical ChatStopReason vocab. */ export declare const OPENAI_STOP_REASON_MAP: Readonly>; export declare function mapOpenAIStopReason(raw: string | null | undefined): ChatStopReason; /** Maps Gemini finishReason values to the canonical ChatStopReason vocab. */ export declare const GEMINI_STOP_REASON_MAP: Readonly>; export declare function mapGeminiStopReason(raw: string | null | undefined): ChatStopReason; /** * Maps llama.cpp finish_reason values to the canonical ChatStopReason vocab. * llama.cpp uses the OpenAI-compatible finish_reason field ('stop', 'length', 'tool_calls'). */ export declare function mapLlamaCppStopReason(finishReason: string | null | undefined, hasToolCalls: boolean): ChatStopReason; /** * Maps Ollama done_reason values to the canonical ChatStopReason vocab. * Ollama uses its own done_reason field ('stop', 'length', 'tool-calls', 'load', etc.). */ export declare function mapOllamaStopReason(doneReason: string, hasToolCalls: boolean): ChatStopReason; /** * Maps OpenAI Codex (responses API) status values to the canonical ChatStopReason vocab. */ export declare function mapCodexStopReason(status: string | undefined, hasToolCalls: boolean): ChatStopReason; /** * Maps LM Studio responses API status values to the canonical ChatStopReason vocab. * Used by both the native chat and responses paths in lm-studio.ts. */ export declare function mapLmStudioStopReason(status: string | undefined, hasToolCalls: boolean): ChatStopReason; //# sourceMappingURL=stop-reason-maps.d.ts.map