/** * Gemini provider error classification and failover policy. * * thought_signature 400s are client/protocol validation errors (FR-018), * not infrastructure outages — they must return terminal errors, not trigger * stream delegation failover. */ import type { AssistantMessage } from '@earendil-works/pi-ai/compat'; export interface GeminiProviderError { readonly statusCode?: number; readonly code?: string; readonly message?: string; } /** * Gemini returns 400 INVALID_ARGUMENT when tool-call replay omits thought_signature. */ export declare function isGeminiThoughtSignatureError(parsed: GeminiProviderError): boolean; export declare function isGeminiThoughtSignatureAssistantError(message: AssistantMessage): boolean; /** * Returns true when a Gemini provider error should trigger failover. * thought_signature validation failures are terminal — never failover. */ export declare function shouldFailoverOnGeminiError(parsed: GeminiProviderError): boolean; /** * Format a Gemini thought_signature validation error with operator workarounds. */ export declare function formatGeminiThoughtSignatureErrorMessage(errorMessage: string): string; //# sourceMappingURL=gemini-provider.d.ts.map