import type { Api, Model, ToolChoice, ToolChoiceCompat, ToolChoiceSupport, ToolChoiceSupportSource } from "../types"; /** * Claude Mythos accepts tools but rejects forced tool use (Anthropic 400: * "tool_choice forces tool use is not compatible with this model"). Catalog * generation and dynamic discovery use this to default `toolChoiceSupport`. */ export declare function isClaudeForcedToolChoiceIncapableModelId(modelId: string): boolean; /** Derives the effective static tool-choice support from compatibility flags. */ export declare function deriveToolChoiceSupport(compat: ToolChoiceCompat | undefined): { support: ToolChoiceSupport; source: "static" | "derived"; }; /** Returns the registry key used for runtime tool-choice capability overrides. */ export declare function toolChoiceRegistryKey(model: Model): string; /** Returns the current runtime tool-choice capability override for a model. */ export declare function getToolChoiceCapabilityOverride(model: Model): ToolChoiceSupport | undefined; /** Clears runtime tool-choice capability overrides for tests. */ export declare function clearToolChoiceIncapabilityRegistryForTests(): void; /** Overrides durable-cache dependencies for isolated tests. */ export declare function configureToolChoiceCapabilityCacheForTests(options?: { path?: string; now?: () => number; beforeExpiredDelete?: () => void; beforeMalformedDelete?: () => void; onCacheOpen?: () => void; simulateOperationError?: () => Error | undefined; beforeCorruptRetire?: () => void; beforeLockExactUnlink?: (lockPath: string) => void; }): void; /** Records a discovered maximum supported tool-choice level for a model. */ export declare function markToolChoiceIncapability(model: Model, maxSupport: ToolChoiceSupport, reason?: string): void; /** * Resolves a requested tool_choice against static and runtime capability limits. * `compat` overrides `model.compat` for transports that layer URL/provider * detection on top of explicit model overrides (e.g. resolveOpenAICompat). */ export declare function resolveToolChoice(model: Model, requested: ToolChoice | undefined, compat?: ToolChoiceCompat): ResolveToolChoiceResult; /** Detects provider errors indicating forced tool_choice is unsupported. */ export declare function isForcedToolChoiceUnsupportedError(error: unknown, sentForcedToolChoice: boolean): boolean; /** * Detects Codex's statusless SSE rejection for a named function tool choice. * This is intentionally separate from the shared HTTP-400 classifier. */ export declare function isCodexStatuslessNamedToolChoiceNotFoundError(error: unknown, forcedToolName: string | undefined, sentToolNames: readonly string[]): boolean; export type { ToolChoiceCompat, ToolChoiceSupport, ToolChoiceSupportSource } from "../types"; export interface ResolveToolChoiceResult { requestedChoice: ToolChoice | undefined; requestedLevel: ToolChoiceSupport; resolvedChoice: ToolChoice | undefined; resolvedLevel: ToolChoiceSupport; support: ToolChoiceSupport; supportSource: ToolChoiceSupportSource; degraded: boolean; reason?: string; registryKey: string; targetToolName?: string; }