| 73 | * the provider. |
| 74 | */ |
| 75 | export interface StreamedMessage { |
| 76 | [Symbol.asyncIterator](): AsyncIterator<StreamedMessagePart>; |
| 77 | /** Provider-assigned response identifier, or `null` if not available. */ |
| 78 | readonly id: string | null; |
| 79 | /** Token usage statistics, populated after the stream completes. */ |
| 80 | readonly usage: TokenUsage | null; |
| 81 | /** |
| 82 | * Normalized finish reason, populated after the stream completes. |
| 83 | * |
| 84 | * `null` if the provider did not emit a finish_reason (for example, the |
| 85 | * stream was interrupted before the final event arrived). |
| 86 | */ |
| 87 | readonly finishReason: FinishReason | null; |
| 88 | /** |
| 89 | * Raw provider-specific finish_reason string, preserved verbatim as an |
| 90 | * escape hatch for callers that need the original wire value. |
| 91 | * |
| 92 | * `null` if the provider did not emit a finish_reason. |
| 93 | */ |
| 94 | readonly rawFinishReason: string | null; |
| 95 | } |
| 96 | |
| 97 | /** |
| 98 | * Options that can be forwarded to a single {@link ChatProvider.generate} call. |
nothing calls this directly
no outgoing calls
no test coverage detected