@isaacthoman/pulpo 0.180.3 → 0.181.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.js +19 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -22201,13 +22201,17 @@ var imageTokenPricesSchema = external_exports.object({
|
|
|
22201
22201
|
cachedImageInput: price.nullable().default(null),
|
|
22202
22202
|
imageOutput: price.nullable().default(null)
|
|
22203
22203
|
});
|
|
22204
|
+
var IMAGE_TOKEN_BILLING_UNAVAILABLE = {
|
|
22205
|
+
"azure-mai": "Azure MAI does not report token usage; use per-image pricing.",
|
|
22206
|
+
"openrouter-images": "OpenRouter Images uses per-image pricing in Pulpo."
|
|
22207
|
+
};
|
|
22204
22208
|
function imageTokenRateKeys(adapter) {
|
|
22205
22209
|
return adapter === "openai-images" ? ["input", "cachedInput", "imageInput", "cachedImageInput", "output", "imageOutput"] : ["input", "cachedInput", "output"];
|
|
22206
22210
|
}
|
|
22207
22211
|
var imageModelSchema = external_exports.object({
|
|
22208
22212
|
id: external_exports.string().regex(/^[a-z0-9][a-z0-9._-]{0,119}$/),
|
|
22209
22213
|
providerConnectionId: external_exports.uuid(),
|
|
22210
|
-
adapter: external_exports.enum(["azure-mai", "meta-muse", "openai-images"]),
|
|
22214
|
+
adapter: external_exports.enum(["azure-mai", "meta-muse", "openai-images", "openrouter-images"]),
|
|
22211
22215
|
name: external_exports.string().trim().min(1).max(120),
|
|
22212
22216
|
upstreamModelId: external_exports.string().trim().min(1).max(200),
|
|
22213
22217
|
// Optional for existing model records. Azure deployment names can be arbitrary.
|
|
@@ -22222,8 +22226,9 @@ var imageModelSchema = external_exports.object({
|
|
|
22222
22226
|
}).superRefine((model, ctx) => {
|
|
22223
22227
|
if (model.billingUnit !== "tokens")
|
|
22224
22228
|
return;
|
|
22225
|
-
|
|
22226
|
-
|
|
22229
|
+
const unavailable = IMAGE_TOKEN_BILLING_UNAVAILABLE[model.adapter];
|
|
22230
|
+
if (unavailable)
|
|
22231
|
+
ctx.addIssue({ code: "custom", path: ["billingUnit"], message: unavailable });
|
|
22227
22232
|
if (!model.billUsers)
|
|
22228
22233
|
return;
|
|
22229
22234
|
if (model.reservationMicros <= 0)
|
|
@@ -22262,6 +22267,13 @@ var OPENAI_IMAGE_PRESET = {
|
|
|
22262
22267
|
// Microdollars / 1M tokens, verified 2026-09-13: developers.openai.com/api/docs/models/gpt-image-2.5-flare
|
|
22263
22268
|
tokenPrices: { input: 5e6, cachedInput: 125e4, imageInput: 8e6, cachedImageInput: 2e6, output: 0, imageOutput: 3e7 }
|
|
22264
22269
|
};
|
|
22270
|
+
var OPENROUTER_IMAGE_PRESET = {
|
|
22271
|
+
...AZURE_MAI_IMAGE_PRESET,
|
|
22272
|
+
adapter: "openrouter-images",
|
|
22273
|
+
name: "MAI-Image-2.7 Flash",
|
|
22274
|
+
upstreamModelId: "microsoft/mai-image-2.7-flash",
|
|
22275
|
+
supportsAutoAspectRatio: false
|
|
22276
|
+
};
|
|
22265
22277
|
var IMAGE_GENERATION_MAX_BYTES = 20 * 1024 * 1024;
|
|
22266
22278
|
var IMAGE_REFERENCE_PATH_SHORTHAND_PATTERN = "^/workspace/[^\\u0000]+$";
|
|
22267
22279
|
var IMAGE_ASPECT_RATIOS = ["auto", "1:1", "3:2", "2:3"];
|
|
@@ -24606,6 +24618,9 @@ var adminMessageReportSchema = external_exports.object({
|
|
|
24606
24618
|
});
|
|
24607
24619
|
var adminMessageReportStatusSchema = external_exports.enum(["open", "resolved"]);
|
|
24608
24620
|
|
|
24621
|
+
// ../../packages/contracts/dist/audio-transcription.js
|
|
24622
|
+
var MAX_AUDIO_TRANSCRIPTION_BYTES = 10 * 1024 * 1024;
|
|
24623
|
+
|
|
24609
24624
|
// ../../packages/contracts/dist/index.js
|
|
24610
24625
|
var idSchema = external_exports.uuid();
|
|
24611
24626
|
var isoDateSchema = external_exports.iso.datetime();
|
|
@@ -36753,7 +36768,7 @@ async function runModelTest(input2) {
|
|
|
36753
36768
|
}
|
|
36754
36769
|
|
|
36755
36770
|
// src/index.ts
|
|
36756
|
-
var CLI_VERSION = true ? "0.
|
|
36771
|
+
var CLI_VERSION = true ? "0.181.0" : "0.1.0";
|
|
36757
36772
|
var CLI_BUNDLED = true;
|
|
36758
36773
|
var commandIo = /* @__PURE__ */ new WeakMap();
|
|
36759
36774
|
var commandClientFactory = /* @__PURE__ */ new WeakMap();
|