import * as z from "zod/v4"; import { OpenEnum } from "../types/enums.js"; import { Result as SafeParseResult } from "../types/fp.js"; import { SDKValidationError } from "./errors/sdkvalidationerror.js"; /** * A stable reason a client can branch on. */ export declare const InternChatErrorMetadataReason: { readonly AttachmentFailed: "attachment_failed"; readonly BadRequest: "bad_request"; readonly Busy: "busy"; readonly ClientClosedRequest: "client_closed_request"; readonly InteractionNotPending: "interaction_not_pending"; readonly InteractionUnknown: "interaction_unknown"; readonly InternNotReady: "intern_not_ready"; readonly InternRejected: "intern_rejected"; readonly InternUnreachable: "intern_unreachable"; readonly NotFound: "not_found"; readonly PayloadTooLarge: "payload_too_large"; readonly RateLimited: "rate_limited"; readonly RunEnded: "run_ended"; readonly StreamSevered: "stream_severed"; readonly Timeout: "timeout"; readonly TurnFailed: "turn_failed"; }; /** * A stable reason a client can branch on. */ export type InternChatErrorMetadataReason = OpenEnum; /** * Machine-readable detail for the failure. */ export type InternChatErrorMetadata = { /** * A stable reason a client can branch on. */ reason: InternChatErrorMetadataReason; /** * Whether the same request may be sent again unchanged. Always `true` for the transient refusals — `busy`, `intern_not_ready`, `intern_unreachable`, `rate_limited`, `stream_severed` and `timeout` — and always `false` for the ones a retry cannot fix. For `turn_failed` it varies by failure and is the intern's own classification of what went wrong: `true` for an upstream overload, rate limit, timeout or transport fault, `false` for an authentication or bad-request failure that would be rejected the same way again. Branch on this field rather than on `reason` when deciding whether to retry. A `429`, and a `409` or `503` with reason `busy`, also carry a `Retry-After` header saying how long to wait. */ retryable: boolean; }; /** @internal */ export declare const InternChatErrorMetadataReason$inboundSchema: z.ZodType; /** @internal */ export declare const InternChatErrorMetadata$inboundSchema: z.ZodType; export declare function internChatErrorMetadataFromJSON(jsonString: string): SafeParseResult; //# sourceMappingURL=internchaterrormetadata.d.ts.map