@ai-sdk/workflow 1.0.0-beta.104 → 1.0.0-beta.105

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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ai-sdk/workflow",
3
- "version": "1.0.0-beta.104",
3
+ "version": "1.0.0-beta.105",
4
4
  "description": "WorkflowAgent for building AI agents with AI SDK",
5
5
  "license": "Apache-2.0",
6
6
  "main": "./dist/index.js",
@@ -29,7 +29,7 @@
29
29
  "ajv": "^8.20.0",
30
30
  "@ai-sdk/provider": "4.0.0-beta.20",
31
31
  "@ai-sdk/provider-utils": "5.0.0-beta.50",
32
- "ai": "7.0.0-beta.184"
32
+ "ai": "7.0.0-beta.185"
33
33
  },
34
34
  "devDependencies": {
35
35
  "@types/node": "22.19.19",
@@ -8,6 +8,7 @@ import type {
8
8
  import {
9
9
  getErrorMessage,
10
10
  validateTypes,
11
+ withUserAgentSuffix,
11
12
  type Context,
12
13
  type HasRequiredKey,
13
14
  type InferToolSetContext,
@@ -1748,6 +1749,14 @@ export class WorkflowAgent<
1748
1749
  }),
1749
1750
  };
1750
1751
 
1752
+ // tag the outgoing request so usage can be attributed to WorkflowAgent.
1753
+ // chains with the `ai/<version>` and `ai-sdk/<provider>/<version>` suffixes
1754
+ // added downstream by the model run and the provider.
1755
+ mergedGenerationSettings.headers = withUserAgentSuffix(
1756
+ mergedGenerationSettings.headers ?? {},
1757
+ 'ai-sdk-agent/workflow',
1758
+ );
1759
+
1751
1760
  // Merge constructor + stream callbacks (constructor first, then stream)
1752
1761
  const mergedOnStepEnd = mergeCallbacks(
1753
1762
  this.constructorOnStepEnd as