ISPO SDK
    Preparing search index...

    Interface AiApi

    Markdown
    interface AiApi {
        complete(
            input: AiRequest,
        ): Promise<
            {
                finishReason: "length"
                | "stop";
                text: string;
                tier: "local";
                turnId: string;
                usage: {
                    decodeTokensPerSecond?: number;
                    elapsedMs?: number;
                    inputTokens?: number;
                    outputTokens?: number;
                    ttftMs?: number;
                };
            },
        >;
        stream(input: AiRequest): AiStream;
    }
    Index
    • Parameters

      Returns Promise<
          {
              finishReason: "length"
              | "stop";
              text: string;
              tier: "local";
              turnId: string;
              usage: {
                  decodeTokensPerSecond?: number;
                  elapsedMs?: number;
                  inputTokens?: number;
                  outputTokens?: number;
                  ttftMs?: number;
              };
          },
      >

    Authority for ai.complete

    Reviewed request token: ai.local. Standing capability: ai.local.

    Handle structured ProjectRpcError failures. A timeout does not guarantee cancellation; do not automatically retry effects without a documented idempotency contract. Method authority and recovery.

    Authority for ai.stream

    Reviewed request token: ai.local. Authority depends on the arguments, resource, and caller; check the live capability surface.

    Handle structured ProjectRpcError failures. A timeout does not guarantee cancellation; do not automatically retry effects without a documented idempotency contract. Method authority and recovery.