ai 6.0.266 → 6.0.270
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 +34 -0
- package/dist/index.d.mts +5 -3
- package/dist/index.d.ts +5 -3
- package/dist/index.js +159 -76
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +93 -10
- package/dist/index.mjs.map +1 -1
- package/dist/internal/index.js +1 -1
- package/dist/internal/index.mjs +1 -1
- package/dist/test/index.d.mts +4 -1
- package/dist/test/index.d.ts +4 -1
- package/dist/test/index.js +6 -0
- package/dist/test/index.js.map +1 -1
- package/dist/test/index.mjs +6 -0
- package/dist/test/index.mjs.map +1 -1
- package/docs/07-reference/01-ai-sdk-core/06-embed-many.mdx +6 -2
- package/package.json +3 -3
- package/src/embed/embed-many.ts +75 -6
- package/src/generate-text/execute-tool-call.ts +6 -0
- package/src/generate-text/generate-text-result.ts +2 -1
- package/src/generate-text/generate-text.ts +6 -2
- package/src/middleware/wrap-embedding-model.ts +8 -1
- package/src/model/get-embedding-model-max-input-bytes-per-call.ts +15 -0
- package/src/test/mock-embedding-model-v3.ts +9 -0
- package/src/ui/last-assistant-message-is-complete-with-approval-responses.ts +1 -0
- package/src/util/create-stitchable-stream.ts +35 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# ai
|
|
2
2
|
|
|
3
|
+
## 6.0.270
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 8bc01a1: Allow chats to continue automatically after tool approval denials reach the `output-denied` state.
|
|
8
|
+
- fa01949: Handle stitchable stream cancellation before an inner stream is registered.
|
|
9
|
+
|
|
10
|
+
## 6.0.269
|
|
11
|
+
|
|
12
|
+
### Patch Changes
|
|
13
|
+
|
|
14
|
+
- 9a521b9: Split OpenAI and Azure OpenAI embedding requests by a conservative UTF-8 byte budget derived from their aggregate token limit, in addition to input count limits.
|
|
15
|
+
- Updated dependencies [8ddf255]
|
|
16
|
+
- Updated dependencies [9a521b9]
|
|
17
|
+
- @ai-sdk/gateway@3.0.184
|
|
18
|
+
- @ai-sdk/provider-utils@4.0.49
|
|
19
|
+
|
|
20
|
+
## 6.0.268
|
|
21
|
+
|
|
22
|
+
### Patch Changes
|
|
23
|
+
|
|
24
|
+
- Updated dependencies [ad28ecb]
|
|
25
|
+
- @ai-sdk/gateway@3.0.183
|
|
26
|
+
|
|
27
|
+
## 6.0.267
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- cd29175: Include telemetry metadata attributes on tool call spans.
|
|
32
|
+
- e88c835: Expose structured output parsing diagnostics from `generateText` when generation stops because of the output token limit.
|
|
33
|
+
- Updated dependencies [845ad6d]
|
|
34
|
+
- Updated dependencies [fe80a3c]
|
|
35
|
+
- @ai-sdk/gateway@3.0.182
|
|
36
|
+
|
|
3
37
|
## 6.0.266
|
|
4
38
|
|
|
5
39
|
### Patch Changes
|
package/dist/index.d.mts
CHANGED
|
@@ -1173,7 +1173,8 @@ interface GenerateTextResult<TOOLS extends ToolSet, OUTPUT extends Output> {
|
|
|
1173
1173
|
* The generated output according to the `output` specification.
|
|
1174
1174
|
*
|
|
1175
1175
|
* @throws {NoOutputGeneratedError} When no output is available, for example
|
|
1176
|
-
* when the final step
|
|
1176
|
+
* when the final step finishes with a `tool-calls` reason, or when it
|
|
1177
|
+
* contains no text and does not finish with a `stop` reason.
|
|
1177
1178
|
*/
|
|
1178
1179
|
readonly output: InferCompleteOutput<OUTPUT>;
|
|
1179
1180
|
}
|
|
@@ -4485,8 +4486,9 @@ interface EmbedManyResult {
|
|
|
4485
4486
|
* Embed several values using an embedding model. The type of the value is defined
|
|
4486
4487
|
* by the embedding model.
|
|
4487
4488
|
*
|
|
4488
|
-
* `embedMany` automatically splits large requests into smaller chunks
|
|
4489
|
-
* has a limit on
|
|
4489
|
+
* `embedMany` automatically splits large requests into smaller chunks when the
|
|
4490
|
+
* model has a limit on either the number of embeddings or the UTF-8 input bytes
|
|
4491
|
+
* that can be processed in a single call.
|
|
4490
4492
|
*
|
|
4491
4493
|
* @param model - The embedding model to use.
|
|
4492
4494
|
* @param values - The values that should be embedded.
|
package/dist/index.d.ts
CHANGED
|
@@ -1173,7 +1173,8 @@ interface GenerateTextResult<TOOLS extends ToolSet, OUTPUT extends Output> {
|
|
|
1173
1173
|
* The generated output according to the `output` specification.
|
|
1174
1174
|
*
|
|
1175
1175
|
* @throws {NoOutputGeneratedError} When no output is available, for example
|
|
1176
|
-
* when the final step
|
|
1176
|
+
* when the final step finishes with a `tool-calls` reason, or when it
|
|
1177
|
+
* contains no text and does not finish with a `stop` reason.
|
|
1177
1178
|
*/
|
|
1178
1179
|
readonly output: InferCompleteOutput<OUTPUT>;
|
|
1179
1180
|
}
|
|
@@ -4485,8 +4486,9 @@ interface EmbedManyResult {
|
|
|
4485
4486
|
* Embed several values using an embedding model. The type of the value is defined
|
|
4486
4487
|
* by the embedding model.
|
|
4487
4488
|
*
|
|
4488
|
-
* `embedMany` automatically splits large requests into smaller chunks
|
|
4489
|
-
* has a limit on
|
|
4489
|
+
* `embedMany` automatically splits large requests into smaller chunks when the
|
|
4490
|
+
* model has a limit on either the number of embeddings or the UTF-8 input bytes
|
|
4491
|
+
* that can be processed in a single call.
|
|
4490
4492
|
*
|
|
4491
4493
|
* @param model - The embedding model to use.
|
|
4492
4494
|
* @param values - The values that should be embedded.
|