@chainfuse/types 4.2.6 → 4.2.7

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.
@@ -89,7 +89,6 @@ export declare const ZodLanguageModelValues: zm.ZodMiniEnum<{
89
89
  "workersai:@hf/nexusflow/starling-lm-7b-beta": "workersai:@hf/nexusflow/starling-lm-7b-beta";
90
90
  "workersai:@cf/meta/llama-3-8b-instruct": "workersai:@cf/meta/llama-3-8b-instruct";
91
91
  "workersai:@cf/meta/llama-3.2-3b-instruct": "workersai:@cf/meta/llama-3.2-3b-instruct";
92
- "workersai:@hf/thebloke/llamaguard-7b-awq": "workersai:@hf/thebloke/llamaguard-7b-awq";
93
92
  "workersai:@hf/thebloke/neural-chat-7b-v3-1-awq": "workersai:@hf/thebloke/neural-chat-7b-v3-1-awq";
94
93
  "workersai:@cf/meta/llama-guard-3-8b": "workersai:@cf/meta/llama-guard-3-8b";
95
94
  "workersai:@cf/meta/llama-2-7b-chat-fp16": "workersai:@cf/meta/llama-2-7b-chat-fp16";
@@ -174,7 +173,6 @@ export declare const ZodLanguageModelValues4: z4.ZodEnum<{
174
173
  "workersai:@hf/nexusflow/starling-lm-7b-beta": "workersai:@hf/nexusflow/starling-lm-7b-beta";
175
174
  "workersai:@cf/meta/llama-3-8b-instruct": "workersai:@cf/meta/llama-3-8b-instruct";
176
175
  "workersai:@cf/meta/llama-3.2-3b-instruct": "workersai:@cf/meta/llama-3.2-3b-instruct";
177
- "workersai:@hf/thebloke/llamaguard-7b-awq": "workersai:@hf/thebloke/llamaguard-7b-awq";
178
176
  "workersai:@hf/thebloke/neural-chat-7b-v3-1-awq": "workersai:@hf/thebloke/neural-chat-7b-v3-1-awq";
179
177
  "workersai:@cf/meta/llama-guard-3-8b": "workersai:@cf/meta/llama-guard-3-8b";
180
178
  "workersai:@cf/meta/llama-2-7b-chat-fp16": "workersai:@cf/meta/llama-2-7b-chat-fp16";
@@ -260,6 +258,7 @@ export declare const ZodImageModelValues: zm.ZodMiniEnum<{
260
258
  "workersai:@cf/lykon/dreamshaper-8-lcm": "workersai:@cf/lykon/dreamshaper-8-lcm";
261
259
  "workersai:@cf/leonardo/phoenix-1.0": "workersai:@cf/leonardo/phoenix-1.0";
262
260
  "workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0": "workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0";
261
+ "workersai:@cf/black-forest-labs/flux-2-klein-4b": "workersai:@cf/black-forest-labs/flux-2-klein-4b";
263
262
  "workersai:@cf/black-forest-labs/flux-2-dev": "workersai:@cf/black-forest-labs/flux-2-dev";
264
263
  "workersai:@cf/runwayml/stable-diffusion-v1-5-img2img": "workersai:@cf/runwayml/stable-diffusion-v1-5-img2img";
265
264
  "workersai:@cf/leonardo/lucid-origin": "workersai:@cf/leonardo/lucid-origin";
@@ -275,6 +274,7 @@ export declare const ZodImageModelValues4: z4.ZodEnum<{
275
274
  "workersai:@cf/lykon/dreamshaper-8-lcm": "workersai:@cf/lykon/dreamshaper-8-lcm";
276
275
  "workersai:@cf/leonardo/phoenix-1.0": "workersai:@cf/leonardo/phoenix-1.0";
277
276
  "workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0": "workersai:@cf/stabilityai/stable-diffusion-xl-base-1.0";
277
+ "workersai:@cf/black-forest-labs/flux-2-klein-4b": "workersai:@cf/black-forest-labs/flux-2-klein-4b";
278
278
  "workersai:@cf/black-forest-labs/flux-2-dev": "workersai:@cf/black-forest-labs/flux-2-dev";
279
279
  "workersai:@cf/runwayml/stable-diffusion-v1-5-img2img": "workersai:@cf/runwayml/stable-diffusion-v1-5-img2img";
280
280
  "workersai:@cf/leonardo/lucid-origin": "workersai:@cf/leonardo/lucid-origin";
@@ -125,18 +125,6 @@ export declare const workersAiCatalog: {
125
125
  readonly context_window: 128000;
126
126
  readonly terms: "https://github.com/meta-llama/llama-models/blob/main/models/llama3_2/LICENSE";
127
127
  };
128
- }, {
129
- readonly id: "d9b7a55c-cefa-4208-8ab3-11497a2b046c";
130
- readonly source: 2;
131
- readonly name: "@hf/thebloke/llamaguard-7b-awq";
132
- readonly description: "Llama Guard is a model for classifying the safety of LLM prompts and responses, using a taxonomy of safety risks.\n";
133
- readonly created_at: "2024-02-06 18:13:59.060";
134
- readonly tags: readonly ["moderation", "safety", "content-filtering", "guardrails"];
135
- readonly properties: {
136
- readonly beta: true;
137
- readonly context_window: 4096;
138
- readonly planned_deprecation_date: "2025-10-01";
139
- };
140
128
  }, {
141
129
  readonly id: "d2ba5c6b-bbb7-49d6-b466-900654870cd6";
142
130
  readonly source: 2;
@@ -919,6 +907,7 @@ export declare const workersAiCatalog: {
919
907
  readonly tags: readonly [];
920
908
  readonly properties: {
921
909
  readonly async_queue: true;
910
+ readonly context_window: 153600;
922
911
  readonly price: readonly [{
923
912
  readonly unit: "per M input tokens";
924
913
  readonly price: 0.067;
@@ -1274,6 +1263,17 @@ export declare const workersAiCatalog: {
1274
1263
  readonly info: "https://stability.ai/stable-diffusion";
1275
1264
  readonly terms: "https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/LICENSE.md";
1276
1265
  };
1266
+ }, {
1267
+ readonly id: "5cdffa8e-1b1e-48e8-85f1-ab9b943cdd32";
1268
+ readonly source: 1;
1269
+ readonly name: "@cf/black-forest-labs/flux-2-klein-4b";
1270
+ readonly description: "FLUX.2 [klein] is an ultra-fast, distilled image model. It unifies image generation and editing in a single model, delivering state-of-the-art quality enabling interactive workflows, real-time previews, and latency-critical applications.";
1271
+ readonly created_at: "2026-01-14 12:54:55.024";
1272
+ readonly tags: readonly [];
1273
+ readonly properties: {
1274
+ readonly partner: true;
1275
+ readonly terms: "https://bfl.ai/legal/terms-of-service";
1276
+ };
1277
1277
  }, {
1278
1278
  readonly id: "3ae8936e-593e-4fb2-85ee-95dd8a057588";
1279
1279
  readonly source: 1;
@@ -145,19 +145,6 @@ export const workersAiCatalog = {
145
145
  terms: 'https://github.com/meta-llama/llama-models/blob/main/models/llama3_2/LICENSE',
146
146
  },
147
147
  },
148
- {
149
- id: 'd9b7a55c-cefa-4208-8ab3-11497a2b046c',
150
- source: 2,
151
- name: '@hf/thebloke/llamaguard-7b-awq',
152
- description: 'Llama Guard is a model for classifying the safety of LLM prompts and responses, using a taxonomy of safety risks.\n',
153
- created_at: '2024-02-06 18:13:59.060',
154
- tags: ['moderation', 'safety', 'content-filtering', 'guardrails'],
155
- properties: {
156
- beta: true,
157
- context_window: 4096,
158
- planned_deprecation_date: '2025-10-01',
159
- },
160
- },
161
148
  {
162
149
  id: 'd2ba5c6b-bbb7-49d6-b466-900654870cd6',
163
150
  source: 2,
@@ -1054,6 +1041,7 @@ export const workersAiCatalog = {
1054
1041
  tags: [],
1055
1042
  properties: {
1056
1043
  async_queue: true,
1044
+ context_window: 153600,
1057
1045
  price: [
1058
1046
  {
1059
1047
  unit: 'per M input tokens',
@@ -1473,6 +1461,18 @@ export const workersAiCatalog = {
1473
1461
  terms: 'https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/blob/main/LICENSE.md',
1474
1462
  },
1475
1463
  },
1464
+ {
1465
+ id: '5cdffa8e-1b1e-48e8-85f1-ab9b943cdd32',
1466
+ source: 1,
1467
+ name: '@cf/black-forest-labs/flux-2-klein-4b',
1468
+ description: 'FLUX.2 [klein] is an ultra-fast, distilled image model. It unifies image generation and editing in a single model, delivering state-of-the-art quality enabling interactive workflows, real-time previews, and latency-critical applications.',
1469
+ created_at: '2026-01-14 12:54:55.024',
1470
+ tags: [],
1471
+ properties: {
1472
+ partner: true,
1473
+ terms: 'https://bfl.ai/legal/terms-of-service',
1474
+ },
1475
+ },
1476
1476
  {
1477
1477
  id: '3ae8936e-593e-4fb2-85ee-95dd8a057588',
1478
1478
  source: 1,
package/dist/index.d.ts CHANGED
@@ -38,6 +38,14 @@ export type UnionKeys<T> = T extends any ? keyof T : never;
38
38
  export type BlockKeys<T, K extends readonly string[]> = {
39
39
  [P in keyof T as P extends K[number] ? never : P]: T[P];
40
40
  };
41
+ /**
42
+ * Narrows an environment bindings object to keys whose values match the given type
43
+ * @typeParam E - The environment bindings object
44
+ * @typeParam T - The value type to filter on
45
+ */
46
+ export type Bindings<E extends object, T extends E[keyof E]> = {
47
+ [K in keyof E as E[K] extends T ? K : never]: E[K];
48
+ };
41
49
  /**
42
50
  * For when you have a type to conform `URLSearchParams` to, but all values are strings (as per search params spec)
43
51
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@chainfuse/types",
3
- "version": "4.2.6",
3
+ "version": "4.2.7",
4
4
  "description": "",
5
5
  "author": "ChainFuse",
6
6
  "homepage": "https://github.com/ChainFuse/packages/tree/main/packages/types#readme",
@@ -98,8 +98,8 @@
98
98
  "zod": "^4.3.5"
99
99
  },
100
100
  "devDependencies": {
101
- "@cloudflare/workers-types": "^4.20260113.0",
101
+ "@cloudflare/workers-types": "^4.20260120.0",
102
102
  "@types/validator": "^13.15.10"
103
103
  },
104
- "gitHead": "de32e37b69010a4cf409fbef5112ec75223f7c4c"
104
+ "gitHead": "f3f640cdfb107c1eb2a7dfca285571f11866d1b1"
105
105
  }