ai 6.0.300 → 6.0.301
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 +8 -0
- package/dist/index.js +1 -1
- package/dist/index.mjs +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/docs/03-ai-sdk-core/16-mcp-tools.mdx +30 -0
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
package/dist/index.js
CHANGED
|
@@ -1334,7 +1334,7 @@ function detectMediaType({
|
|
|
1334
1334
|
var import_provider_utils3 = require("@ai-sdk/provider-utils");
|
|
1335
1335
|
|
|
1336
1336
|
// src/version.ts
|
|
1337
|
-
var VERSION = true ? "6.0.
|
|
1337
|
+
var VERSION = true ? "6.0.301" : "0.0.0-test";
|
|
1338
1338
|
|
|
1339
1339
|
// src/util/download/download.ts
|
|
1340
1340
|
var download = async ({
|
package/dist/index.mjs
CHANGED
|
@@ -1224,7 +1224,7 @@ import {
|
|
|
1224
1224
|
} from "@ai-sdk/provider-utils";
|
|
1225
1225
|
|
|
1226
1226
|
// src/version.ts
|
|
1227
|
-
var VERSION = true ? "6.0.
|
|
1227
|
+
var VERSION = true ? "6.0.301" : "0.0.0-test";
|
|
1228
1228
|
|
|
1229
1229
|
// src/util/download/download.ts
|
|
1230
1230
|
var download = async ({
|
package/dist/internal/index.js
CHANGED
|
@@ -164,7 +164,7 @@ function detectMediaType({
|
|
|
164
164
|
var import_provider_utils2 = require("@ai-sdk/provider-utils");
|
|
165
165
|
|
|
166
166
|
// src/version.ts
|
|
167
|
-
var VERSION = true ? "6.0.
|
|
167
|
+
var VERSION = true ? "6.0.301" : "0.0.0-test";
|
|
168
168
|
|
|
169
169
|
// src/util/download/download.ts
|
|
170
170
|
var download = async ({
|
package/dist/internal/index.mjs
CHANGED
|
@@ -124,6 +124,36 @@ transports by providing an `authProvider`.
|
|
|
124
124
|
|
|
125
125
|
</Note>
|
|
126
126
|
|
|
127
|
+
### Shared OAuth Credential Storage
|
|
128
|
+
|
|
129
|
+
When multiple MCP clients or replicas share OAuth credentials, a rotating refresh
|
|
130
|
+
token can be used concurrently. One refresh may save new tokens while another
|
|
131
|
+
receives `invalid_grant` for the old refresh token.
|
|
132
|
+
|
|
133
|
+
The optional `OAuthClientProvider.invalidateCredentials` method receives a
|
|
134
|
+
second argument identifying the tokens used by a failed refresh:
|
|
135
|
+
|
|
136
|
+
```typescript
|
|
137
|
+
invalidateCredentials(
|
|
138
|
+
scope: 'all' | 'client' | 'tokens' | 'verifier',
|
|
139
|
+
context?: { tokens: OAuthTokens },
|
|
140
|
+
): void | Promise<void>;
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
For `scope === 'tokens'` with a context, delete the credential only if the stored
|
|
144
|
+
access and refresh tokens still match `context.tokens`. The comparison and
|
|
145
|
+
deletion must be atomic, using a conditional database operation or a transaction.
|
|
146
|
+
If they no longer match, leave the newer tokens in storage. The SDK retries
|
|
147
|
+
authorization and reads the stored tokens again.
|
|
148
|
+
|
|
149
|
+
The SDK also provides this context when invalidating stored tokens that lack an
|
|
150
|
+
authorization server pin. Other invalidations can omit the context.
|
|
151
|
+
|
|
152
|
+
If an authorization-code exchange returns `invalid_grant`, the SDK propagates
|
|
153
|
+
the error without invalidating stored credentials or retrying the rejected code.
|
|
154
|
+
A rejected authorization code does not indicate that existing access or refresh
|
|
155
|
+
tokens are invalid.
|
|
156
|
+
|
|
127
157
|
### OAuth Authorization Server Validation
|
|
128
158
|
|
|
129
159
|
When using MCP OAuth in server-side applications, the MCP server can advertise
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai",
|
|
3
|
-
"version": "6.0.
|
|
3
|
+
"version": "6.0.301",
|
|
4
4
|
"description": "AI SDK by Vercel - build apps like ChatGPT, Claude, Gemini, and more with a single interface for any model using the Vercel AI Gateway or go direct to OpenAI, Anthropic, Google, or any other model provider.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@opentelemetry/api": "^1.9.0",
|
|
48
|
-
"@ai-sdk/gateway": "3.0.
|
|
48
|
+
"@ai-sdk/gateway": "3.0.210",
|
|
49
49
|
"@ai-sdk/provider": "3.0.18",
|
|
50
50
|
"@ai-sdk/provider-utils": "4.0.57"
|
|
51
51
|
},
|