@tavily/ai-sdk 0.1.0 → 0.1.1

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/README.md +10 -5
  2. package/package.json +13 -7
package/README.md CHANGED
@@ -39,7 +39,7 @@ Search the web for real-time, AI-optimized information:
39
39
 
40
40
  ```typescript
41
41
  import { tavilySearch } from "@tavily/ai-sdk";
42
- import { generateText, gateway } from "ai";
42
+ import { generateText, gateway, stepCountIs } from "ai";
43
43
 
44
44
  const result = await generateText({
45
45
  model: gateway("openai/gpt-5-mini"),
@@ -51,6 +51,7 @@ const result = await generateText({
51
51
  maxResults: 5,
52
52
  }),
53
53
  },
54
+ stopWhen: stepCountIs(3),
54
55
  });
55
56
  ```
56
57
 
@@ -84,7 +85,7 @@ Extract clean, structured content from URLs:
84
85
 
85
86
  ```typescript
86
87
  import { tavilyExtract } from "@tavily/ai-sdk";
87
- import { generateText, gateway } from "ai";
88
+ import { generateText, gateway, stepCountIs } from "ai";
88
89
 
89
90
  const result = await generateText({
90
91
  model: gateway("openai/gpt-5-mini"),
@@ -92,6 +93,7 @@ const result = await generateText({
92
93
  tools: {
93
94
  tavilyExtract: tavilyExtract(),
94
95
  },
96
+ stopWhen: stepCountIs(3),
95
97
  });
96
98
  ```
97
99
 
@@ -115,7 +117,7 @@ Crawl websites to discover and extract content from multiple pages:
115
117
 
116
118
  ```typescript
117
119
  import { tavilyCrawl } from "@tavily/ai-sdk";
118
- import { generateText, gateway } from "ai";
120
+ import { generateText, gateway, stepCountIs } from "ai";
119
121
 
120
122
  const result = await generateText({
121
123
  model: gateway("openai/gpt-5-mini"),
@@ -123,6 +125,7 @@ const result = await generateText({
123
125
  tools: {
124
126
  tavilyCrawl: tavilyCrawl(),
125
127
  },
128
+ stopWhen: stepCountIs(3),
126
129
  });
127
130
  ```
128
131
 
@@ -158,7 +161,7 @@ Map website structure to understand site architecture:
158
161
 
159
162
  ```typescript
160
163
  import { tavilyMap } from "@tavily/ai-sdk";
161
- import { generateText, gateway } from "ai";
164
+ import { generateText, gateway, stepCountIs } from "ai";
162
165
 
163
166
  const result = await generateText({
164
167
  model: gateway("openai/gpt-5-mini"),
@@ -166,6 +169,7 @@ const result = await generateText({
166
169
  tools: {
167
170
  tavilyMap: tavilyMap(),
168
171
  },
172
+ stopWhen: stepCountIs(3),
169
173
  });
170
174
  ```
171
175
 
@@ -202,7 +206,7 @@ import {
202
206
  tavilyCrawl,
203
207
  tavilyMap
204
208
  } from "@tavily/ai-sdk";
205
- import { generateText, gateway } from "ai";
209
+ import { generateText, gateway, stepCountIs } from "ai";
206
210
 
207
211
  const result = await generateText({
208
212
  model: gateway("openai/gpt-5-mini"),
@@ -213,6 +217,7 @@ const result = await generateText({
213
217
  tavilyCrawl: tavilyCrawl(),
214
218
  tavilyMap: tavilyMap(),
215
219
  },
220
+ stopWhen: stepCountIs(3),
216
221
  });
217
222
  ```
218
223
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tavily/ai-sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.1",
4
4
  "description": "Tavily AI SDK tools - Search, Extract, Crawl, and Map",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,10 +15,6 @@
15
15
  "files": [
16
16
  "dist"
17
17
  ],
18
- "scripts": {
19
- "build": "tsup src/index.ts --format esm --dts",
20
- "prepublishOnly": "pnpm build"
21
- },
22
18
  "keywords": [
23
19
  "ai",
24
20
  "ai-sdk",
@@ -31,7 +27,14 @@
31
27
  ],
32
28
  "author": "Tavily",
33
29
  "license": "MIT",
34
- "packageManager": "pnpm@10.8.0",
30
+ "repository": {
31
+ "type": "git",
32
+ "url": "https://github.com/tavily-ai/ai-sdk"
33
+ },
34
+ "homepage": "https://docs.tavily.com/documentation/integrations/vercel",
35
+ "bugs": {
36
+ "url": "https://github.com/tavily-ai/ai-sdk/issues"
37
+ },
35
38
  "devDependencies": {
36
39
  "@ai-sdk/openai": "^2.0.71",
37
40
  "@types/node": "^24.10.1",
@@ -46,5 +49,8 @@
46
49
  "peerDependencies": {
47
50
  "ai": "^5.0.0",
48
51
  "zod": "^4.0.0"
52
+ },
53
+ "scripts": {
54
+ "build": "tsup src/index.ts --format esm --dts"
49
55
  }
50
- }
56
+ }