@adaline/open-router 1.10.1 → 1.11.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.mts +84 -1
- package/dist/index.d.ts +84 -1
- package/dist/index.js +32 -30
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -9
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -98,6 +98,21 @@ declare const OpenRouterChatModelConfigs: {
|
|
|
98
98
|
default: string;
|
|
99
99
|
choices: string[];
|
|
100
100
|
};
|
|
101
|
+
readonly responseFormat: {
|
|
102
|
+
type: "select-string";
|
|
103
|
+
param: string;
|
|
104
|
+
title: string;
|
|
105
|
+
description: string;
|
|
106
|
+
default: string;
|
|
107
|
+
choices: string[];
|
|
108
|
+
};
|
|
109
|
+
readonly responseSchema: {
|
|
110
|
+
type: "object-schema";
|
|
111
|
+
param: string;
|
|
112
|
+
title: string;
|
|
113
|
+
description: string;
|
|
114
|
+
objectSchema?: any;
|
|
115
|
+
};
|
|
101
116
|
};
|
|
102
117
|
schema: zod.ZodObject<{
|
|
103
118
|
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
|
|
@@ -110,6 +125,12 @@ declare const OpenRouterChatModelConfigs: {
|
|
|
110
125
|
logProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
|
|
111
126
|
topLogProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
|
|
112
127
|
toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
|
|
128
|
+
responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
|
|
129
|
+
responseSchema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
|
|
130
|
+
[x: string]: any;
|
|
131
|
+
}, {
|
|
132
|
+
[x: string]: any;
|
|
133
|
+
}>>;
|
|
113
134
|
}, "strip", zod.ZodTypeAny, {
|
|
114
135
|
temperature?: number | undefined;
|
|
115
136
|
seed?: number | undefined;
|
|
@@ -121,6 +142,10 @@ declare const OpenRouterChatModelConfigs: {
|
|
|
121
142
|
logProbs?: boolean | null | undefined;
|
|
122
143
|
topLogProbs?: number | undefined;
|
|
123
144
|
toolChoice?: string | null | undefined;
|
|
145
|
+
responseFormat?: string | null | undefined;
|
|
146
|
+
responseSchema?: {
|
|
147
|
+
[x: string]: any;
|
|
148
|
+
} | undefined;
|
|
124
149
|
}, {
|
|
125
150
|
temperature?: number | undefined;
|
|
126
151
|
seed?: number | undefined;
|
|
@@ -132,6 +157,10 @@ declare const OpenRouterChatModelConfigs: {
|
|
|
132
157
|
logProbs?: boolean | null | undefined;
|
|
133
158
|
topLogProbs?: number | undefined;
|
|
134
159
|
toolChoice?: string | null | undefined;
|
|
160
|
+
responseFormat?: string | null | undefined;
|
|
161
|
+
responseSchema?: {
|
|
162
|
+
[x: string]: any;
|
|
163
|
+
} | undefined;
|
|
135
164
|
}>;
|
|
136
165
|
};
|
|
137
166
|
};
|
|
@@ -147,6 +176,12 @@ declare const ChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences:
|
|
|
147
176
|
logProbs: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
|
|
148
177
|
topLogProbs: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
149
178
|
toolChoice: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
|
|
179
|
+
responseFormat: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
|
|
180
|
+
responseSchema: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
181
|
+
[x: string]: any;
|
|
182
|
+
}, {
|
|
183
|
+
[x: string]: any;
|
|
184
|
+
}>>;
|
|
150
185
|
}, "strip", z.ZodTypeAny, {
|
|
151
186
|
temperature?: number | undefined;
|
|
152
187
|
seed?: number | undefined;
|
|
@@ -158,6 +193,10 @@ declare const ChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences:
|
|
|
158
193
|
logProbs?: boolean | null | undefined;
|
|
159
194
|
topLogProbs?: number | undefined;
|
|
160
195
|
toolChoice?: string | null | undefined;
|
|
196
|
+
responseFormat?: string | null | undefined;
|
|
197
|
+
responseSchema?: {
|
|
198
|
+
[x: string]: any;
|
|
199
|
+
} | undefined;
|
|
161
200
|
}, {
|
|
162
201
|
temperature?: number | undefined;
|
|
163
202
|
seed?: number | undefined;
|
|
@@ -169,6 +208,10 @@ declare const ChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences:
|
|
|
169
208
|
logProbs?: boolean | null | undefined;
|
|
170
209
|
topLogProbs?: number | undefined;
|
|
171
210
|
toolChoice?: string | null | undefined;
|
|
211
|
+
responseFormat?: string | null | undefined;
|
|
212
|
+
responseSchema?: {
|
|
213
|
+
[x: string]: any;
|
|
214
|
+
} | undefined;
|
|
172
215
|
}>;
|
|
173
216
|
declare const ChatModelBaseConfigDef: (maxOutputTokens: number, maxSequences: number) => {
|
|
174
217
|
readonly temperature: {
|
|
@@ -263,6 +306,21 @@ declare const ChatModelBaseConfigDef: (maxOutputTokens: number, maxSequences: nu
|
|
|
263
306
|
default: string;
|
|
264
307
|
choices: string[];
|
|
265
308
|
};
|
|
309
|
+
readonly responseFormat: {
|
|
310
|
+
type: "select-string";
|
|
311
|
+
param: string;
|
|
312
|
+
title: string;
|
|
313
|
+
description: string;
|
|
314
|
+
default: string;
|
|
315
|
+
choices: string[];
|
|
316
|
+
};
|
|
317
|
+
readonly responseSchema: {
|
|
318
|
+
type: "object-schema";
|
|
319
|
+
param: string;
|
|
320
|
+
title: string;
|
|
321
|
+
description: string;
|
|
322
|
+
objectSchema?: any;
|
|
323
|
+
};
|
|
266
324
|
};
|
|
267
325
|
|
|
268
326
|
declare const temperature: {
|
|
@@ -450,6 +508,31 @@ declare const responseFormat: {
|
|
|
450
508
|
};
|
|
451
509
|
schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
|
|
452
510
|
};
|
|
511
|
+
declare const responseFormatWithSchema: {
|
|
512
|
+
def: {
|
|
513
|
+
type: "select-string";
|
|
514
|
+
param: string;
|
|
515
|
+
title: string;
|
|
516
|
+
description: string;
|
|
517
|
+
default: string;
|
|
518
|
+
choices: string[];
|
|
519
|
+
};
|
|
520
|
+
schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
|
|
521
|
+
};
|
|
522
|
+
declare const responseSchema: {
|
|
523
|
+
def: {
|
|
524
|
+
type: "object-schema";
|
|
525
|
+
param: string;
|
|
526
|
+
title: string;
|
|
527
|
+
description: string;
|
|
528
|
+
objectSchema?: any;
|
|
529
|
+
};
|
|
530
|
+
schema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
|
|
531
|
+
[x: string]: any;
|
|
532
|
+
}, {
|
|
533
|
+
[x: string]: any;
|
|
534
|
+
}>>;
|
|
535
|
+
};
|
|
453
536
|
|
|
454
537
|
declare const OpenRouterChatRequest: z.ZodObject<{
|
|
455
538
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1051,4 +1134,4 @@ declare class OpenRouter<C extends BaseChatModelOptionsType, E extends Record<st
|
|
|
1051
1134
|
embeddingModel(options: E): EmbeddingModelV1;
|
|
1052
1135
|
}
|
|
1053
1136
|
|
|
1054
|
-
export { BaseChatModel, BaseChatModelOptions, type BaseChatModelOptionsType, BaseChatModelSchema, ChatModelBaseConfigDef, ChatModelBaseConfigSchema, OpenRouter, OpenRouterChatModelConfigs, frequencyPenalty, logProbs, maxTokens, minP, presencePenalty, repetitionPenalty, responseFormat, seed, stop, temperature, toolChoice, topA, topK, topLogProbs, topP };
|
|
1137
|
+
export { BaseChatModel, BaseChatModelOptions, type BaseChatModelOptionsType, BaseChatModelSchema, ChatModelBaseConfigDef, ChatModelBaseConfigSchema, OpenRouter, OpenRouterChatModelConfigs, frequencyPenalty, logProbs, maxTokens, minP, presencePenalty, repetitionPenalty, responseFormat, responseFormatWithSchema, responseSchema, seed, stop, temperature, toolChoice, topA, topK, topLogProbs, topP };
|
package/dist/index.d.ts
CHANGED
|
@@ -98,6 +98,21 @@ declare const OpenRouterChatModelConfigs: {
|
|
|
98
98
|
default: string;
|
|
99
99
|
choices: string[];
|
|
100
100
|
};
|
|
101
|
+
readonly responseFormat: {
|
|
102
|
+
type: "select-string";
|
|
103
|
+
param: string;
|
|
104
|
+
title: string;
|
|
105
|
+
description: string;
|
|
106
|
+
default: string;
|
|
107
|
+
choices: string[];
|
|
108
|
+
};
|
|
109
|
+
readonly responseSchema: {
|
|
110
|
+
type: "object-schema";
|
|
111
|
+
param: string;
|
|
112
|
+
title: string;
|
|
113
|
+
description: string;
|
|
114
|
+
objectSchema?: any;
|
|
115
|
+
};
|
|
101
116
|
};
|
|
102
117
|
schema: zod.ZodObject<{
|
|
103
118
|
temperature: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
|
|
@@ -110,6 +125,12 @@ declare const OpenRouterChatModelConfigs: {
|
|
|
110
125
|
logProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodBoolean>>>;
|
|
111
126
|
topLogProbs: zod.ZodOptional<zod.ZodDefault<zod.ZodNumber>>;
|
|
112
127
|
toolChoice: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
|
|
128
|
+
responseFormat: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
|
|
129
|
+
responseSchema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
|
|
130
|
+
[x: string]: any;
|
|
131
|
+
}, {
|
|
132
|
+
[x: string]: any;
|
|
133
|
+
}>>;
|
|
113
134
|
}, "strip", zod.ZodTypeAny, {
|
|
114
135
|
temperature?: number | undefined;
|
|
115
136
|
seed?: number | undefined;
|
|
@@ -121,6 +142,10 @@ declare const OpenRouterChatModelConfigs: {
|
|
|
121
142
|
logProbs?: boolean | null | undefined;
|
|
122
143
|
topLogProbs?: number | undefined;
|
|
123
144
|
toolChoice?: string | null | undefined;
|
|
145
|
+
responseFormat?: string | null | undefined;
|
|
146
|
+
responseSchema?: {
|
|
147
|
+
[x: string]: any;
|
|
148
|
+
} | undefined;
|
|
124
149
|
}, {
|
|
125
150
|
temperature?: number | undefined;
|
|
126
151
|
seed?: number | undefined;
|
|
@@ -132,6 +157,10 @@ declare const OpenRouterChatModelConfigs: {
|
|
|
132
157
|
logProbs?: boolean | null | undefined;
|
|
133
158
|
topLogProbs?: number | undefined;
|
|
134
159
|
toolChoice?: string | null | undefined;
|
|
160
|
+
responseFormat?: string | null | undefined;
|
|
161
|
+
responseSchema?: {
|
|
162
|
+
[x: string]: any;
|
|
163
|
+
} | undefined;
|
|
135
164
|
}>;
|
|
136
165
|
};
|
|
137
166
|
};
|
|
@@ -147,6 +176,12 @@ declare const ChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences:
|
|
|
147
176
|
logProbs: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodBoolean>>>;
|
|
148
177
|
topLogProbs: z.ZodOptional<z.ZodDefault<z.ZodNumber>>;
|
|
149
178
|
toolChoice: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
|
|
179
|
+
responseFormat: z.ZodOptional<z.ZodDefault<z.ZodNullable<z.ZodEnum<[string, ...string[]]>>>>;
|
|
180
|
+
responseSchema: z.ZodOptional<z.ZodObject<z.ZodRawShape, z.UnknownKeysParam, z.ZodTypeAny, {
|
|
181
|
+
[x: string]: any;
|
|
182
|
+
}, {
|
|
183
|
+
[x: string]: any;
|
|
184
|
+
}>>;
|
|
150
185
|
}, "strip", z.ZodTypeAny, {
|
|
151
186
|
temperature?: number | undefined;
|
|
152
187
|
seed?: number | undefined;
|
|
@@ -158,6 +193,10 @@ declare const ChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences:
|
|
|
158
193
|
logProbs?: boolean | null | undefined;
|
|
159
194
|
topLogProbs?: number | undefined;
|
|
160
195
|
toolChoice?: string | null | undefined;
|
|
196
|
+
responseFormat?: string | null | undefined;
|
|
197
|
+
responseSchema?: {
|
|
198
|
+
[x: string]: any;
|
|
199
|
+
} | undefined;
|
|
161
200
|
}, {
|
|
162
201
|
temperature?: number | undefined;
|
|
163
202
|
seed?: number | undefined;
|
|
@@ -169,6 +208,10 @@ declare const ChatModelBaseConfigSchema: (maxOutputTokens: number, maxSequences:
|
|
|
169
208
|
logProbs?: boolean | null | undefined;
|
|
170
209
|
topLogProbs?: number | undefined;
|
|
171
210
|
toolChoice?: string | null | undefined;
|
|
211
|
+
responseFormat?: string | null | undefined;
|
|
212
|
+
responseSchema?: {
|
|
213
|
+
[x: string]: any;
|
|
214
|
+
} | undefined;
|
|
172
215
|
}>;
|
|
173
216
|
declare const ChatModelBaseConfigDef: (maxOutputTokens: number, maxSequences: number) => {
|
|
174
217
|
readonly temperature: {
|
|
@@ -263,6 +306,21 @@ declare const ChatModelBaseConfigDef: (maxOutputTokens: number, maxSequences: nu
|
|
|
263
306
|
default: string;
|
|
264
307
|
choices: string[];
|
|
265
308
|
};
|
|
309
|
+
readonly responseFormat: {
|
|
310
|
+
type: "select-string";
|
|
311
|
+
param: string;
|
|
312
|
+
title: string;
|
|
313
|
+
description: string;
|
|
314
|
+
default: string;
|
|
315
|
+
choices: string[];
|
|
316
|
+
};
|
|
317
|
+
readonly responseSchema: {
|
|
318
|
+
type: "object-schema";
|
|
319
|
+
param: string;
|
|
320
|
+
title: string;
|
|
321
|
+
description: string;
|
|
322
|
+
objectSchema?: any;
|
|
323
|
+
};
|
|
266
324
|
};
|
|
267
325
|
|
|
268
326
|
declare const temperature: {
|
|
@@ -450,6 +508,31 @@ declare const responseFormat: {
|
|
|
450
508
|
};
|
|
451
509
|
schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
|
|
452
510
|
};
|
|
511
|
+
declare const responseFormatWithSchema: {
|
|
512
|
+
def: {
|
|
513
|
+
type: "select-string";
|
|
514
|
+
param: string;
|
|
515
|
+
title: string;
|
|
516
|
+
description: string;
|
|
517
|
+
default: string;
|
|
518
|
+
choices: string[];
|
|
519
|
+
};
|
|
520
|
+
schema: zod.ZodOptional<zod.ZodDefault<zod.ZodNullable<zod.ZodEnum<[string, ...string[]]>>>>;
|
|
521
|
+
};
|
|
522
|
+
declare const responseSchema: {
|
|
523
|
+
def: {
|
|
524
|
+
type: "object-schema";
|
|
525
|
+
param: string;
|
|
526
|
+
title: string;
|
|
527
|
+
description: string;
|
|
528
|
+
objectSchema?: any;
|
|
529
|
+
};
|
|
530
|
+
schema: zod.ZodOptional<zod.ZodObject<zod.ZodRawShape, zod.UnknownKeysParam, zod.ZodTypeAny, {
|
|
531
|
+
[x: string]: any;
|
|
532
|
+
}, {
|
|
533
|
+
[x: string]: any;
|
|
534
|
+
}>>;
|
|
535
|
+
};
|
|
453
536
|
|
|
454
537
|
declare const OpenRouterChatRequest: z.ZodObject<{
|
|
455
538
|
model: z.ZodOptional<z.ZodString>;
|
|
@@ -1051,4 +1134,4 @@ declare class OpenRouter<C extends BaseChatModelOptionsType, E extends Record<st
|
|
|
1051
1134
|
embeddingModel(options: E): EmbeddingModelV1;
|
|
1052
1135
|
}
|
|
1053
1136
|
|
|
1054
|
-
export { BaseChatModel, BaseChatModelOptions, type BaseChatModelOptionsType, BaseChatModelSchema, ChatModelBaseConfigDef, ChatModelBaseConfigSchema, OpenRouter, OpenRouterChatModelConfigs, frequencyPenalty, logProbs, maxTokens, minP, presencePenalty, repetitionPenalty, responseFormat, seed, stop, temperature, toolChoice, topA, topK, topLogProbs, topP };
|
|
1137
|
+
export { BaseChatModel, BaseChatModelOptions, type BaseChatModelOptionsType, BaseChatModelSchema, ChatModelBaseConfigDef, ChatModelBaseConfigSchema, OpenRouter, OpenRouterChatModelConfigs, frequencyPenalty, logProbs, maxTokens, minP, presencePenalty, repetitionPenalty, responseFormat, responseFormatWithSchema, responseSchema, seed, stop, temperature, toolChoice, topA, topK, topLogProbs, topP };
|