@broberg/ai-sdk 0.65.0 → 0.66.0
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/dist/index.d.ts +515 -1453
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/package.json +5 -4
package/dist/index.js
CHANGED
|
@@ -3734,13 +3734,13 @@ var tierSpecSchema = z.object({
|
|
|
3734
3734
|
var toolSchema = z.object({
|
|
3735
3735
|
name: z.string(),
|
|
3736
3736
|
description: z.string(),
|
|
3737
|
-
parameters: z.record(z.unknown())
|
|
3737
|
+
parameters: z.record(z.string(), z.unknown())
|
|
3738
3738
|
});
|
|
3739
3739
|
var toolCallSchema = z.object({
|
|
3740
3740
|
id: z.string(),
|
|
3741
3741
|
name: z.string(),
|
|
3742
|
-
arguments: z.record(z.unknown()).optional(),
|
|
3743
|
-
args: z.record(z.unknown()).optional()
|
|
3742
|
+
arguments: z.record(z.string(), z.unknown()).optional(),
|
|
3743
|
+
args: z.record(z.string(), z.unknown()).optional()
|
|
3744
3744
|
}).refine((tc) => tc.arguments !== void 0 || tc.args !== void 0, {
|
|
3745
3745
|
message: "tool call needs `arguments` (canonical) or `args` (@broberg/chat's spelling)",
|
|
3746
3746
|
path: ["arguments"]
|
|
@@ -3904,7 +3904,7 @@ var moderationInputSchema = z.object({
|
|
|
3904
3904
|
input: z.union([z.string(), z.array(z.string())]),
|
|
3905
3905
|
...callOptions
|
|
3906
3906
|
});
|
|
3907
|
-
var judgeEntrySchema = z.union([z.string().min(1), z.null(), z.array(z.unknown()), z.record(z.unknown())]);
|
|
3907
|
+
var judgeEntrySchema = z.union([z.string().min(1), z.null(), z.array(z.unknown()), z.record(z.string(), z.unknown())]);
|
|
3908
3908
|
var judgeQuestionSchema = z.discriminatedUnion("type", [
|
|
3909
3909
|
z.object({
|
|
3910
3910
|
type: z.literal("noul"),
|
|
@@ -3929,7 +3929,7 @@ var judgeQuestionSchema = z.discriminatedUnion("type", [
|
|
|
3929
3929
|
})
|
|
3930
3930
|
]);
|
|
3931
3931
|
var judgeInputSchema = z.object({
|
|
3932
|
-
state: z.union([z.string().min(1), z.array(z.string()), z.record(z.unknown())]),
|
|
3932
|
+
state: z.union([z.string().min(1), z.array(z.string()), z.record(z.string(), z.unknown())]),
|
|
3933
3933
|
questions: z.record(z.string(), judgeQuestionSchema).refine((q) => Object.keys(q).length > 0, {
|
|
3934
3934
|
message: "judge needs at least one question"
|
|
3935
3935
|
}),
|
|
@@ -3997,7 +3997,7 @@ var aiConfigSchema = z.object({
|
|
|
3997
3997
|
promptCache: z.boolean().optional(),
|
|
3998
3998
|
/** F077.3 — refuse any "-latest" model id unless the call passes allowFloating: true. */
|
|
3999
3999
|
strictPinning: z.boolean().optional(),
|
|
4000
|
-
defaults: z.
|
|
4000
|
+
defaults: z.partialRecord(tierSchema, tierSpecSchema).optional(),
|
|
4001
4001
|
// Functions can't be deeply validated — z.custom asserts the TS type and
|
|
4002
4002
|
// passes the value through untouched.
|
|
4003
4003
|
providers: z.record(z.string(), z.custom()).optional(),
|
|
@@ -4016,8 +4016,8 @@ var aiConfigSchema = z.object({
|
|
|
4016
4016
|
import { randomUUID } from "crypto";
|
|
4017
4017
|
|
|
4018
4018
|
// src/version.ts
|
|
4019
|
-
var VERSION = "0.
|
|
4020
|
-
var SDK_TAG = "@broberg/ai-sdk@0.
|
|
4019
|
+
var VERSION = "0.66.0";
|
|
4020
|
+
var SDK_TAG = "@broberg/ai-sdk@0.66.0";
|
|
4021
4021
|
|
|
4022
4022
|
// src/cost/sinks/upmetrics.ts
|
|
4023
4023
|
function isRetryableStatus(status) {
|