ai 4.3.3 → 4.3.5
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 +17 -0
- package/dist/index.js +10 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +10 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,22 @@
|
|
1
1
|
# ai
|
2
2
|
|
3
|
+
## 4.3.5
|
4
|
+
|
5
|
+
### Patch Changes
|
6
|
+
|
7
|
+
- 452bf12: fix (ai/mcp): better support for zero-argument MCP tools
|
8
|
+
|
9
|
+
## 4.3.4
|
10
|
+
|
11
|
+
### Patch Changes
|
12
|
+
|
13
|
+
- 013faa8: core (ai): change transcription model mimeType to mediaType
|
14
|
+
- Updated dependencies [013faa8]
|
15
|
+
- @ai-sdk/provider@1.1.2
|
16
|
+
- @ai-sdk/provider-utils@2.2.6
|
17
|
+
- @ai-sdk/ui-utils@1.2.7
|
18
|
+
- @ai-sdk/react@1.2.8
|
19
|
+
|
3
20
|
## 4.3.3
|
4
21
|
|
5
22
|
### Patch Changes
|
package/dist/index.js
CHANGED
@@ -6357,7 +6357,7 @@ async function transcribe({
|
|
6357
6357
|
headers
|
6358
6358
|
}) {
|
6359
6359
|
const { retry } = prepareRetries({ maxRetries: maxRetriesArg });
|
6360
|
-
const audioData = audio instanceof URL ?
|
6360
|
+
const audioData = audio instanceof URL ? (await download({ url: audio })).data : convertDataContentToUint8Array(audio);
|
6361
6361
|
const result = await retry(
|
6362
6362
|
() => {
|
6363
6363
|
var _a17;
|
@@ -6366,7 +6366,7 @@ async function transcribe({
|
|
6366
6366
|
abortSignal,
|
6367
6367
|
headers,
|
6368
6368
|
providerOptions,
|
6369
|
-
|
6369
|
+
mediaType: (_a17 = detectMimeType({
|
6370
6370
|
data: audioData,
|
6371
6371
|
signatures: audioMimeTypeSignatures
|
6372
6372
|
})) != null ? _a17 : "audio/wav"
|
@@ -7524,6 +7524,7 @@ var MCPClient = class {
|
|
7524
7524
|
async tools({
|
7525
7525
|
schemas = "automatic"
|
7526
7526
|
} = {}) {
|
7527
|
+
var _a17;
|
7527
7528
|
const tools = {};
|
7528
7529
|
try {
|
7529
7530
|
const listToolsResult = await this.listTools();
|
@@ -7531,14 +7532,18 @@ var MCPClient = class {
|
|
7531
7532
|
if (schemas !== "automatic" && !(name17 in schemas)) {
|
7532
7533
|
continue;
|
7533
7534
|
}
|
7534
|
-
const parameters = schemas === "automatic" ? (0, import_ui_utils10.jsonSchema)(
|
7535
|
+
const parameters = schemas === "automatic" ? (0, import_ui_utils10.jsonSchema)({
|
7536
|
+
...inputSchema,
|
7537
|
+
properties: (_a17 = inputSchema.properties) != null ? _a17 : {},
|
7538
|
+
additionalProperties: false
|
7539
|
+
}) : schemas[name17].parameters;
|
7535
7540
|
const self = this;
|
7536
7541
|
const toolWithExecute = tool({
|
7537
7542
|
description,
|
7538
7543
|
parameters,
|
7539
7544
|
execute: async (args, options) => {
|
7540
|
-
var
|
7541
|
-
(
|
7545
|
+
var _a18;
|
7546
|
+
(_a18 = options == null ? void 0 : options.abortSignal) == null ? void 0 : _a18.throwIfAborted();
|
7542
7547
|
return self.callTool({
|
7543
7548
|
name: name17,
|
7544
7549
|
args,
|