@maxceem/agw 0.10.11 → 0.11.1
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/agw.mjs +38 -4
- package/package.json +3 -1
package/dist/agw.mjs
CHANGED
|
@@ -6,7 +6,7 @@ var __export = (target, all) => {
|
|
|
6
6
|
};
|
|
7
7
|
|
|
8
8
|
// <define:__AGW_MANIFEST__>
|
|
9
|
-
var define_AGW_MANIFEST_default = { version: "0.
|
|
9
|
+
var define_AGW_MANIFEST_default = { version: "0.11.1", wrangler: "4.96.0", upgradeFrom: ["0.11.1", "0.11.0", "0.10.11", "0.10.10", "0.10.9", "0.10.8", "0.10.7", "0.10.6", "0.10.5", "0.10.4", "0.10.3", "0.10.2", "0.10.1", "0.10.0", "0.9.3", "0.9.2", "0.9.1", "0.9.0", "0.8.3", "0.8.2", "0.8.1", "0.8.0", "0.7.2", "0.7.1", "0.7.0", "0.6.4", "0.6.3", "0.6.2", "0.6.1", "0.6.0", "0.5.2", "0.5.1", "0.5.0", "0.4.0"], release: { url: "https://github.com/maxceem/app-ai-gateway/releases/download/v0.11.1/gateway-0.11.1.tar.gz", sha256: "9652dda9a53f4cd230da1ff1f0389320cae9ba8380c5204d0d1d8fd191ca1f7b", manifest: "adee05d2337df7a99dc407934988f9aaa0010f8e1b940fd92fe1df9f12d18de0" } };
|
|
10
10
|
|
|
11
11
|
// src/main.ts
|
|
12
12
|
import { Writable as Writable2 } from "node:stream";
|
|
@@ -15305,6 +15305,27 @@ var ENDPOINT_PROVIDER_TYPES = PROVIDER_TYPES.filter(
|
|
|
15305
15305
|
// ../src/shared/app-status.ts
|
|
15306
15306
|
var APP_STATUSES = ["active", "disabled"];
|
|
15307
15307
|
|
|
15308
|
+
// ../src/shared/token-rates.ts
|
|
15309
|
+
var TOKEN_RATE_FIELDS = [
|
|
15310
|
+
"input",
|
|
15311
|
+
"output",
|
|
15312
|
+
"cached_input",
|
|
15313
|
+
"cache_write",
|
|
15314
|
+
"cache_write_1h",
|
|
15315
|
+
"image_input",
|
|
15316
|
+
"audio_input",
|
|
15317
|
+
"video_input",
|
|
15318
|
+
"image_output",
|
|
15319
|
+
"long_input",
|
|
15320
|
+
"long_output",
|
|
15321
|
+
"long_cached_input",
|
|
15322
|
+
"long_cache_write",
|
|
15323
|
+
"long_cache_write_1h"
|
|
15324
|
+
];
|
|
15325
|
+
var LONG_RATE_FIELDS = TOKEN_RATE_FIELDS.filter(
|
|
15326
|
+
(field) => field.startsWith("long_")
|
|
15327
|
+
);
|
|
15328
|
+
|
|
15308
15329
|
// ../src/contracts/schemas.ts
|
|
15309
15330
|
var ISSUER_PROVIDERS = ["firebase", "supabase", "auth0", "clerk", "custom"];
|
|
15310
15331
|
var ENTITLEMENT_CHECKS = ["revenuecat", "custom"];
|
|
@@ -15678,12 +15699,21 @@ var UsageRepriceRequestSchema = external_exports.object({
|
|
|
15678
15699
|
month: MonthSchema,
|
|
15679
15700
|
apply: external_exports.boolean().default(false)
|
|
15680
15701
|
}).strict().meta({ id: "UsageRepriceRequest" });
|
|
15702
|
+
var TokenRateSchema = external_exports.number().finite().nonnegative();
|
|
15703
|
+
var OPTIONAL_TOKEN_RATES = Object.fromEntries(
|
|
15704
|
+
TOKEN_RATE_FIELDS.filter((field) => field !== "input" && field !== "output").map((field) => [field, TokenRateSchema.optional()])
|
|
15705
|
+
);
|
|
15681
15706
|
var ProviderPricingSchema = external_exports.record(
|
|
15682
15707
|
external_exports.string().trim().min(1).max(200),
|
|
15683
15708
|
external_exports.object({
|
|
15684
|
-
input:
|
|
15685
|
-
output:
|
|
15686
|
-
|
|
15709
|
+
input: TokenRateSchema,
|
|
15710
|
+
output: TokenRateSchema,
|
|
15711
|
+
...OPTIONAL_TOKEN_RATES,
|
|
15712
|
+
long_context_threshold: external_exports.number().int().positive().optional()
|
|
15713
|
+
}).strict().refine(
|
|
15714
|
+
(price) => price.long_context_threshold !== void 0 || LONG_RATE_FIELDS.every((field) => price[field] === void 0),
|
|
15715
|
+
{ message: "Long-context rates need long_context_threshold" }
|
|
15716
|
+
)
|
|
15687
15717
|
).meta({ id: "ProviderPricing" });
|
|
15688
15718
|
var ProviderNameSchema = external_exports.string().trim().min(1).max(100);
|
|
15689
15719
|
var ProviderSecretSchema = external_exports.string().min(1).max(4096);
|
|
@@ -18247,6 +18277,9 @@ var ModelPriceSchema = external_exports.object({
|
|
|
18247
18277
|
}),
|
|
18248
18278
|
cached_input: external_exports.number().optional(),
|
|
18249
18279
|
cache_write: external_exports.number().optional(),
|
|
18280
|
+
cache_write_1h: external_exports.number().optional().meta({
|
|
18281
|
+
description: "USD per 1M tokens written to a one-hour cache, where it costs more than the default cache write."
|
|
18282
|
+
}),
|
|
18250
18283
|
per_minute: external_exports.number().optional(),
|
|
18251
18284
|
per_hour: external_exports.number().optional(),
|
|
18252
18285
|
per_image: external_exports.number().optional().meta({
|
|
@@ -18257,6 +18290,7 @@ var ModelPriceSchema = external_exports.object({
|
|
|
18257
18290
|
long_output: external_exports.number().optional(),
|
|
18258
18291
|
long_cached_input: external_exports.number().optional(),
|
|
18259
18292
|
long_cache_write: external_exports.number().optional(),
|
|
18293
|
+
long_cache_write_1h: external_exports.number().optional(),
|
|
18260
18294
|
retirement_date: external_exports.string().optional().meta({
|
|
18261
18295
|
description: "The day (YYYY-MM-DD) the provider stops, or stopped, serving this model. The model stays priced after it."
|
|
18262
18296
|
})
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@maxceem/agw",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.11.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Manage App AI Gateway from a terminal or coding agent: providers, iOS and server apps, usage, and self-hosted deployment on Cloudflare",
|
|
6
6
|
"keywords": [
|
|
@@ -26,6 +26,8 @@
|
|
|
26
26
|
},
|
|
27
27
|
"bugs": "https://github.com/maxceem/app-ai-gateway/issues",
|
|
28
28
|
"upgradeFrom": [
|
|
29
|
+
"0.11.0",
|
|
30
|
+
"0.10.11",
|
|
29
31
|
"0.10.10",
|
|
30
32
|
"0.10.9",
|
|
31
33
|
"0.10.8",
|