@reforma/types 1.5.0 → 1.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -126,6 +126,9 @@ export type ReformaUserMessageMetadata = {
|
|
|
126
126
|
optPlugins?: string[];
|
|
127
127
|
};
|
|
128
128
|
|
|
129
|
+
/** A run that did not complete its turn. Resume continues the turn. */
|
|
130
|
+
export type ReformaStopReason = 'cancelled' | 'max_turns_exceeded' | 'provider_error' | 'internal_error';
|
|
131
|
+
|
|
129
132
|
/**
|
|
130
133
|
* Metadata on assistant Reforma chat UI messages (`UIMessage.metadata`), stream finish snapshots,
|
|
131
134
|
* and persisted threads.
|
|
@@ -156,8 +159,8 @@ export type ReformaChatMessageMetadata = {
|
|
|
156
159
|
runId?: string;
|
|
157
160
|
/** Reforma credits billed for this run. Stamped after settle; denormalized from the API. */
|
|
158
161
|
creditsCharged?: number;
|
|
159
|
-
/**
|
|
160
|
-
stopReason?:
|
|
162
|
+
/** Why this assistant turn ended early: the user stopped it, or the run failed. Absent once a run completes it. */
|
|
163
|
+
stopReason?: ReformaStopReason;
|
|
161
164
|
|
|
162
165
|
/**
|
|
163
166
|
* The user's ChatGPT plan or API key could not pay for this turn.
|