@ljoukov/llm 3.0.14 → 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 +42 -4
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +42 -4
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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.
|
|
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
|
|
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-
|
|
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
|
|
196
|
+
return GEMINI_3_PRO_IMAGE_PREVIEW_PRICING;
|
|
159
197
|
}
|
|
160
198
|
return void 0;
|
|
161
199
|
}
|