IFClite TypeScript API
    Preparing search index...

    Type Alias RequestOutcome<Route>

    RequestOutcome:
        | { kind: "completed"; receipt: UsageReceipt<Route>; text: string }
        | {
            finishReason: string;
            kind: "truncated";
            receipt: UsageReceipt<Route>;
            text: string;
        }
        | { kind: "cancelled"; receipt: UsageReceipt<Route> }
        | { kind: "timeout"; receipt: UsageReceipt<Route> }
        | {
            code: "empty-output" | "request-failed";
            kind: "error";
            message: string;
            receipt: UsageReceipt<Route>;
        }
        | { kind: "refused"; reason: "budget-exhausted" }
        | { kind: "refused"; message: string; reason: "unsupported-schema" }

    Type Parameters

    • Route extends string = string

    Type Declaration

    • { kind: "completed"; receipt: UsageReceipt<Route>; text: string }
    • {
          finishReason: string;
          kind: "truncated";
          receipt: UsageReceipt<Route>;
          text: string;
      }

      The provider stopped at the output ceiling; the text may be incomplete.

    • { kind: "cancelled"; receipt: UsageReceipt<Route> }
    • { kind: "timeout"; receipt: UsageReceipt<Route> }
    • {
          code: "empty-output" | "request-failed";
          kind: "error";
          message: string;
          receipt: UsageReceipt<Route>;
      }
    • { kind: "refused"; reason: "budget-exhausted" }

      Nothing was sent: the task's root budget has no request or output left.

    • { kind: "refused"; message: string; reason: "unsupported-schema" }

      The host knows the response contract exceeds its provider's limits; nothing was sent.