@astrale-domains/ai-gateway 0.2.0 → 0.2.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.
Files changed (35) hide show
  1. package/README.md +16 -15
  2. package/dist/schema/application/index.d.ts +27 -61
  3. package/dist/schema/application/index.js +11 -0
  4. package/dist/schema/catalog/claude-opus-5.d.ts +1 -0
  5. package/dist/schema/catalog/claude-opus-5.js +22 -0
  6. package/dist/schema/catalog/gemini-3-5-flash.d.ts +1 -0
  7. package/dist/schema/catalog/gemini-3-5-flash.js +22 -0
  8. package/dist/schema/catalog/gpt-5-6-luna.d.ts +1 -0
  9. package/dist/schema/catalog/gpt-5-6-luna.js +22 -0
  10. package/dist/schema/catalog/gpt-5-6-sol.d.ts +1 -0
  11. package/dist/schema/catalog/gpt-5-6-sol.js +22 -0
  12. package/dist/schema/catalog/gpt-5-6-terra.d.ts +1 -0
  13. package/dist/schema/catalog/gpt-5-6-terra.js +22 -0
  14. package/dist/schema/catalog/index.d.ts +6 -0
  15. package/dist/schema/catalog/index.js +6 -0
  16. package/dist/schema/catalog/kimi-k2-7-code.d.ts +1 -0
  17. package/dist/schema/catalog/kimi-k2-7-code.js +26 -0
  18. package/dist/schema/index.d.ts +1 -0
  19. package/dist/schema/index.js +1 -0
  20. package/dist/schema/model/{class.d.ts → ai-model-class.d.ts} +12 -56
  21. package/dist/schema/model/ai-model-class.js +29 -0
  22. package/dist/schema/model/ai-model-input.d.ts +62 -0
  23. package/dist/schema/model/ai-model-input.js +18 -0
  24. package/dist/schema/model/ai-model-properties.d.ts +23 -0
  25. package/dist/schema/model/ai-model-properties.js +16 -0
  26. package/dist/schema/model/ai-model-request-body.js +2 -0
  27. package/dist/schema/model/index.d.ts +3 -1
  28. package/dist/schema/model/index.js +3 -1
  29. package/dist/schema/model/invoke-ai-model-anthropic-format-method.js +8 -0
  30. package/dist/schema/model/invoke-ai-model-openai-format-method.js +8 -0
  31. package/dist/schema/model/invoke-ai-model-passthrough-method.js +13 -0
  32. package/dist/schema/model/invoke-ai-model-vercel-format-method.js +8 -0
  33. package/dist/schema/model/register-ai-model-method.js +8 -0
  34. package/package.json +20 -7
  35. package/dist/schema/model/class.js +0 -70
package/README.md CHANGED
@@ -6,21 +6,22 @@ before inference crosses the Cloudflare AI Gateway boundary.
6
6
 
7
7
  ## Current Application model
8
8
 
9
- - `AIModel.register` is a static authorized Action that creates one model node.
10
- - `AIModel.list` is a static authenticated Action backed by a graph Query.
11
- - `AIModel.invoke` performs provider-native passthrough with caller credentials removed.
12
- - the OpenAI, Anthropic, and Vercel format Methods adapt a caller protocol while retaining the
13
- model and Provider selected by the node.
14
- - `model-gateway` is the sole provider-neutral Integration; its invocation is explicitly unsafe to
15
- replay because inference may bill or create provider-side effects.
16
-
17
- The current SDK does not expose an executable migration or post-install seed API. A fresh install
18
- therefore registers catalog nodes explicitly through `AIModel.register`; this migration does not
19
- pretend the legacy Core seed still runs. Existing nodes at the same origin/class remain compatible.
20
-
21
- Current binary Function results contain admitted bytes and media type, not a live `Response` body.
22
- Upstream streaming requests are consequently buffered; Anthropic streaming is rejected explicitly
23
- instead of being mislabeled as replay-safe streaming.
9
+ - Declarative Core installs the six stable model nodes; `AIModel.register` remains the authorized
10
+ operator path for an additional model.
11
+ - The View reads the catalog through the projected `listVisibleAIModels` Query directly. There is no
12
+ list Function wrapper.
13
+ - `AIModel.invoke` performs provider-native passthrough with caller credentials removed and long
14
+ safety identifiers normalized to bounded hashes.
15
+ - OpenAI Chat Completions, Anthropic Messages, Vercel UI messages, and provider-native passthrough
16
+ each have one exact HTTP route and one receiver-bound Action.
17
+ - The provider-neutral `model-inference` Integration is explicitly unsafe to replay because an
18
+ inference may bill or create provider-side effects.
19
+ - Binary output is one semantic mode with buffered and streaming byte bodies. Status, media type,
20
+ safe headers, cancellation, and incremental SSE delivery survive beneath that single result kind.
21
+
22
+ Anthropic tool calls and streaming events are translated to valid Anthropic protocol. Unsigned
23
+ OpenAI reasoning text is deliberately not emitted as an Anthropic `thinking` block because such a
24
+ block requires provider-authenticated signature evidence.
24
25
 
25
26
  ## Development
26
27
 
@@ -60,6 +60,7 @@ export declare const schema: import("@astrale-os/sdk/schema").DefinedSchema<"ai-
60
60
  readonly properties: {
61
61
  readonly modelId: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "modelId", "self">;
62
62
  readonly provider: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"azure" | "google" | "workers-ai", "azure" | "google" | "workers-ai", true, "provider", "self">;
63
+ readonly upstreamFormat: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"anthropic" | "openai", "anthropic" | "openai", true, "upstreamFormat", "self">;
63
64
  readonly contextWindow: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<number, number, true, "contextWindow", "self">;
64
65
  readonly maxOutputTokens: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<number, number, true, "maxOutputTokens", "self">;
65
66
  readonly modality: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<{
@@ -94,6 +95,7 @@ export declare const schema: import("@astrale-os/sdk/schema").DefinedSchema<"ai-
94
95
  description?: string | undefined;
95
96
  modelId: string;
96
97
  provider: "azure" | "google" | "workers-ai";
98
+ upstreamFormat: "anthropic" | "openai";
97
99
  contextWindow: number;
98
100
  maxOutputTokens: number;
99
101
  modality: {
@@ -116,6 +118,7 @@ export declare const schema: import("@astrale-os/sdk/schema").DefinedSchema<"ai-
116
118
  name: string;
117
119
  modelId: string;
118
120
  provider: "azure" | "google" | "workers-ai";
121
+ upstreamFormat: "anthropic" | "openai";
119
122
  contextWindow: number;
120
123
  maxOutputTokens: number;
121
124
  modality: {
@@ -136,36 +139,11 @@ export declare const schema: import("@astrale-os/sdk/schema").DefinedSchema<"ai-
136
139
  description: string;
137
140
  };
138
141
  }, "authorized", true, "default">>;
139
- readonly list: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
140
- readonly mode: 'value';
141
- readonly value: {
142
- name: string;
143
- modelId: string;
144
- provider: "azure" | "google" | "workers-ai";
145
- contextWindow: number;
146
- maxOutputTokens: number;
147
- modality: {
148
- input: string[];
149
- output: string[];
150
- };
151
- capabilities: {
152
- toolUse: boolean;
153
- vision: boolean;
154
- reasoning: boolean;
155
- fileInput: boolean;
156
- structuredOutput: boolean;
157
- streaming: boolean;
158
- caching: boolean;
159
- };
160
- pricing: Record<string, string>;
161
- id: string;
162
- description: string;
163
- }[];
164
- }, "authenticated", true, "default">>;
165
142
  readonly invoke: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
166
143
  path: string;
167
144
  body: string;
168
145
  headers?: Record<string, string> | undefined;
146
+ contentType?: string | undefined;
169
147
  }, {
170
148
  readonly mode: 'binary';
171
149
  }, "authorized", false, "default">>;
@@ -207,23 +185,28 @@ export declare const schema: import("@astrale-os/sdk/schema").DefinedSchema<"ai-
207
185
  }, {
208
186
  input: string[];
209
187
  output: string[];
210
- }, true, "modality", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "modelId", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<Record<string, string>, Record<string, string>, true, "pricing", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"azure" | "google" | "workers-ai", "azure" | "google" | "workers-ai", true, "provider", "self">) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
188
+ }, true, "modality", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "modelId", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<Record<string, string>, Record<string, string>, true, "pricing", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"azure" | "google" | "workers-ai", "azure" | "google" | "workers-ai", true, "provider", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"anthropic" | "openai", "anthropic" | "openai", true, "upstreamFormat", "self">) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
211
189
  readonly name: "description";
212
190
  readonly key: "kernel.astrale.ai:class.Descriptable.property.description";
213
- }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
214
- readonly name: "createdAt";
215
- readonly key: "kernel.astrale.ai:class.Timestamped.property.createdAt";
216
191
  }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
217
192
  readonly name: "name";
218
193
  readonly key: "kernel.astrale.ai:class.Named.property.name";
194
+ }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
195
+ readonly name: "createdAt";
196
+ readonly key: "kernel.astrale.ai:class.Timestamped.property.createdAt";
219
197
  }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
220
198
  readonly name: "updatedAt";
221
199
  readonly key: "kernel.astrale.ai:class.Timestamped.property.updatedAt";
222
200
  });
223
201
  readonly effectiveInstanceMethods: import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
202
+ body: string;
203
+ }, {
204
+ readonly mode: 'binary';
205
+ }, "authorized", false, "default">>, "invokeVercelFormat", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
224
206
  path: string;
225
207
  body: string;
226
208
  headers?: Record<string, string> | undefined;
209
+ contentType?: string | undefined;
227
210
  }, {
228
211
  readonly mode: 'binary';
229
212
  }, "authorized", false, "default">>, "invoke", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -234,41 +217,13 @@ export declare const schema: import("@astrale-os/sdk/schema").DefinedSchema<"ai-
234
217
  body: string;
235
218
  }, {
236
219
  readonly mode: 'binary';
237
- }, "authorized", false, "default">>, "invokeAnthropicFormat", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
238
- body: string;
239
- }, {
240
- readonly mode: 'binary';
241
- }, "authorized", false, "default">>, "invokeVercelFormat", "self">;
242
- readonly effectiveStaticMethods: import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
243
- readonly mode: 'value';
244
- readonly value: {
245
- name: string;
246
- modelId: string;
247
- provider: "azure" | "google" | "workers-ai";
248
- contextWindow: number;
249
- maxOutputTokens: number;
250
- modality: {
251
- input: string[];
252
- output: string[];
253
- };
254
- capabilities: {
255
- toolUse: boolean;
256
- vision: boolean;
257
- reasoning: boolean;
258
- fileInput: boolean;
259
- structuredOutput: boolean;
260
- streaming: boolean;
261
- caching: boolean;
262
- };
263
- pricing: Record<string, string>;
264
- id: string;
265
- description: string;
266
- }[];
267
- }, "authenticated", true, "default">>, "list", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
220
+ }, "authorized", false, "default">>, "invokeAnthropicFormat", "self">;
221
+ readonly effectiveStaticMethods: import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
268
222
  name: string;
269
223
  description?: string | undefined;
270
224
  modelId: string;
271
225
  provider: "azure" | "google" | "workers-ai";
226
+ upstreamFormat: "anthropic" | "openai";
272
227
  contextWindow: number;
273
228
  maxOutputTokens: number;
274
229
  modality: {
@@ -291,6 +246,7 @@ export declare const schema: import("@astrale-os/sdk/schema").DefinedSchema<"ai-
291
246
  name: string;
292
247
  modelId: string;
293
248
  provider: "azure" | "google" | "workers-ai";
249
+ upstreamFormat: "anthropic" | "openai";
294
250
  contextWindow: number;
295
251
  maxOutputTokens: number;
296
252
  modality: {
@@ -316,6 +272,16 @@ export declare const schema: import("@astrale-os/sdk/schema").DefinedSchema<"ai-
316
272
  readonly views: {
317
273
  application: import("@astrale-os/sdk/schema").View;
318
274
  };
275
+ readonly core: {
276
+ nodes: {
277
+ 'kimi-k2-7-code': import("@astrale-os/sdk/schema").CoreNode;
278
+ 'gemini-3-5-flash': import("@astrale-os/sdk/schema").CoreNode;
279
+ 'gpt-5-6-sol': import("@astrale-os/sdk/schema").CoreNode;
280
+ 'gpt-5-6-terra': import("@astrale-os/sdk/schema").CoreNode;
281
+ 'gpt-5-6-luna': import("@astrale-os/sdk/schema").CoreNode;
282
+ 'claude-opus-5': import("@astrale-os/sdk/schema").CoreNode;
283
+ };
284
+ };
319
285
  }>>;
320
286
  export type AIGatewaySchema = typeof schema;
321
287
  export type AIGatewayDomain = language.DomainOf<typeof schema>;
@@ -1,4 +1,5 @@
1
1
  import { KernelSchema, defineSchema, view } from '@astrale-os/sdk/schema';
2
+ import { claudeOpus5, gemini35Flash, gpt56Luna, gpt56Sol, gpt56Terra, kimiK27Code, } from '#schema/catalog';
2
3
  import { AIModel } from '#schema/model';
3
4
  export const schema = defineSchema('ai-gateway.astrale.ai', {
4
5
  dependencies: { kernel: KernelSchema },
@@ -6,4 +7,14 @@ export const schema = defineSchema('ai-gateway.astrale.ai', {
6
7
  views: {
7
8
  application: view({}),
8
9
  },
10
+ core: {
11
+ nodes: {
12
+ 'kimi-k2-7-code': kimiK27Code,
13
+ 'gemini-3-5-flash': gemini35Flash,
14
+ 'gpt-5-6-sol': gpt56Sol,
15
+ 'gpt-5-6-terra': gpt56Terra,
16
+ 'gpt-5-6-luna': gpt56Luna,
17
+ 'claude-opus-5': claudeOpus5,
18
+ },
19
+ },
9
20
  });
@@ -0,0 +1 @@
1
+ export declare const claudeOpus5: import("@astrale-os/sdk/schema").CoreNode;
@@ -0,0 +1,22 @@
1
+ import { core } from '@astrale-os/sdk/schema';
2
+ import { AIModel } from '#schema/model';
3
+ export const claudeOpus5 = core.node(AIModel, {
4
+ name: 'Claude Opus 5',
5
+ description: 'Claude Opus 5 hosted on Azure for advanced reasoning and agentic work.',
6
+ modelId: 'claude-opus-5',
7
+ provider: 'azure',
8
+ upstreamFormat: 'anthropic',
9
+ contextWindow: 1_000_000,
10
+ maxOutputTokens: 128_000,
11
+ modality: { input: ['text', 'image'], output: ['text'] },
12
+ capabilities: {
13
+ streaming: true,
14
+ toolUse: true,
15
+ reasoning: true,
16
+ vision: true,
17
+ fileInput: true,
18
+ structuredOutput: false,
19
+ caching: false,
20
+ },
21
+ pricing: {},
22
+ });
@@ -0,0 +1 @@
1
+ export declare const gemini35Flash: import("@astrale-os/sdk/schema").CoreNode;
@@ -0,0 +1,22 @@
1
+ import { core } from '@astrale-os/sdk/schema';
2
+ import { AIModel } from '#schema/model';
3
+ export const gemini35Flash = core.node(AIModel, {
4
+ name: 'Gemini 3.5 Flash',
5
+ description: 'Google Gemini 3.5 Flash through Cloudflare AI Gateway.',
6
+ modelId: 'google-ai-studio/gemini-3.5-flash',
7
+ provider: 'google',
8
+ upstreamFormat: 'openai',
9
+ contextWindow: 1_048_576,
10
+ maxOutputTokens: 65_536,
11
+ modality: { input: ['text', 'image'], output: ['text'] },
12
+ capabilities: {
13
+ streaming: true,
14
+ toolUse: true,
15
+ reasoning: true,
16
+ vision: true,
17
+ fileInput: true,
18
+ structuredOutput: true,
19
+ caching: false,
20
+ },
21
+ pricing: {},
22
+ });
@@ -0,0 +1 @@
1
+ export declare const gpt56Luna: import("@astrale-os/sdk/schema").CoreNode;
@@ -0,0 +1,22 @@
1
+ import { core } from '@astrale-os/sdk/schema';
2
+ import { AIModel } from '#schema/model';
3
+ export const gpt56Luna = core.node(AIModel, {
4
+ name: 'GPT-5.6 Luna',
5
+ description: 'Cost-efficient GPT-5.6 model for high-volume workloads, deployed on Azure.',
6
+ modelId: 'gpt-5.6-luna',
7
+ provider: 'azure',
8
+ upstreamFormat: 'openai',
9
+ contextWindow: 1_050_000,
10
+ maxOutputTokens: 128_000,
11
+ modality: { input: ['text', 'image'], output: ['text'] },
12
+ capabilities: {
13
+ streaming: true,
14
+ toolUse: true,
15
+ reasoning: true,
16
+ vision: true,
17
+ fileInput: true,
18
+ structuredOutput: true,
19
+ caching: false,
20
+ },
21
+ pricing: {},
22
+ });
@@ -0,0 +1 @@
1
+ export declare const gpt56Sol: import("@astrale-os/sdk/schema").CoreNode;
@@ -0,0 +1,22 @@
1
+ import { core } from '@astrale-os/sdk/schema';
2
+ import { AIModel } from '#schema/model';
3
+ export const gpt56Sol = core.node(AIModel, {
4
+ name: 'GPT-5.6 Sol',
5
+ description: 'Frontier GPT-5.6 model for complex professional work, deployed on Azure.',
6
+ modelId: 'gpt-5.6-sol',
7
+ provider: 'azure',
8
+ upstreamFormat: 'openai',
9
+ contextWindow: 1_050_000,
10
+ maxOutputTokens: 128_000,
11
+ modality: { input: ['text', 'image'], output: ['text'] },
12
+ capabilities: {
13
+ streaming: true,
14
+ toolUse: true,
15
+ reasoning: true,
16
+ vision: true,
17
+ fileInput: true,
18
+ structuredOutput: true,
19
+ caching: false,
20
+ },
21
+ pricing: {},
22
+ });
@@ -0,0 +1 @@
1
+ export declare const gpt56Terra: import("@astrale-os/sdk/schema").CoreNode;
@@ -0,0 +1,22 @@
1
+ import { core } from '@astrale-os/sdk/schema';
2
+ import { AIModel } from '#schema/model';
3
+ export const gpt56Terra = core.node(AIModel, {
4
+ name: 'GPT-5.6 Terra',
5
+ description: 'Balanced GPT-5.6 model for intelligence and cost, deployed on Azure.',
6
+ modelId: 'gpt-5.6-terra',
7
+ provider: 'azure',
8
+ upstreamFormat: 'openai',
9
+ contextWindow: 1_050_000,
10
+ maxOutputTokens: 128_000,
11
+ modality: { input: ['text', 'image'], output: ['text'] },
12
+ capabilities: {
13
+ streaming: true,
14
+ toolUse: true,
15
+ reasoning: true,
16
+ vision: true,
17
+ fileInput: true,
18
+ structuredOutput: true,
19
+ caching: false,
20
+ },
21
+ pricing: {},
22
+ });
@@ -0,0 +1,6 @@
1
+ export { claudeOpus5 } from './claude-opus-5.js';
2
+ export { gemini35Flash } from './gemini-3-5-flash.js';
3
+ export { gpt56Luna } from './gpt-5-6-luna.js';
4
+ export { gpt56Sol } from './gpt-5-6-sol.js';
5
+ export { gpt56Terra } from './gpt-5-6-terra.js';
6
+ export { kimiK27Code } from './kimi-k2-7-code.js';
@@ -0,0 +1,6 @@
1
+ export { claudeOpus5 } from './claude-opus-5.js';
2
+ export { gemini35Flash } from './gemini-3-5-flash.js';
3
+ export { gpt56Luna } from './gpt-5-6-luna.js';
4
+ export { gpt56Sol } from './gpt-5-6-sol.js';
5
+ export { gpt56Terra } from './gpt-5-6-terra.js';
6
+ export { kimiK27Code } from './kimi-k2-7-code.js';
@@ -0,0 +1 @@
1
+ export declare const kimiK27Code: import("@astrale-os/sdk/schema").CoreNode;
@@ -0,0 +1,26 @@
1
+ import { core } from '@astrale-os/sdk/schema';
2
+ import { AIModel } from '#schema/model';
3
+ export const kimiK27Code = core.node(AIModel, {
4
+ name: 'Kimi K2.7 Code',
5
+ description: 'Moonshot Kimi K2.7 Code on Cloudflare Workers AI.',
6
+ modelId: '@cf/moonshotai/kimi-k2.7-code',
7
+ provider: 'workers-ai',
8
+ upstreamFormat: 'openai',
9
+ contextWindow: 262_144,
10
+ maxOutputTokens: 32_768,
11
+ modality: { input: ['text', 'image'], output: ['text'] },
12
+ capabilities: {
13
+ streaming: true,
14
+ toolUse: true,
15
+ reasoning: true,
16
+ vision: true,
17
+ fileInput: true,
18
+ structuredOutput: true,
19
+ caching: false,
20
+ },
21
+ pricing: {
22
+ inputPerMTok: '$0.95',
23
+ outputPerMTok: '$4.00',
24
+ cachedInputReadPerMTok: '$0.19',
25
+ },
26
+ });
@@ -1,3 +1,4 @@
1
1
  export { schema } from './application/index.js';
2
2
  export type { AIGatewayDomain, AIGatewaySchema } from './application/index.js';
3
+ export { claudeOpus5, gemini35Flash, gpt56Luna, gpt56Sol, gpt56Terra, kimiK27Code, } from './catalog/index.js';
3
4
  export { AIModel } from './model/index.js';
@@ -1,2 +1,3 @@
1
1
  export { schema } from './application/index.js';
2
+ export { claudeOpus5, gemini35Flash, gpt56Luna, gpt56Sol, gpt56Terra, kimiK27Code, } from './catalog/index.js';
2
3
  export { AIModel } from './model/index.js';
@@ -53,6 +53,7 @@ export declare const AIModel: import("@astrale-os/sdk/schema").NodeClass<{
53
53
  readonly properties: {
54
54
  readonly modelId: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "modelId", "self">;
55
55
  readonly provider: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"azure" | "google" | "workers-ai", "azure" | "google" | "workers-ai", true, "provider", "self">;
56
+ readonly upstreamFormat: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"anthropic" | "openai", "anthropic" | "openai", true, "upstreamFormat", "self">;
56
57
  readonly contextWindow: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<number, number, true, "contextWindow", "self">;
57
58
  readonly maxOutputTokens: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<number, number, true, "maxOutputTokens", "self">;
58
59
  readonly modality: import("@astrale-os/sdk/schema").AuthoredPropertyProjection<{
@@ -87,6 +88,7 @@ export declare const AIModel: import("@astrale-os/sdk/schema").NodeClass<{
87
88
  description?: string | undefined;
88
89
  modelId: string;
89
90
  provider: "azure" | "google" | "workers-ai";
91
+ upstreamFormat: "anthropic" | "openai";
90
92
  contextWindow: number;
91
93
  maxOutputTokens: number;
92
94
  modality: {
@@ -109,6 +111,7 @@ export declare const AIModel: import("@astrale-os/sdk/schema").NodeClass<{
109
111
  name: string;
110
112
  modelId: string;
111
113
  provider: "azure" | "google" | "workers-ai";
114
+ upstreamFormat: "anthropic" | "openai";
112
115
  contextWindow: number;
113
116
  maxOutputTokens: number;
114
117
  modality: {
@@ -129,36 +132,11 @@ export declare const AIModel: import("@astrale-os/sdk/schema").NodeClass<{
129
132
  description: string;
130
133
  };
131
134
  }, "authorized", true, "default">>;
132
- readonly list: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
133
- readonly mode: 'value';
134
- readonly value: {
135
- name: string;
136
- modelId: string;
137
- provider: "azure" | "google" | "workers-ai";
138
- contextWindow: number;
139
- maxOutputTokens: number;
140
- modality: {
141
- input: string[];
142
- output: string[];
143
- };
144
- capabilities: {
145
- toolUse: boolean;
146
- vision: boolean;
147
- reasoning: boolean;
148
- fileInput: boolean;
149
- structuredOutput: boolean;
150
- streaming: boolean;
151
- caching: boolean;
152
- };
153
- pricing: Record<string, string>;
154
- id: string;
155
- description: string;
156
- }[];
157
- }, "authenticated", true, "default">>;
158
135
  readonly invoke: import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
159
136
  path: string;
160
137
  body: string;
161
138
  headers?: Record<string, string> | undefined;
139
+ contentType?: string | undefined;
162
140
  }, {
163
141
  readonly mode: 'binary';
164
142
  }, "authorized", false, "default">>;
@@ -200,15 +178,15 @@ export declare const AIModel: import("@astrale-os/sdk/schema").NodeClass<{
200
178
  }, {
201
179
  input: string[];
202
180
  output: string[];
203
- }, true, "modality", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "modelId", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<Record<string, string>, Record<string, string>, true, "pricing", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"azure" | "google" | "workers-ai", "azure" | "google" | "workers-ai", true, "provider", "self">) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
181
+ }, true, "modality", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<string, string, true, "modelId", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<Record<string, string>, Record<string, string>, true, "pricing", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"azure" | "google" | "workers-ai", "azure" | "google" | "workers-ai", true, "provider", "self"> | import("@astrale-os/sdk/schema").AuthoredPropertyProjection<"anthropic" | "openai", "anthropic" | "openai", true, "upstreamFormat", "self">) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, false> & {
204
182
  readonly name: "description";
205
183
  readonly key: "kernel.astrale.ai:class.Descriptable.property.description";
206
- }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
207
- readonly name: "name";
208
- readonly key: "kernel.astrale.ai:class.Named.property.name";
209
184
  }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
210
185
  readonly name: "createdAt";
211
186
  readonly key: "kernel.astrale.ai:class.Timestamped.property.createdAt";
187
+ }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
188
+ readonly name: "name";
189
+ readonly key: "kernel.astrale.ai:class.Named.property.name";
212
190
  }) | (import("@astrale-os/sdk/schema").ResolvedProperty<import("@astrale-os/sdk/schema").Value, true> & {
213
191
  readonly name: "updatedAt";
214
192
  readonly key: "kernel.astrale.ai:class.Timestamped.property.updatedAt";
@@ -217,6 +195,7 @@ export declare const AIModel: import("@astrale-os/sdk/schema").NodeClass<{
217
195
  path: string;
218
196
  body: string;
219
197
  headers?: Record<string, string> | undefined;
198
+ contentType?: string | undefined;
220
199
  }, {
221
200
  readonly mode: 'binary';
222
201
  }, "authorized", false, "default">>, "invoke", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
@@ -232,36 +211,12 @@ export declare const AIModel: import("@astrale-os/sdk/schema").NodeClass<{
232
211
  }, {
233
212
  readonly mode: 'binary';
234
213
  }, "authorized", false, "default">>, "invokeVercelFormat", "self">;
235
- readonly effectiveStaticMethods: import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<Record<string, never>, {
236
- readonly mode: 'value';
237
- readonly value: {
238
- name: string;
239
- modelId: string;
240
- provider: "azure" | "google" | "workers-ai";
241
- contextWindow: number;
242
- maxOutputTokens: number;
243
- modality: {
244
- input: string[];
245
- output: string[];
246
- };
247
- capabilities: {
248
- toolUse: boolean;
249
- vision: boolean;
250
- reasoning: boolean;
251
- fileInput: boolean;
252
- structuredOutput: boolean;
253
- streaming: boolean;
254
- caching: boolean;
255
- };
256
- pricing: Record<string, string>;
257
- id: string;
258
- description: string;
259
- }[];
260
- }, "authenticated", true, "default">>, "list", "self"> | import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
214
+ readonly effectiveStaticMethods: import("@astrale-os/sdk/schema").AuthoredMethodProjection<import("@astrale-os/sdk/schema").Method<import("@astrale-os/sdk/schema").CallableProjection<{
261
215
  name: string;
262
216
  description?: string | undefined;
263
217
  modelId: string;
264
218
  provider: "azure" | "google" | "workers-ai";
219
+ upstreamFormat: "anthropic" | "openai";
265
220
  contextWindow: number;
266
221
  maxOutputTokens: number;
267
222
  modality: {
@@ -284,6 +239,7 @@ export declare const AIModel: import("@astrale-os/sdk/schema").NodeClass<{
284
239
  name: string;
285
240
  modelId: string;
286
241
  provider: "azure" | "google" | "workers-ai";
242
+ upstreamFormat: "anthropic" | "openai";
287
243
  contextWindow: number;
288
244
  maxOutputTokens: number;
289
245
  modality: {
@@ -0,0 +1,29 @@
1
+ import { K, nodeClass } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { aiModelCapabilities, aiModelModality, aiModelProvider, aiModelUpstreamFormat, } from './ai-model-properties.js';
4
+ import { invokeAIModelAnthropicFormatMethod } from './invoke-ai-model-anthropic-format-method.js';
5
+ import { invokeAIModelOpenAIFormatMethod } from './invoke-ai-model-openai-format-method.js';
6
+ import { invokeAIModelPassthroughMethod } from './invoke-ai-model-passthrough-method.js';
7
+ import { invokeAIModelVercelFormatMethod } from './invoke-ai-model-vercel-format-method.js';
8
+ import { registerAIModelMethod } from './register-ai-model-method.js';
9
+ export const AIModel = nodeClass({
10
+ description: 'One permissioned upstream model exposed through Cloudflare AI Gateway.',
11
+ extends: [K.classes.Named, K.classes.Descriptable, K.classes.Timestamped],
12
+ properties: {
13
+ modelId: z.string().min(1).max(512),
14
+ provider: aiModelProvider,
15
+ upstreamFormat: aiModelUpstreamFormat,
16
+ contextWindow: z.number().int().positive(),
17
+ maxOutputTokens: z.number().int().positive(),
18
+ modality: aiModelModality,
19
+ capabilities: aiModelCapabilities,
20
+ pricing: z.record(z.string(), z.string()),
21
+ },
22
+ methods: {
23
+ register: registerAIModelMethod,
24
+ invoke: invokeAIModelPassthroughMethod,
25
+ invokeOpenaiFormat: invokeAIModelOpenAIFormatMethod,
26
+ invokeAnthropicFormat: invokeAIModelAnthropicFormatMethod,
27
+ invokeVercelFormat: invokeAIModelVercelFormatMethod,
28
+ },
29
+ });
@@ -0,0 +1,62 @@
1
+ import { z } from 'zod';
2
+ export declare const aiModelInput: z.ZodObject<{
3
+ name: z.ZodString;
4
+ description: z.ZodOptional<z.ZodString>;
5
+ modelId: z.ZodString;
6
+ provider: z.ZodEnum<{
7
+ azure: "azure";
8
+ google: "google";
9
+ "workers-ai": "workers-ai";
10
+ }>;
11
+ upstreamFormat: z.ZodEnum<{
12
+ anthropic: "anthropic";
13
+ openai: "openai";
14
+ }>;
15
+ contextWindow: z.ZodNumber;
16
+ maxOutputTokens: z.ZodNumber;
17
+ modality: z.ZodObject<{
18
+ input: z.ZodArray<z.ZodString>;
19
+ output: z.ZodArray<z.ZodString>;
20
+ }, z.core.$strict>;
21
+ capabilities: z.ZodObject<{
22
+ toolUse: z.ZodBoolean;
23
+ vision: z.ZodBoolean;
24
+ reasoning: z.ZodBoolean;
25
+ fileInput: z.ZodBoolean;
26
+ structuredOutput: z.ZodBoolean;
27
+ streaming: z.ZodBoolean;
28
+ caching: z.ZodBoolean;
29
+ }, z.core.$strict>;
30
+ pricing: z.ZodRecord<z.ZodString, z.ZodString>;
31
+ }, z.core.$strict>;
32
+ export declare const aiModelOutput: z.ZodObject<{
33
+ name: z.ZodString;
34
+ modelId: z.ZodString;
35
+ provider: z.ZodEnum<{
36
+ azure: "azure";
37
+ google: "google";
38
+ "workers-ai": "workers-ai";
39
+ }>;
40
+ upstreamFormat: z.ZodEnum<{
41
+ anthropic: "anthropic";
42
+ openai: "openai";
43
+ }>;
44
+ contextWindow: z.ZodNumber;
45
+ maxOutputTokens: z.ZodNumber;
46
+ modality: z.ZodObject<{
47
+ input: z.ZodArray<z.ZodString>;
48
+ output: z.ZodArray<z.ZodString>;
49
+ }, z.core.$strict>;
50
+ capabilities: z.ZodObject<{
51
+ toolUse: z.ZodBoolean;
52
+ vision: z.ZodBoolean;
53
+ reasoning: z.ZodBoolean;
54
+ fileInput: z.ZodBoolean;
55
+ structuredOutput: z.ZodBoolean;
56
+ streaming: z.ZodBoolean;
57
+ caching: z.ZodBoolean;
58
+ }, z.core.$strict>;
59
+ pricing: z.ZodRecord<z.ZodString, z.ZodString>;
60
+ id: z.ZodString;
61
+ description: z.ZodString;
62
+ }, z.core.$strict>;
@@ -0,0 +1,18 @@
1
+ import { z } from 'zod';
2
+ import { aiModelCapabilities, aiModelModality, aiModelProvider, aiModelUpstreamFormat, } from './ai-model-properties.js';
3
+ export const aiModelInput = z.strictObject({
4
+ name: z.string().min(1).max(160),
5
+ description: z.string().max(5_000).optional(),
6
+ modelId: z.string().min(1).max(512),
7
+ provider: aiModelProvider,
8
+ upstreamFormat: aiModelUpstreamFormat,
9
+ contextWindow: z.number().int().positive(),
10
+ maxOutputTokens: z.number().int().positive(),
11
+ modality: aiModelModality,
12
+ capabilities: aiModelCapabilities,
13
+ pricing: z.record(z.string(), z.string()),
14
+ });
15
+ export const aiModelOutput = aiModelInput.extend({
16
+ id: z.string(),
17
+ description: z.string(),
18
+ });
@@ -0,0 +1,23 @@
1
+ import { z } from 'zod';
2
+ export declare const aiModelProvider: z.ZodEnum<{
3
+ azure: "azure";
4
+ google: "google";
5
+ "workers-ai": "workers-ai";
6
+ }>;
7
+ export declare const aiModelUpstreamFormat: z.ZodEnum<{
8
+ anthropic: "anthropic";
9
+ openai: "openai";
10
+ }>;
11
+ export declare const aiModelModality: z.ZodObject<{
12
+ input: z.ZodArray<z.ZodString>;
13
+ output: z.ZodArray<z.ZodString>;
14
+ }, z.core.$strict>;
15
+ export declare const aiModelCapabilities: z.ZodObject<{
16
+ toolUse: z.ZodBoolean;
17
+ vision: z.ZodBoolean;
18
+ reasoning: z.ZodBoolean;
19
+ fileInput: z.ZodBoolean;
20
+ structuredOutput: z.ZodBoolean;
21
+ streaming: z.ZodBoolean;
22
+ caching: z.ZodBoolean;
23
+ }, z.core.$strict>;
@@ -0,0 +1,16 @@
1
+ import { z } from 'zod';
2
+ export const aiModelProvider = z.enum(['workers-ai', 'google', 'azure']);
3
+ export const aiModelUpstreamFormat = z.enum(['openai', 'anthropic']);
4
+ export const aiModelModality = z.strictObject({
5
+ input: z.array(z.string()),
6
+ output: z.array(z.string()),
7
+ });
8
+ export const aiModelCapabilities = z.strictObject({
9
+ toolUse: z.boolean(),
10
+ vision: z.boolean(),
11
+ reasoning: z.boolean(),
12
+ fileInput: z.boolean(),
13
+ structuredOutput: z.boolean(),
14
+ streaming: z.boolean(),
15
+ caching: z.boolean(),
16
+ });
@@ -0,0 +1,2 @@
1
+ import { z } from 'zod';
2
+ export const aiModelRequestBody = z.string().max(2 * 1024 * 1024);
@@ -1 +1,3 @@
1
- export { AIModel } from './class.js';
1
+ export { AIModel } from './ai-model-class.js';
2
+ export { aiModelInput, aiModelOutput } from './ai-model-input.js';
3
+ export { aiModelCapabilities, aiModelModality, aiModelProvider, aiModelUpstreamFormat, } from './ai-model-properties.js';
@@ -1 +1,3 @@
1
- export { AIModel } from './class.js';
1
+ export { AIModel } from './ai-model-class.js';
2
+ export { aiModelInput, aiModelOutput } from './ai-model-input.js';
3
+ export { aiModelCapabilities, aiModelModality, aiModelProvider, aiModelUpstreamFormat, } from './ai-model-properties.js';
@@ -0,0 +1,8 @@
1
+ import { method, output } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { aiModelRequestBody } from './ai-model-request-body.js';
4
+ export const invokeAIModelAnthropicFormatMethod = method({
5
+ auth: 'authorized',
6
+ input: z.strictObject({ body: aiModelRequestBody }),
7
+ output: output.binary(),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { method, output } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { aiModelRequestBody } from './ai-model-request-body.js';
4
+ export const invokeAIModelOpenAIFormatMethod = method({
5
+ auth: 'authorized',
6
+ input: z.strictObject({ body: aiModelRequestBody }),
7
+ output: output.binary(),
8
+ });
@@ -0,0 +1,13 @@
1
+ import { method, output } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { aiModelRequestBody } from './ai-model-request-body.js';
4
+ export const invokeAIModelPassthroughMethod = method({
5
+ auth: 'authorized',
6
+ input: z.strictObject({
7
+ path: z.string().min(1).max(1_024),
8
+ body: aiModelRequestBody,
9
+ headers: z.record(z.string(), z.string()).default({}),
10
+ contentType: z.string().min(1).max(512).optional(),
11
+ }),
12
+ output: output.binary(),
13
+ });
@@ -0,0 +1,8 @@
1
+ import { method, output } from '@astrale-os/sdk/schema';
2
+ import { z } from 'zod';
3
+ import { aiModelRequestBody } from './ai-model-request-body.js';
4
+ export const invokeAIModelVercelFormatMethod = method({
5
+ auth: 'authorized',
6
+ input: z.strictObject({ body: aiModelRequestBody }),
7
+ output: output.binary(),
8
+ });
@@ -0,0 +1,8 @@
1
+ import { method } from '@astrale-os/sdk/schema';
2
+ import { aiModelInput, aiModelOutput } from './ai-model-input.js';
3
+ export const registerAIModelMethod = method({
4
+ auth: 'authorized',
5
+ static: true,
6
+ input: aiModelInput,
7
+ output: aiModelOutput,
8
+ });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@astrale-domains/ai-gateway",
3
- "version": "0.2.0",
3
+ "version": "0.2.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/astrale-os/domains.git",
@@ -24,25 +24,38 @@
24
24
  "./package.json": "./package.json"
25
25
  },
26
26
  "publishConfig": {
27
- "access": "public"
27
+ "access": "public",
28
+ "registry": "https://registry.npmjs.org/"
28
29
  },
29
30
  "dependencies": {
30
- "@astrale-os/sdk": "0.5.0-beta.45",
31
+ "@astrale-os/sdk": "0.5.0-beta.51",
31
32
  "zod": "^4.4.3"
32
33
  },
33
34
  "devDependencies": {
34
- "@astrale-os/adapter-astrale": "0.5.0-beta.41",
35
- "@astrale-os/adapter-cloudflare": "0.5.0-beta.48",
35
+ "@ai-sdk/anthropic": "^4.0.39",
36
+ "@ai-sdk/azure": "^4.0.44",
37
+ "@ai-sdk/openai": "^4.0.43",
38
+ "@anthropic-ai/sdk": "0.117.1",
39
+ "@astrale-os/adapter-astrale": "0.5.0-beta.47",
40
+ "@astrale-os/adapter-cloudflare": "0.5.0-beta.54",
36
41
  "@astrale-os/ox": ">=0.1.3 <1.0.0",
37
- "@astrale-os/shell": "0.4.2-beta.3",
38
- "@astrale-os/shell-react": "0.3.2-beta.2",
42
+ "@astrale-os/shell": "0.4.2-beta.6",
43
+ "@astrale-os/shell-react": "0.3.2-beta.3",
44
+ "@astrale-os/ui": "0.3.0-beta.7",
45
+ "@google/generative-ai": "0.24.1",
39
46
  "@tailwindcss/vite": "^4.0.6",
40
47
  "@tanstack/react-router": "1.170.17",
41
48
  "@tanstack/router-plugin": "1.168.19",
49
+ "@testing-library/react": "16.3.2",
50
+ "@testing-library/user-event": "14.6.1",
42
51
  "@types/node": "^22.0.0",
43
52
  "@types/react": "^19.2.0",
44
53
  "@types/react-dom": "^19.2.0",
45
54
  "@vitejs/plugin-react": "^6.0.5",
55
+ "ai": "^7.0.68",
56
+ "jsdom": "30.0.1",
57
+ "llm-bridge": "^2.0.1",
58
+ "openai": "7.5.0",
46
59
  "oxlint": ">=1.78.0 <2.0.0",
47
60
  "react": "^19.2.0",
48
61
  "react-dom": "^19.2.0",
@@ -1,70 +0,0 @@
1
- import { K, method, nodeClass, output } from '@astrale-os/sdk/schema';
2
- import { z } from 'zod';
3
- const modality = z.strictObject({ input: z.array(z.string()), output: z.array(z.string()) });
4
- const capabilities = z.strictObject({
5
- toolUse: z.boolean(),
6
- vision: z.boolean(),
7
- reasoning: z.boolean(),
8
- fileInput: z.boolean(),
9
- structuredOutput: z.boolean(),
10
- streaming: z.boolean(),
11
- caching: z.boolean(),
12
- });
13
- const modelInput = z.strictObject({
14
- name: z.string().min(1).max(160),
15
- description: z.string().max(5_000).optional(),
16
- modelId: z.string().min(1).max(512),
17
- provider: z.enum(['workers-ai', 'google', 'azure']),
18
- contextWindow: z.number().int().positive(),
19
- maxOutputTokens: z.number().int().positive(),
20
- modality,
21
- capabilities,
22
- pricing: z.record(z.string(), z.string()),
23
- });
24
- const modelOutput = modelInput.extend({ id: z.string(), description: z.string() });
25
- export const AIModel = nodeClass({
26
- description: 'One permissioned upstream model exposed through Cloudflare AI Gateway.',
27
- extends: [K.classes.Named, K.classes.Descriptable, K.classes.Timestamped],
28
- properties: {
29
- modelId: z.string().min(1).max(512),
30
- provider: z.enum(['workers-ai', 'google', 'azure']),
31
- contextWindow: z.number().int().positive(),
32
- maxOutputTokens: z.number().int().positive(),
33
- modality,
34
- capabilities,
35
- pricing: z.record(z.string(), z.string()),
36
- },
37
- methods: {
38
- register: method({ auth: 'authorized', static: true, input: modelInput, output: modelOutput }),
39
- list: method({
40
- auth: 'authenticated',
41
- static: true,
42
- input: z.strictObject({}),
43
- output: z.array(modelOutput),
44
- }),
45
- invoke: method({
46
- auth: 'authorized',
47
- input: z.strictObject({
48
- path: z.string().min(1).max(1_024),
49
- body: z.string().max(10 * 1024 * 1024),
50
- headers: z.record(z.string(), z.string()).default({}),
51
- }),
52
- output: output.binary(),
53
- }),
54
- invokeOpenaiFormat: method({
55
- auth: 'authorized',
56
- input: z.strictObject({ body: z.string().max(10 * 1024 * 1024) }),
57
- output: output.binary(),
58
- }),
59
- invokeAnthropicFormat: method({
60
- auth: 'authorized',
61
- input: z.strictObject({ body: z.string().max(10 * 1024 * 1024) }),
62
- output: output.binary(),
63
- }),
64
- invokeVercelFormat: method({
65
- auth: 'authorized',
66
- input: z.strictObject({ body: z.string().max(10 * 1024 * 1024) }),
67
- output: output.binary(),
68
- }),
69
- },
70
- });