@orpc/ai-sdk 2.0.0-beta.24 → 2.0.0-beta.26

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.
Files changed (2) hide show
  1. package/dist/index.mjs +3 -9
  2. package/package.json +8 -7
package/dist/index.mjs CHANGED
@@ -1,7 +1,7 @@
1
1
  import { getAsyncIteratorObjectSchemaDetails } from '@orpc/contract';
2
2
  import { combineJsonSchemasWithComposition } from '@orpc/json-schema';
3
3
  import { Procedure, call } from '@orpc/server';
4
- import { resolveMaybeOptionalOptions, toArray, isAsyncIteratorObject, ORPC_NAME } from '@orpc/shared';
4
+ import { resolveMaybeOptionalOptions, toArray, ORPC_NAME } from '@orpc/shared';
5
5
  import { tool } from 'ai';
6
6
 
7
7
  const aiSdkTool = (incoming) => ({
@@ -113,8 +113,7 @@ function createToolFactory(...rest) {
113
113
  const toolOptions = resolveMaybeOptionalOptions(rest2);
114
114
  const disabledValidation = new Procedure({
115
115
  ...procedure["~orpc"],
116
- disableInputValidation: true,
117
- disableOutputValidation: true
116
+ disableInputValidation: true
118
117
  });
119
118
  const isIteratorOutput = getIteratorYieldSchemas(toArray(procedure["~orpc"].outputSchemas)) !== void 0;
120
119
  return implementTool(procedure, {
@@ -125,12 +124,7 @@ function createToolFactory(...rest) {
125
124
  * and the last event becomes the final result.
126
125
  */
127
126
  execute: isIteratorOutput ? async function* (input, callingOptions) {
128
- const output = await call(disabledValidation, input, { signal: callingOptions.abortSignal, ...options });
129
- if (!isAsyncIteratorObject(output)) {
130
- yield output;
131
- return;
132
- }
133
- yield* output;
127
+ yield* await call(disabledValidation, input, { signal: callingOptions.abortSignal, ...options });
134
128
  } : (input, callingOptions) => {
135
129
  return call(disabledValidation, input, { signal: callingOptions.abortSignal, ...options });
136
130
  }
package/package.json CHANGED
@@ -1,8 +1,9 @@
1
1
  {
2
2
  "name": "@orpc/ai-sdk",
3
3
  "type": "module",
4
- "version": "2.0.0-beta.24",
4
+ "version": "2.0.0-beta.26",
5
5
  "license": "MIT",
6
+ "funding": "https://github.com/sponsors/dinwwwh",
6
7
  "homepage": "https://orpc.dev",
7
8
  "repository": {
8
9
  "type": "git",
@@ -29,14 +30,14 @@
29
30
  "ai": ">=7.0.31"
30
31
  },
31
32
  "dependencies": {
32
- "@orpc/client": "2.0.0-beta.24",
33
- "@orpc/json-schema": "2.0.0-beta.24",
34
- "@orpc/server": "2.0.0-beta.24",
35
- "@orpc/shared": "2.0.0-beta.24",
36
- "@orpc/contract": "2.0.0-beta.24"
33
+ "@orpc/client": "2.0.0-beta.26",
34
+ "@orpc/contract": "2.0.0-beta.26",
35
+ "@orpc/server": "2.0.0-beta.26",
36
+ "@orpc/shared": "2.0.0-beta.26",
37
+ "@orpc/json-schema": "2.0.0-beta.26"
37
38
  },
38
39
  "devDependencies": {
39
- "ai": "^7.0.42",
40
+ "ai": "^7.0.48",
40
41
  "zod": "^4.4.3"
41
42
  },
42
43
  "scripts": {