import type { Model } from "../types.js"; export type StructuredOutputMode = "auto" | "native" | "tool"; /** Public name of the synthetic tool injected when the fallback is active. */ export declare const FINAL_ANSWER_TOOL_NAME = "final_answer"; /** Instructions prepended to the system prompt when the fallback is active. */ export declare const FINAL_ANSWER_INSTRUCTIONS: string; /** True if `model` is known to accept JSON-schema + tools in one call. * * Defaults to true when no model is set (the gateway picks a default that * we expect to be capable). Returns false for any model not matched by a * known-capable prefix. */ export declare function supportsStructuredOutputsWithTools(model: Model | undefined): boolean; /** Decide whether this request should use the `final_answer` fallback. * * The fallback only kicks in when *both* tools and an output schema are * requested — otherwise the native paths work everywhere. * * `mode` overrides the capability lookup: * - `"native"`: never fall back (caller knows the model supports it, * or wants to surface a provider error). * - `"tool"`: always fall back (useful for debugging or when a model * was recently broken upstream). * - `"auto"` / undefined: consult the whitelist. * * `mode` is honored before the `hasTools` guard so an explicit `"tool"` * forces the fallback even for tool-less agents (matching the contract * above); `"auto"` still requires tools, since native structured output * works everywhere when no tools are present. */ export declare function useToolFallback(args: { model: Model | undefined; hasTools: boolean; hasOutputSchema: boolean; mode: StructuredOutputMode | undefined; }): boolean;