Type alias CompletionOutcome

CompletionOutcome: {
    kind: "delivered";
} | {
    kind: "hopFailed";
    error: Error;
    retryable: boolean;
    usage?: ModelUsage;
} | {
    kind: "abandoned";
}

How an attempt ended. A hopFailed attempt carries usage when the provider billed it and reported the bill (a refused turn, an error chunk with usage); the GMI adds it to the turn's usage.

Type declaration

  • kind: "delivered"

Type declaration

  • kind: "hopFailed"
  • error: Error
  • retryable: boolean
  • Optional usage?: ModelUsage

Type declaration

  • kind: "abandoned"