@ljoukov/llm 3.0.13 → 3.0.15

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.cjs CHANGED
@@ -199,9 +199,14 @@ var FIREWORKS_GLM_5_PRICING = {
199
199
  };
200
200
  var FIREWORKS_MINIMAX_M21_PRICING = {
201
201
  inputRate: 0.3 / 1e6,
202
- cachedRate: 0.15 / 1e6,
202
+ cachedRate: 0.03 / 1e6,
203
203
  outputRate: 1.2 / 1e6
204
204
  };
205
+ var FIREWORKS_GPT_OSS_120B_PRICING = {
206
+ inputRate: 0.15 / 1e6,
207
+ cachedRate: 0.075 / 1e6,
208
+ outputRate: 0.6 / 1e6
209
+ };
205
210
  function getFireworksPricing(modelId) {
206
211
  if (modelId.includes("kimi-k2.5") || modelId.includes("kimi-k2p5")) {
207
212
  return FIREWORKS_KIMI_K25_PRICING;
@@ -212,6 +217,9 @@ function getFireworksPricing(modelId) {
212
217
  if (modelId.includes("minimax-m2.1") || modelId.includes("minimax-m2p1")) {
213
218
  return FIREWORKS_MINIMAX_M21_PRICING;
214
219
  }
220
+ if (modelId.includes("gpt-oss-120b")) {
221
+ return FIREWORKS_GPT_OSS_120B_PRICING;
222
+ }
215
223
  return void 0;
216
224
  }
217
225
 
@@ -243,7 +251,16 @@ var GEMINI_2_5_FLASH_PRICING = {
243
251
  outputRateLow: 2.5 / 1e6,
244
252
  outputRateHigh: 2.5 / 1e6
245
253
  };
246
- var GEMINI_IMAGE_PREVIEW_PRICING = {
254
+ var GEMINI_2_5_FLASH_LITE_PRICING = {
255
+ threshold: 2e5,
256
+ inputRateLow: 0.1 / 1e6,
257
+ inputRateHigh: 0.1 / 1e6,
258
+ cachedRateLow: 0.025 / 1e6,
259
+ cachedRateHigh: 0.025 / 1e6,
260
+ outputRateLow: 0.4 / 1e6,
261
+ outputRateHigh: 0.4 / 1e6
262
+ };
263
+ var GEMINI_3_PRO_IMAGE_PREVIEW_PRICING = {
247
264
  inputRate: 2 / 1e6,
248
265
  cachedRate: 0.2 / 1e6,
249
266
  outputTextRate: 12 / 1e6,
@@ -254,11 +271,26 @@ var GEMINI_IMAGE_PREVIEW_PRICING = {
254
271
  "4K": 0.24
255
272
  }
256
273
  };
274
+ var GEMINI_3_1_FLASH_IMAGE_PREVIEW_PRICING = {
275
+ inputRate: 0.5 / 1e6,
276
+ cachedRate: 0.125 / 1e6,
277
+ outputTextRate: 3 / 1e6,
278
+ outputImageRate: 60 / 1e6,
279
+ imagePrices: {
280
+ "512": 0.045,
281
+ "1K": 0.067,
282
+ "2K": 0.101,
283
+ "4K": 0.15
284
+ }
285
+ };
257
286
  function getGeminiProPricing(modelId) {
258
287
  if (modelId.includes("gemini-2.5-pro")) {
259
288
  return GEMINI_2_5_PRO_PRICING;
260
289
  }
261
- if (modelId.includes("gemini-2.5-flash") || modelId.includes("gemini-flash-latest")) {
290
+ if (modelId.includes("gemini-flash-lite-latest")) {
291
+ return GEMINI_2_5_FLASH_LITE_PRICING;
292
+ }
293
+ if (modelId.includes("gemini-2.5-flash") || modelId.includes("gemini-flash-latest") || modelId.includes("gemini-3-flash-preview")) {
262
294
  return GEMINI_2_5_FLASH_PRICING;
263
295
  }
264
296
  if (modelId.includes("gemini-3-pro") || modelId.includes("gemini-3.1-pro")) {
@@ -267,8 +299,14 @@ function getGeminiProPricing(modelId) {
267
299
  return void 0;
268
300
  }
269
301
  function getGeminiImagePricing(modelId) {
302
+ if (modelId.includes("gemini-3.1-flash-image-preview")) {
303
+ return GEMINI_3_1_FLASH_IMAGE_PREVIEW_PRICING;
304
+ }
305
+ if (modelId.includes("gemini-3-pro-image-preview")) {
306
+ return GEMINI_3_PRO_IMAGE_PREVIEW_PRICING;
307
+ }
270
308
  if (modelId.includes("image-preview")) {
271
- return GEMINI_IMAGE_PREVIEW_PRICING;
309
+ return GEMINI_3_PRO_IMAGE_PREVIEW_PRICING;
272
310
  }
273
311
  return void 0;
274
312
  }
@@ -8009,39 +8047,48 @@ function parseOptionalString(value) {
8009
8047
  }
8010
8048
  return trimmed;
8011
8049
  }
8012
- var codexReadFileInputSchema = import_zod6.z.object({
8013
- file_path: import_zod6.z.preprocess(
8014
- (value) => parseOptionalString(value),
8015
- import_zod6.z.string().min(1).optional().describe(
8016
- "Path to the file (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."
8017
- )
8018
- ),
8019
- path: import_zod6.z.preprocess(
8020
- (value) => parseOptionalString(value),
8021
- import_zod6.z.string().min(1).optional().describe(
8022
- "Alias for file_path. If both file_path and path are provided they must be identical."
8023
- )
8024
- ),
8025
- offset: import_zod6.z.number().int().min(1).nullish().describe("The line number to start reading from. Must be 1 or greater."),
8026
- limit: import_zod6.z.number().int().min(1).nullish().describe("The maximum number of lines to return.")
8027
- }).strict().superRefine((value, context) => {
8028
- const filePath = value.file_path?.trim() ?? "";
8029
- const aliasPath = value.path?.trim() ?? "";
8030
- if (filePath.length === 0 && aliasPath.length === 0) {
8031
- context.addIssue({
8032
- code: import_zod6.z.ZodIssueCode.custom,
8033
- message: "read_file requires file_path (or path alias).",
8034
- path: ["file_path"]
8035
- });
8036
- }
8037
- if (filePath.length > 0 && aliasPath.length > 0 && filePath !== aliasPath) {
8038
- context.addIssue({
8039
- code: import_zod6.z.ZodIssueCode.custom,
8040
- message: "file_path and path must match when both are provided.",
8041
- path: ["path"]
8042
- });
8043
- }
8044
- });
8050
+ var codexReadFileInputSchema = import_zod6.z.preprocess(
8051
+ (value) => {
8052
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
8053
+ return value;
8054
+ }
8055
+ const record = value;
8056
+ const filePath = parseOptionalString(record.file_path);
8057
+ const aliasPath = parseOptionalString(record.path);
8058
+ if (!filePath && aliasPath) {
8059
+ return {
8060
+ ...record,
8061
+ file_path: aliasPath
8062
+ };
8063
+ }
8064
+ return value;
8065
+ },
8066
+ import_zod6.z.object({
8067
+ file_path: import_zod6.z.preprocess(
8068
+ (value) => parseOptionalString(value),
8069
+ import_zod6.z.string().min(1).describe(
8070
+ "Path to the file (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."
8071
+ )
8072
+ ),
8073
+ path: import_zod6.z.preprocess(
8074
+ (value) => parseOptionalString(value),
8075
+ import_zod6.z.string().min(1).optional().describe(
8076
+ "Alias for file_path. If both file_path and path are provided they must be identical."
8077
+ )
8078
+ ),
8079
+ offset: import_zod6.z.number().int().min(1).nullish().describe("The line number to start reading from. Must be 1 or greater."),
8080
+ limit: import_zod6.z.number().int().min(1).nullish().describe("The maximum number of lines to return.")
8081
+ }).strict().superRefine((value, context) => {
8082
+ const aliasPath = value.path?.trim() ?? "";
8083
+ if (aliasPath.length > 0 && value.file_path !== aliasPath) {
8084
+ context.addIssue({
8085
+ code: import_zod6.z.ZodIssueCode.custom,
8086
+ message: "file_path and path must match when both are provided.",
8087
+ path: ["path"]
8088
+ });
8089
+ }
8090
+ })
8091
+ );
8045
8092
  var codexListDirInputSchema = import_zod6.z.object({
8046
8093
  dir_path: import_zod6.z.string().min(1).describe(
8047
8094
  "Path to the directory to list (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."