@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.d.cts CHANGED
@@ -473,12 +473,12 @@ type AgentFilesystemToolsOptions = {
473
473
  readonly maxPatchBytes?: number;
474
474
  };
475
475
  };
476
- declare const codexReadFileInputSchema: z.ZodObject<{
477
- file_path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
476
+ declare const codexReadFileInputSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
477
+ file_path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodString>;
478
478
  path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
479
479
  offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
480
480
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
481
- }, z.core.$strict>;
481
+ }, z.core.$strict>>;
482
482
  declare const codexListDirInputSchema: z.ZodObject<{
483
483
  dir_path: z.ZodString;
484
484
  offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
package/dist/index.d.ts CHANGED
@@ -473,12 +473,12 @@ type AgentFilesystemToolsOptions = {
473
473
  readonly maxPatchBytes?: number;
474
474
  };
475
475
  };
476
- declare const codexReadFileInputSchema: z.ZodObject<{
477
- file_path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
476
+ declare const codexReadFileInputSchema: z.ZodPipe<z.ZodTransform<unknown, unknown>, z.ZodObject<{
477
+ file_path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodString>;
478
478
  path: z.ZodPipe<z.ZodTransform<string | undefined, unknown>, z.ZodOptional<z.ZodString>>;
479
479
  offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
480
480
  limit: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
481
- }, z.core.$strict>;
481
+ }, z.core.$strict>>;
482
482
  declare const codexListDirInputSchema: z.ZodObject<{
483
483
  dir_path: z.ZodString;
484
484
  offset: z.ZodOptional<z.ZodNullable<z.ZodNumber>>;
package/dist/index.js CHANGED
@@ -86,9 +86,14 @@ var FIREWORKS_GLM_5_PRICING = {
86
86
  };
87
87
  var FIREWORKS_MINIMAX_M21_PRICING = {
88
88
  inputRate: 0.3 / 1e6,
89
- cachedRate: 0.15 / 1e6,
89
+ cachedRate: 0.03 / 1e6,
90
90
  outputRate: 1.2 / 1e6
91
91
  };
92
+ var FIREWORKS_GPT_OSS_120B_PRICING = {
93
+ inputRate: 0.15 / 1e6,
94
+ cachedRate: 0.075 / 1e6,
95
+ outputRate: 0.6 / 1e6
96
+ };
92
97
  function getFireworksPricing(modelId) {
93
98
  if (modelId.includes("kimi-k2.5") || modelId.includes("kimi-k2p5")) {
94
99
  return FIREWORKS_KIMI_K25_PRICING;
@@ -99,6 +104,9 @@ function getFireworksPricing(modelId) {
99
104
  if (modelId.includes("minimax-m2.1") || modelId.includes("minimax-m2p1")) {
100
105
  return FIREWORKS_MINIMAX_M21_PRICING;
101
106
  }
107
+ if (modelId.includes("gpt-oss-120b")) {
108
+ return FIREWORKS_GPT_OSS_120B_PRICING;
109
+ }
102
110
  return void 0;
103
111
  }
104
112
 
@@ -130,7 +138,16 @@ var GEMINI_2_5_FLASH_PRICING = {
130
138
  outputRateLow: 2.5 / 1e6,
131
139
  outputRateHigh: 2.5 / 1e6
132
140
  };
133
- var GEMINI_IMAGE_PREVIEW_PRICING = {
141
+ var GEMINI_2_5_FLASH_LITE_PRICING = {
142
+ threshold: 2e5,
143
+ inputRateLow: 0.1 / 1e6,
144
+ inputRateHigh: 0.1 / 1e6,
145
+ cachedRateLow: 0.025 / 1e6,
146
+ cachedRateHigh: 0.025 / 1e6,
147
+ outputRateLow: 0.4 / 1e6,
148
+ outputRateHigh: 0.4 / 1e6
149
+ };
150
+ var GEMINI_3_PRO_IMAGE_PREVIEW_PRICING = {
134
151
  inputRate: 2 / 1e6,
135
152
  cachedRate: 0.2 / 1e6,
136
153
  outputTextRate: 12 / 1e6,
@@ -141,11 +158,26 @@ var GEMINI_IMAGE_PREVIEW_PRICING = {
141
158
  "4K": 0.24
142
159
  }
143
160
  };
161
+ var GEMINI_3_1_FLASH_IMAGE_PREVIEW_PRICING = {
162
+ inputRate: 0.5 / 1e6,
163
+ cachedRate: 0.125 / 1e6,
164
+ outputTextRate: 3 / 1e6,
165
+ outputImageRate: 60 / 1e6,
166
+ imagePrices: {
167
+ "512": 0.045,
168
+ "1K": 0.067,
169
+ "2K": 0.101,
170
+ "4K": 0.15
171
+ }
172
+ };
144
173
  function getGeminiProPricing(modelId) {
145
174
  if (modelId.includes("gemini-2.5-pro")) {
146
175
  return GEMINI_2_5_PRO_PRICING;
147
176
  }
148
- if (modelId.includes("gemini-2.5-flash") || modelId.includes("gemini-flash-latest")) {
177
+ if (modelId.includes("gemini-flash-lite-latest")) {
178
+ return GEMINI_2_5_FLASH_LITE_PRICING;
179
+ }
180
+ if (modelId.includes("gemini-2.5-flash") || modelId.includes("gemini-flash-latest") || modelId.includes("gemini-3-flash-preview")) {
149
181
  return GEMINI_2_5_FLASH_PRICING;
150
182
  }
151
183
  if (modelId.includes("gemini-3-pro") || modelId.includes("gemini-3.1-pro")) {
@@ -154,8 +186,14 @@ function getGeminiProPricing(modelId) {
154
186
  return void 0;
155
187
  }
156
188
  function getGeminiImagePricing(modelId) {
189
+ if (modelId.includes("gemini-3.1-flash-image-preview")) {
190
+ return GEMINI_3_1_FLASH_IMAGE_PREVIEW_PRICING;
191
+ }
192
+ if (modelId.includes("gemini-3-pro-image-preview")) {
193
+ return GEMINI_3_PRO_IMAGE_PREVIEW_PRICING;
194
+ }
157
195
  if (modelId.includes("image-preview")) {
158
- return GEMINI_IMAGE_PREVIEW_PRICING;
196
+ return GEMINI_3_PRO_IMAGE_PREVIEW_PRICING;
159
197
  }
160
198
  return void 0;
161
199
  }
@@ -7896,39 +7934,48 @@ function parseOptionalString(value) {
7896
7934
  }
7897
7935
  return trimmed;
7898
7936
  }
7899
- var codexReadFileInputSchema = z6.object({
7900
- file_path: z6.preprocess(
7901
- (value) => parseOptionalString(value),
7902
- z6.string().min(1).optional().describe(
7903
- "Path to the file (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."
7904
- )
7905
- ),
7906
- path: z6.preprocess(
7907
- (value) => parseOptionalString(value),
7908
- z6.string().min(1).optional().describe(
7909
- "Alias for file_path. If both file_path and path are provided they must be identical."
7910
- )
7911
- ),
7912
- offset: z6.number().int().min(1).nullish().describe("The line number to start reading from. Must be 1 or greater."),
7913
- limit: z6.number().int().min(1).nullish().describe("The maximum number of lines to return.")
7914
- }).strict().superRefine((value, context) => {
7915
- const filePath = value.file_path?.trim() ?? "";
7916
- const aliasPath = value.path?.trim() ?? "";
7917
- if (filePath.length === 0 && aliasPath.length === 0) {
7918
- context.addIssue({
7919
- code: z6.ZodIssueCode.custom,
7920
- message: "read_file requires file_path (or path alias).",
7921
- path: ["file_path"]
7922
- });
7923
- }
7924
- if (filePath.length > 0 && aliasPath.length > 0 && filePath !== aliasPath) {
7925
- context.addIssue({
7926
- code: z6.ZodIssueCode.custom,
7927
- message: "file_path and path must match when both are provided.",
7928
- path: ["path"]
7929
- });
7930
- }
7931
- });
7937
+ var codexReadFileInputSchema = z6.preprocess(
7938
+ (value) => {
7939
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
7940
+ return value;
7941
+ }
7942
+ const record = value;
7943
+ const filePath = parseOptionalString(record.file_path);
7944
+ const aliasPath = parseOptionalString(record.path);
7945
+ if (!filePath && aliasPath) {
7946
+ return {
7947
+ ...record,
7948
+ file_path: aliasPath
7949
+ };
7950
+ }
7951
+ return value;
7952
+ },
7953
+ z6.object({
7954
+ file_path: z6.preprocess(
7955
+ (value) => parseOptionalString(value),
7956
+ z6.string().min(1).describe(
7957
+ "Path to the file (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."
7958
+ )
7959
+ ),
7960
+ path: z6.preprocess(
7961
+ (value) => parseOptionalString(value),
7962
+ z6.string().min(1).optional().describe(
7963
+ "Alias for file_path. If both file_path and path are provided they must be identical."
7964
+ )
7965
+ ),
7966
+ offset: z6.number().int().min(1).nullish().describe("The line number to start reading from. Must be 1 or greater."),
7967
+ limit: z6.number().int().min(1).nullish().describe("The maximum number of lines to return.")
7968
+ }).strict().superRefine((value, context) => {
7969
+ const aliasPath = value.path?.trim() ?? "";
7970
+ if (aliasPath.length > 0 && value.file_path !== aliasPath) {
7971
+ context.addIssue({
7972
+ code: z6.ZodIssueCode.custom,
7973
+ message: "file_path and path must match when both are provided.",
7974
+ path: ["path"]
7975
+ });
7976
+ }
7977
+ })
7978
+ );
7932
7979
  var codexListDirInputSchema = z6.object({
7933
7980
  dir_path: z6.string().min(1).describe(
7934
7981
  "Path to the directory to list (relative to cwd, or absolute. In sandbox mode, / maps to the sandbox root)."