@ai-sdk/workflow 1.0.60 → 1.0.62

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/CHANGELOG.md CHANGED
@@ -1,5 +1,24 @@
1
1
  # @ai-sdk/workflow
2
2
 
3
+ ## 1.0.62
4
+
5
+ ### Patch Changes
6
+
7
+ - 419adc7: Honor `maxRetries` and `abortSignal` overrides returned from `prepareCall`.
8
+ - Updated dependencies [e0bcf52]
9
+ - ai@7.0.62
10
+
11
+ ## 1.0.61
12
+
13
+ ### Patch Changes
14
+
15
+ - db6e0a5: Forward structured output response formats from `WorkflowAgent.stream()` to model stream calls.
16
+ - Updated dependencies [326054b]
17
+ - Updated dependencies [975bb28]
18
+ - Updated dependencies [7fbfc6d]
19
+ - ai@7.0.61
20
+ - @ai-sdk/provider-utils@5.0.27
21
+
3
22
  ## 1.0.60
4
23
 
5
24
  ### Patch Changes
package/dist/index.js CHANGED
@@ -167,6 +167,21 @@ async function doStreamStep(conversationPrompt, modelInit, writable, serializedT
167
167
  "use step";
168
168
  const model = typeof modelInit === "string" ? gateway.languageModel(modelInit) : modelInit;
169
169
  const tools = serializedTools ? resolveSerializableTools(serializedTools) : void 0;
170
+ const output = (options == null ? void 0 : options.responseFormat) == null ? void 0 : {
171
+ name: "workflow",
172
+ responseFormat: Promise.resolve(options.responseFormat),
173
+ async parseCompleteOutput() {
174
+ throw new Error(
175
+ "WorkflowAgent does not use streamModelCall output parsing."
176
+ );
177
+ },
178
+ async parsePartialOutput() {
179
+ return void 0;
180
+ },
181
+ createElementStreamTransform() {
182
+ return void 0;
183
+ }
184
+ };
170
185
  const { stream: modelStream } = await streamModelCall({
171
186
  model,
172
187
  // streamModelCall expects Prompt (ModelMessage[]) but we pass the
@@ -181,6 +196,7 @@ async function doStreamStep(conversationPrompt, modelInit, writable, serializedT
181
196
  abortSignal: options == null ? void 0 : options.abortSignal,
182
197
  headers: options == null ? void 0 : options.headers,
183
198
  reasoning: options == null ? void 0 : options.reasoning,
199
+ output,
184
200
  maxOutputTokens: options == null ? void 0 : options.maxOutputTokens,
185
201
  temperature: options == null ? void 0 : options.temperature,
186
202
  topP: options == null ? void 0 : options.topP,
@@ -814,6 +830,10 @@ var WorkflowAgent = class {
814
830
  effectiveGenerationSettings.stopSequences = prepared.stopSequences;
815
831
  if (prepared.seed !== void 0)
816
832
  effectiveGenerationSettings.seed = prepared.seed;
833
+ if (prepared.maxRetries !== void 0)
834
+ effectiveGenerationSettings.maxRetries = prepared.maxRetries;
835
+ if (prepared.abortSignal !== void 0)
836
+ effectiveGenerationSettings.abortSignal = prepared.abortSignal;
817
837
  if (prepared.headers !== void 0)
818
838
  effectiveGenerationSettings.headers = prepared.headers;
819
839
  if (prepared.reasoning !== void 0)