@game-infra/ai-schemas 0.3.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/LICENSE +21 -0
- package/README.md +149 -0
- package/dist/catalog.d.ts +137 -0
- package/dist/catalog.d.ts.map +1 -0
- package/dist/catalog.js +209 -0
- package/dist/catalog.js.map +1 -0
- package/dist/contracts.d.ts +1073 -0
- package/dist/contracts.d.ts.map +1 -0
- package/dist/contracts.js +243 -0
- package/dist/contracts.js.map +1 -0
- package/dist/featuredModels.d.ts +95 -0
- package/dist/featuredModels.d.ts.map +1 -0
- package/dist/featuredModels.js +189 -0
- package/dist/featuredModels.js.map +1 -0
- package/dist/index.d.ts +35 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +39 -0
- package/dist/index.js.map +1 -0
- package/dist/inference.d.ts +323 -0
- package/dist/inference.d.ts.map +1 -0
- package/dist/inference.js +162 -0
- package/dist/inference.js.map +1 -0
- package/dist/preference.d.ts +49 -0
- package/dist/preference.d.ts.map +1 -0
- package/dist/preference.js +74 -0
- package/dist/preference.js.map +1 -0
- package/dist/preset.d.ts +422 -0
- package/dist/preset.d.ts.map +1 -0
- package/dist/preset.js +212 -0
- package/dist/preset.js.map +1 -0
- package/dist/provider.d.ts +487 -0
- package/dist/provider.d.ts.map +1 -0
- package/dist/provider.js +224 -0
- package/dist/provider.js.map +1 -0
- package/dist/schemaRegistry.d.ts +71 -0
- package/dist/schemaRegistry.d.ts.map +1 -0
- package/dist/schemaRegistry.js +35 -0
- package/dist/schemaRegistry.js.map +1 -0
- package/dist/service.d.ts +143 -0
- package/dist/service.d.ts.map +1 -0
- package/dist/service.js +103 -0
- package/dist/service.js.map +1 -0
- package/dist/subscription.d.ts +275 -0
- package/dist/subscription.d.ts.map +1 -0
- package/dist/subscription.js +198 -0
- package/dist/subscription.js.map +1 -0
- package/package.json +50 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.d.ts","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,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIR,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAC5B,CAAC;AAEH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;QAIV,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAC5B,CAAC;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKnC,CAAC"}
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
import { ContractNoBody, defineApiContract, withObjectKeys } from "@toad-contracts/valibot";
|
|
2
|
+
import { object, string } from "valibot";
|
|
3
|
+
import { CatalogResponseSchema, DiscoveredModelsResponseSchema } from "./catalog.js";
|
|
4
|
+
import { GenerateObjectRequestSchema, GenerateObjectResponseSchema, GenerateTextRequestSchema, GenerateTextResponseSchema, } from "./inference.js";
|
|
5
|
+
import { CreatePresetRequestSchema, PresetListResponseSchema, PresetResponseSchema, RoutePlanResponseSchema, UpdatePresetRequestSchema, } from "./preset.js";
|
|
6
|
+
import { CreateProviderRequestSchema, ProviderListResponseSchema, ProviderProbeResponseSchema, ProviderResponseSchema, SetProviderCredentialRequestSchema, UpdateProviderRequestSchema, } from "./provider.js";
|
|
7
|
+
import { SchemaListResponseSchema, SchemaResponseSchema } from "./schemaRegistry.js";
|
|
8
|
+
import { AiReadinessResponseSchema, CallListQuerySchema, CallListResponseSchema, DeleteResponseSchema, } from "./service.js";
|
|
9
|
+
import { CreateSubscriptionRequestSchema, SubscriptionListResponseSchema, SubscriptionResponseSchema, UnlockSubscriptionRequestSchema, UnlockSubscriptionResponseSchema, UpdateSubscriptionRequestSchema, } from "./subscription.js";
|
|
10
|
+
/**
|
|
11
|
+
* Typed endpoint contracts for the ai-service API.
|
|
12
|
+
*
|
|
13
|
+
* Each contract carries its method, path, params and request/response schemas
|
|
14
|
+
* in one object: `pathResolver` builds the URL and `mapApiContractToPath`
|
|
15
|
+
* derives the `:param` route pattern, so the service and the console never
|
|
16
|
+
* restate a path. Wire them into a Hono app with `@toad-contracts/hono` and
|
|
17
|
+
* into a browser client with `@toad-contracts/frontend-http-client`.
|
|
18
|
+
*
|
|
19
|
+
* The surface splits in two, and the split is deliberate. `/generate/*` is what
|
|
20
|
+
* game services call at runtime and is the only part that has to be fast and
|
|
21
|
+
* boring. Everything else configures it, is used by people rather than by
|
|
22
|
+
* programs, and is guarded by a separate claim, because a token that may ask a
|
|
23
|
+
* model a question should not thereby be able to read out which keys exist.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```ts
|
|
27
|
+
* import { aiGenerateTextContract, aiPresetGetContract } from '@game-infra/ai-schemas'
|
|
28
|
+
*
|
|
29
|
+
* aiGenerateTextContract.pathResolver() // '/generate/text'
|
|
30
|
+
* aiPresetGetContract.pathResolver({ presetId: 'pst_1' }) // '/presets/pst_1'
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
const providerParams = withObjectKeys(object({ providerId: string() }));
|
|
34
|
+
const subscriptionParams = withObjectKeys(object({ subscriptionId: string() }));
|
|
35
|
+
const presetParams = withObjectKeys(object({ presetId: string() }));
|
|
36
|
+
const presetSlugParams = withObjectKeys(object({ slug: string() }));
|
|
37
|
+
const schemaParams = withObjectKeys(object({ schemaId: string() }));
|
|
38
|
+
// ============================================================================
|
|
39
|
+
// Service
|
|
40
|
+
// ============================================================================
|
|
41
|
+
export const aiReadinessContract = defineApiContract({
|
|
42
|
+
method: "get",
|
|
43
|
+
pathResolver: () => "/readiness",
|
|
44
|
+
responsesByStatusCode: { 200: AiReadinessResponseSchema },
|
|
45
|
+
});
|
|
46
|
+
/** Everything the console needs to render its provider pickers. */
|
|
47
|
+
export const aiCatalogContract = defineApiContract({
|
|
48
|
+
method: "get",
|
|
49
|
+
pathResolver: () => "/catalog",
|
|
50
|
+
responsesByStatusCode: { 200: CatalogResponseSchema },
|
|
51
|
+
});
|
|
52
|
+
/** Recent calls and their per-provider fold. */
|
|
53
|
+
export const aiCallListContract = defineApiContract({
|
|
54
|
+
method: "get",
|
|
55
|
+
pathResolver: () => "/calls",
|
|
56
|
+
requestQuerySchema: CallListQuerySchema,
|
|
57
|
+
responsesByStatusCode: { 200: CallListResponseSchema },
|
|
58
|
+
});
|
|
59
|
+
// ============================================================================
|
|
60
|
+
// Providers
|
|
61
|
+
// ============================================================================
|
|
62
|
+
export const aiProviderListContract = defineApiContract({
|
|
63
|
+
method: "get",
|
|
64
|
+
pathResolver: () => "/providers",
|
|
65
|
+
responsesByStatusCode: { 200: ProviderListResponseSchema },
|
|
66
|
+
});
|
|
67
|
+
export const aiProviderCreateContract = defineApiContract({
|
|
68
|
+
method: "post",
|
|
69
|
+
pathResolver: () => "/providers",
|
|
70
|
+
requestBodySchema: CreateProviderRequestSchema,
|
|
71
|
+
responsesByStatusCode: { 201: ProviderResponseSchema },
|
|
72
|
+
});
|
|
73
|
+
export const aiProviderGetContract = defineApiContract({
|
|
74
|
+
method: "get",
|
|
75
|
+
requestPathParamsSchema: providerParams,
|
|
76
|
+
pathResolver: ({ providerId }) => `/providers/${providerId}`,
|
|
77
|
+
responsesByStatusCode: { 200: ProviderResponseSchema },
|
|
78
|
+
});
|
|
79
|
+
export const aiProviderUpdateContract = defineApiContract({
|
|
80
|
+
method: "patch",
|
|
81
|
+
requestPathParamsSchema: providerParams,
|
|
82
|
+
pathResolver: ({ providerId }) => `/providers/${providerId}`,
|
|
83
|
+
requestBodySchema: UpdateProviderRequestSchema,
|
|
84
|
+
responsesByStatusCode: { 200: ProviderResponseSchema },
|
|
85
|
+
});
|
|
86
|
+
export const aiProviderDeleteContract = defineApiContract({
|
|
87
|
+
method: "delete",
|
|
88
|
+
requestPathParamsSchema: providerParams,
|
|
89
|
+
pathResolver: ({ providerId }) => `/providers/${providerId}`,
|
|
90
|
+
responsesByStatusCode: { 200: DeleteResponseSchema },
|
|
91
|
+
});
|
|
92
|
+
/** Seal a key for a provider, replacing whatever was stored. */
|
|
93
|
+
export const aiProviderCredentialSetContract = defineApiContract({
|
|
94
|
+
method: "put",
|
|
95
|
+
requestPathParamsSchema: providerParams,
|
|
96
|
+
pathResolver: ({ providerId }) => `/providers/${providerId}/credential`,
|
|
97
|
+
requestBodySchema: SetProviderCredentialRequestSchema,
|
|
98
|
+
responsesByStatusCode: { 200: ProviderResponseSchema },
|
|
99
|
+
});
|
|
100
|
+
export const aiProviderCredentialDeleteContract = defineApiContract({
|
|
101
|
+
method: "delete",
|
|
102
|
+
requestPathParamsSchema: providerParams,
|
|
103
|
+
pathResolver: ({ providerId }) => `/providers/${providerId}/credential`,
|
|
104
|
+
responsesByStatusCode: { 200: ProviderResponseSchema },
|
|
105
|
+
});
|
|
106
|
+
/** Call the provider for real and report what came back. */
|
|
107
|
+
export const aiProviderProbeContract = defineApiContract({
|
|
108
|
+
method: "post",
|
|
109
|
+
requestPathParamsSchema: providerParams,
|
|
110
|
+
pathResolver: ({ providerId }) => `/providers/${providerId}/probe`,
|
|
111
|
+
requestBodySchema: ContractNoBody,
|
|
112
|
+
responsesByStatusCode: { 200: ProviderProbeResponseSchema },
|
|
113
|
+
});
|
|
114
|
+
/** Ask the provider which models it serves. */
|
|
115
|
+
export const aiProviderModelsContract = defineApiContract({
|
|
116
|
+
method: "get",
|
|
117
|
+
requestPathParamsSchema: providerParams,
|
|
118
|
+
pathResolver: ({ providerId }) => `/providers/${providerId}/models`,
|
|
119
|
+
responsesByStatusCode: { 200: DiscoveredModelsResponseSchema },
|
|
120
|
+
});
|
|
121
|
+
// ============================================================================
|
|
122
|
+
// Subscriptions
|
|
123
|
+
// ============================================================================
|
|
124
|
+
export const aiSubscriptionListContract = defineApiContract({
|
|
125
|
+
method: "get",
|
|
126
|
+
pathResolver: () => "/subscriptions",
|
|
127
|
+
responsesByStatusCode: { 200: SubscriptionListResponseSchema },
|
|
128
|
+
});
|
|
129
|
+
export const aiSubscriptionCreateContract = defineApiContract({
|
|
130
|
+
method: "post",
|
|
131
|
+
pathResolver: () => "/subscriptions",
|
|
132
|
+
requestBodySchema: CreateSubscriptionRequestSchema,
|
|
133
|
+
responsesByStatusCode: { 201: SubscriptionResponseSchema },
|
|
134
|
+
});
|
|
135
|
+
export const aiSubscriptionUpdateContract = defineApiContract({
|
|
136
|
+
method: "patch",
|
|
137
|
+
requestPathParamsSchema: subscriptionParams,
|
|
138
|
+
pathResolver: ({ subscriptionId }) => `/subscriptions/${subscriptionId}`,
|
|
139
|
+
requestBodySchema: UpdateSubscriptionRequestSchema,
|
|
140
|
+
responsesByStatusCode: { 200: SubscriptionResponseSchema },
|
|
141
|
+
});
|
|
142
|
+
export const aiSubscriptionDeleteContract = defineApiContract({
|
|
143
|
+
method: "delete",
|
|
144
|
+
requestPathParamsSchema: subscriptionParams,
|
|
145
|
+
pathResolver: ({ subscriptionId }) => `/subscriptions/${subscriptionId}`,
|
|
146
|
+
responsesByStatusCode: { 200: DeleteResponseSchema },
|
|
147
|
+
});
|
|
148
|
+
/** Check that a password opens the seal, without spending anything on a model. */
|
|
149
|
+
export const aiSubscriptionUnlockContract = defineApiContract({
|
|
150
|
+
method: "post",
|
|
151
|
+
requestPathParamsSchema: subscriptionParams,
|
|
152
|
+
pathResolver: ({ subscriptionId }) => `/subscriptions/${subscriptionId}/unlock`,
|
|
153
|
+
requestBodySchema: UnlockSubscriptionRequestSchema,
|
|
154
|
+
responsesByStatusCode: { 200: UnlockSubscriptionResponseSchema },
|
|
155
|
+
});
|
|
156
|
+
// ============================================================================
|
|
157
|
+
// Presets
|
|
158
|
+
// ============================================================================
|
|
159
|
+
export const aiPresetListContract = defineApiContract({
|
|
160
|
+
method: "get",
|
|
161
|
+
pathResolver: () => "/presets",
|
|
162
|
+
responsesByStatusCode: { 200: PresetListResponseSchema },
|
|
163
|
+
});
|
|
164
|
+
export const aiPresetCreateContract = defineApiContract({
|
|
165
|
+
method: "post",
|
|
166
|
+
pathResolver: () => "/presets",
|
|
167
|
+
requestBodySchema: CreatePresetRequestSchema,
|
|
168
|
+
responsesByStatusCode: { 201: PresetResponseSchema },
|
|
169
|
+
});
|
|
170
|
+
export const aiPresetGetContract = defineApiContract({
|
|
171
|
+
method: "get",
|
|
172
|
+
requestPathParamsSchema: presetParams,
|
|
173
|
+
pathResolver: ({ presetId }) => `/presets/${presetId}`,
|
|
174
|
+
responsesByStatusCode: { 200: PresetResponseSchema },
|
|
175
|
+
});
|
|
176
|
+
export const aiPresetUpdateContract = defineApiContract({
|
|
177
|
+
method: "patch",
|
|
178
|
+
requestPathParamsSchema: presetParams,
|
|
179
|
+
pathResolver: ({ presetId }) => `/presets/${presetId}`,
|
|
180
|
+
requestBodySchema: UpdatePresetRequestSchema,
|
|
181
|
+
responsesByStatusCode: { 200: PresetResponseSchema },
|
|
182
|
+
});
|
|
183
|
+
export const aiPresetDeleteContract = defineApiContract({
|
|
184
|
+
method: "delete",
|
|
185
|
+
requestPathParamsSchema: presetParams,
|
|
186
|
+
pathResolver: ({ presetId }) => `/presets/${presetId}`,
|
|
187
|
+
responsesByStatusCode: { 200: DeleteResponseSchema },
|
|
188
|
+
});
|
|
189
|
+
/**
|
|
190
|
+
* The routes a preset would take against the current configuration, without
|
|
191
|
+
* calling anything. Addressed by slug rather than by id, because that is what a
|
|
192
|
+
* caller writes into a request and therefore what somebody debugging one has in
|
|
193
|
+
* front of them.
|
|
194
|
+
*/
|
|
195
|
+
export const aiPresetRoutePlanContract = defineApiContract({
|
|
196
|
+
method: "get",
|
|
197
|
+
requestPathParamsSchema: presetSlugParams,
|
|
198
|
+
pathResolver: ({ slug }) => `/presets/${slug}/route`,
|
|
199
|
+
responsesByStatusCode: { 200: RoutePlanResponseSchema },
|
|
200
|
+
});
|
|
201
|
+
// ============================================================================
|
|
202
|
+
// Request schemas
|
|
203
|
+
// ============================================================================
|
|
204
|
+
export const aiSchemaListContract = defineApiContract({
|
|
205
|
+
method: "get",
|
|
206
|
+
pathResolver: () => "/schemas",
|
|
207
|
+
responsesByStatusCode: { 200: SchemaListResponseSchema },
|
|
208
|
+
});
|
|
209
|
+
export const aiSchemaGetContract = defineApiContract({
|
|
210
|
+
method: "get",
|
|
211
|
+
requestPathParamsSchema: schemaParams,
|
|
212
|
+
pathResolver: ({ schemaId }) => `/schemas/${schemaId}`,
|
|
213
|
+
responsesByStatusCode: { 200: SchemaResponseSchema },
|
|
214
|
+
});
|
|
215
|
+
// ============================================================================
|
|
216
|
+
// Inference
|
|
217
|
+
// ============================================================================
|
|
218
|
+
export const aiGenerateTextContract = defineApiContract({
|
|
219
|
+
method: "post",
|
|
220
|
+
pathResolver: () => "/generate/text",
|
|
221
|
+
requestBodySchema: GenerateTextRequestSchema,
|
|
222
|
+
responsesByStatusCode: { 200: GenerateTextResponseSchema },
|
|
223
|
+
});
|
|
224
|
+
export const aiGenerateObjectContract = defineApiContract({
|
|
225
|
+
method: "post",
|
|
226
|
+
pathResolver: () => "/generate/object",
|
|
227
|
+
requestBodySchema: GenerateObjectRequestSchema,
|
|
228
|
+
responsesByStatusCode: { 200: GenerateObjectResponseSchema },
|
|
229
|
+
});
|
|
230
|
+
/**
|
|
231
|
+
* The streaming twin of {@link aiGenerateTextContract}.
|
|
232
|
+
*
|
|
233
|
+
* It declares no success response because it does not answer with one: the body
|
|
234
|
+
* is an SSE stream whose events are described by `STREAM_EVENTS`, and a schema
|
|
235
|
+
* claiming a JSON body would be a lie a generated client would then act on.
|
|
236
|
+
*/
|
|
237
|
+
export const aiGenerateStreamContract = defineApiContract({
|
|
238
|
+
method: "post",
|
|
239
|
+
pathResolver: () => "/generate/stream",
|
|
240
|
+
requestBodySchema: GenerateTextRequestSchema,
|
|
241
|
+
responsesByStatusCode: {},
|
|
242
|
+
});
|
|
243
|
+
//# sourceMappingURL=contracts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contracts.js","sourceRoot":"","sources":["../src/contracts.ts"],"names":[],"mappings":"AAAA,OA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C,UAAU;IAC9B,qBAAqB,EAAE,EAAE,GAAG,EAAE,wBAAwB,EAAE;CACzD,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,mBAAmB,GAAG,iBAAiB,CAAC;IACnD,MAAM,EAAE,KAAK;IACb,uBAAuB,EAAE,YAAY;IACrC,YAAY,EAAE,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,CAAC,YAAY,QAAQ,EAAE;IACtD,qBAAqB,EAAE,EAAE,GAAG,EAAE,oBAAoB,EAAE;CACrD,CAAC,CAAC;AAEH,+EAA+E;AAC/E,YAAY;AACZ,+EAA+E;AAE/E,MAAM,CAAC,MAAM,sBAAsB,GAAG,iBAAiB,CAAC;IACtD,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,GAAG,EAAE,CAAC,gBAAgB;IACpC,iBAAiB,EAAE,yBAAyB;IAC5C,qBAAqB,EAAE,EAAE,GAAG,EAAE,0BAA0B,EAAE;CAC3D,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACxD,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,GAAG,EAAE,CAAC,kBAAkB;IACtC,iBAAiB,EAAE,2BAA2B;IAC9C,qBAAqB,EAAE,EAAE,GAAG,EAAE,4BAA4B,EAAE;CAC7D,CAAC,CAAC;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,iBAAiB,CAAC;IACxD,MAAM,EAAE,MAAM;IACd,YAAY,EAAE,GAAG,EAAE,CAAC,kBAAkB;IACtC,iBAAiB,EAAE,yBAAyB;IAC5C,qBAAqB,EAAE,EAAE;CAC1B,CAAC,CAAC"}
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import { type InferOutput } from "valibot";
|
|
2
|
+
import type { ProviderModelRoute } from "./provider.js";
|
|
3
|
+
/**
|
|
4
|
+
* The models this deployment surfaces by name, and the id a gateway serves each
|
|
5
|
+
* under.
|
|
6
|
+
*
|
|
7
|
+
* A provider blueprint deliberately carries no model list, because an inventory
|
|
8
|
+
* of what a gateway serves is wrong within weeks and wrong in the direction
|
|
9
|
+
* that hurts — it advertises models a deployment cannot reach. This list is a
|
|
10
|
+
* different claim and earns its place for a different reason: it does not say
|
|
11
|
+
* what OpenRouter has, it says which models are worth reaching for a particular
|
|
12
|
+
* kind of work. That answer changes when the field moves, not when a gateway
|
|
13
|
+
* rotates its inventory, and nothing else can produce it — discovery returns
|
|
14
|
+
* three hundred ids in alphabetical order and none of them says "this is the
|
|
15
|
+
* one to narrate with".
|
|
16
|
+
*
|
|
17
|
+
* It is advisory throughout. Routing still comes from the provider records an
|
|
18
|
+
* operator configured: a featured model is reachable once its route is on a
|
|
19
|
+
* provider, and until then it is a recommendation with an id attached. What
|
|
20
|
+
* this buys is that the id is entered once, here, rather than retyped in every
|
|
21
|
+
* repo that wanted the same model.
|
|
22
|
+
*/
|
|
23
|
+
/**
|
|
24
|
+
* Why a model is surfaced.
|
|
25
|
+
*
|
|
26
|
+
* A purpose rather than a category, because the list exists to answer "what
|
|
27
|
+
* should write this" rather than to classify models. One value today; the shape
|
|
28
|
+
* is what keeps the next answer from being a second parallel table.
|
|
29
|
+
*/
|
|
30
|
+
export declare const FEATURED_MODEL_PURPOSES: readonly ["creative-writing"];
|
|
31
|
+
export declare const FeaturedModelPurposeSchema: import("valibot").PicklistSchema<readonly ["creative-writing"], undefined>;
|
|
32
|
+
export type FeaturedModelPurpose = InferOutput<typeof FeaturedModelPurposeSchema>;
|
|
33
|
+
/** One surfaced model: what it is for, and where it is reached. */
|
|
34
|
+
export interface FeaturedModel {
|
|
35
|
+
/** Canonical id, the short name a preset or a request asks for. */
|
|
36
|
+
model: string;
|
|
37
|
+
/** Display name. */
|
|
38
|
+
label: string;
|
|
39
|
+
purpose: FeaturedModelPurpose;
|
|
40
|
+
/** The provider that serves it. Every entry here is an OpenRouter route. */
|
|
41
|
+
providerId: string;
|
|
42
|
+
/** The id that provider serves it under. */
|
|
43
|
+
providerModelId: string;
|
|
44
|
+
/**
|
|
45
|
+
* Whether this is the one to reach for in its family. The rest are earlier
|
|
46
|
+
* generations and smaller siblings, kept because a deployment that tuned a
|
|
47
|
+
* prompt against one should not lose it to a refresh.
|
|
48
|
+
*/
|
|
49
|
+
flagship: boolean;
|
|
50
|
+
/** One line on what it is good at, shown beside its name in a picker. */
|
|
51
|
+
note: string;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Models for writing prose — narration, dialogue, in-world text.
|
|
55
|
+
*
|
|
56
|
+
* All four families are reached through OpenRouter rather than their vendors,
|
|
57
|
+
* and that is the point of listing them: none of them is worth a direct account
|
|
58
|
+
* on its own, and one key already reaches all of them. The ids are pinned
|
|
59
|
+
* because vendors publish a new dated id per refresh, so "the latest Euryale"
|
|
60
|
+
* is a line changed here instead of a search across every repo that named it.
|
|
61
|
+
*
|
|
62
|
+
* Check a replacement against `GET https://openrouter.ai/api/v1/models` before
|
|
63
|
+
* pinning it: a superseded id is eventually withdrawn from the gateway, and the
|
|
64
|
+
* failure it produces is a route that simply stops answering.
|
|
65
|
+
*/
|
|
66
|
+
export declare const FEATURED_MODELS: readonly FeaturedModel[];
|
|
67
|
+
/** A surfaced model, on the wire. */
|
|
68
|
+
export declare const FeaturedModelSchema: import("valibot").ObjectSchema<{
|
|
69
|
+
readonly model: import("valibot").StringSchema<undefined>;
|
|
70
|
+
readonly label: import("valibot").StringSchema<undefined>;
|
|
71
|
+
readonly purpose: import("valibot").PicklistSchema<readonly ["creative-writing"], undefined>;
|
|
72
|
+
readonly providerId: import("valibot").StringSchema<undefined>;
|
|
73
|
+
readonly providerModelId: import("valibot").StringSchema<undefined>;
|
|
74
|
+
readonly flagship: import("valibot").BooleanSchema<undefined>;
|
|
75
|
+
readonly note: import("valibot").StringSchema<undefined>;
|
|
76
|
+
}, undefined>;
|
|
77
|
+
/** Every surfaced model for one kind of work, in the order it is offered. */
|
|
78
|
+
export declare function featuredModelsFor(purpose: FeaturedModelPurpose): readonly FeaturedModel[];
|
|
79
|
+
/**
|
|
80
|
+
* The surfaced models one provider serves, as routes ready to save on it.
|
|
81
|
+
*
|
|
82
|
+
* This is the whole mechanism by which a surfaced model becomes a routable one:
|
|
83
|
+
* a console offers these rows, an operator saves them onto the provider, and
|
|
84
|
+
* from then on a preset naming `euryale` plans exactly as one naming any other
|
|
85
|
+
* configured model. Nothing here reaches routing on its own.
|
|
86
|
+
*
|
|
87
|
+
* @example
|
|
88
|
+
* ```ts
|
|
89
|
+
* import { featuredModelRoutes } from '@game-infra/ai-schemas'
|
|
90
|
+
*
|
|
91
|
+
* await updateProvider('openrouter', { models: featuredModelRoutes('openrouter') })
|
|
92
|
+
* ```
|
|
93
|
+
*/
|
|
94
|
+
export declare function featuredModelRoutes(providerId: string): ProviderModelRoute[];
|
|
95
|
+
//# sourceMappingURL=featuredModels.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featuredModels.d.ts","sourceRoot":"","sources":["../src/featuredModels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,WAAW,EAAqC,MAAM,SAAS,CAAC;AAC9E,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAExD;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;GAMG;AACH,eAAO,MAAM,uBAAuB,YAAI,kBAAkB,CAAU,CAAC;AACrE,eAAO,MAAM,0BAA0B,4EAAoC,CAAC;AAC5E,MAAM,MAAM,oBAAoB,GAAG,WAAW,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAElF,mEAAmE;AACnE,MAAM,WAAW,aAAa;IAC5B,mEAAmE;IACnE,KAAK,EAAE,MAAM,CAAC;IACd,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,oBAAoB,CAAC;IAC9B,4EAA4E;IAC5E,UAAU,EAAE,MAAM,CAAC;IACnB,4CAA4C;IAC5C,eAAe,EAAE,MAAM,CAAC;IACxB;;;;OAIG;IACH,QAAQ,EAAE,OAAO,CAAC;IAClB,yEAAyE;IACzE,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,aAAa,EA6GnD,CAAC;AAEF,qCAAqC;AACrC,eAAO,MAAM,mBAAmB;;;;;;;;aAQ9B,CAAC;AAEH,6EAA6E;AAC7E,wBAAgB,iBAAiB,CAAC,OAAO,EAAE,oBAAoB,GAAG,SAAS,aAAa,EAAE,CAEzF;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,mBAAmB,CAAC,UAAU,EAAE,MAAM,GAAG,kBAAkB,EAAE,CAK5E"}
|
|
@@ -0,0 +1,189 @@
|
|
|
1
|
+
import { boolean, object, picklist, string } from "valibot";
|
|
2
|
+
/**
|
|
3
|
+
* The models this deployment surfaces by name, and the id a gateway serves each
|
|
4
|
+
* under.
|
|
5
|
+
*
|
|
6
|
+
* A provider blueprint deliberately carries no model list, because an inventory
|
|
7
|
+
* of what a gateway serves is wrong within weeks and wrong in the direction
|
|
8
|
+
* that hurts — it advertises models a deployment cannot reach. This list is a
|
|
9
|
+
* different claim and earns its place for a different reason: it does not say
|
|
10
|
+
* what OpenRouter has, it says which models are worth reaching for a particular
|
|
11
|
+
* kind of work. That answer changes when the field moves, not when a gateway
|
|
12
|
+
* rotates its inventory, and nothing else can produce it — discovery returns
|
|
13
|
+
* three hundred ids in alphabetical order and none of them says "this is the
|
|
14
|
+
* one to narrate with".
|
|
15
|
+
*
|
|
16
|
+
* It is advisory throughout. Routing still comes from the provider records an
|
|
17
|
+
* operator configured: a featured model is reachable once its route is on a
|
|
18
|
+
* provider, and until then it is a recommendation with an id attached. What
|
|
19
|
+
* this buys is that the id is entered once, here, rather than retyped in every
|
|
20
|
+
* repo that wanted the same model.
|
|
21
|
+
*/
|
|
22
|
+
/**
|
|
23
|
+
* Why a model is surfaced.
|
|
24
|
+
*
|
|
25
|
+
* A purpose rather than a category, because the list exists to answer "what
|
|
26
|
+
* should write this" rather than to classify models. One value today; the shape
|
|
27
|
+
* is what keeps the next answer from being a second parallel table.
|
|
28
|
+
*/
|
|
29
|
+
export const FEATURED_MODEL_PURPOSES = ["creative-writing"];
|
|
30
|
+
export const FeaturedModelPurposeSchema = picklist(FEATURED_MODEL_PURPOSES);
|
|
31
|
+
/**
|
|
32
|
+
* Models for writing prose — narration, dialogue, in-world text.
|
|
33
|
+
*
|
|
34
|
+
* All four families are reached through OpenRouter rather than their vendors,
|
|
35
|
+
* and that is the point of listing them: none of them is worth a direct account
|
|
36
|
+
* on its own, and one key already reaches all of them. The ids are pinned
|
|
37
|
+
* because vendors publish a new dated id per refresh, so "the latest Euryale"
|
|
38
|
+
* is a line changed here instead of a search across every repo that named it.
|
|
39
|
+
*
|
|
40
|
+
* Check a replacement against `GET https://openrouter.ai/api/v1/models` before
|
|
41
|
+
* pinning it: a superseded id is eventually withdrawn from the gateway, and the
|
|
42
|
+
* failure it produces is a route that simply stops answering.
|
|
43
|
+
*/
|
|
44
|
+
export const FEATURED_MODELS = [
|
|
45
|
+
{
|
|
46
|
+
model: "aion",
|
|
47
|
+
label: "Aion 3.0",
|
|
48
|
+
purpose: "creative-writing",
|
|
49
|
+
providerId: "openrouter",
|
|
50
|
+
providerModelId: "aion-labs/aion-3.0",
|
|
51
|
+
flagship: true,
|
|
52
|
+
note: "Aion Labs' flagship. Long-form narration that holds a thread across a scene.",
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
model: "aion-mini",
|
|
56
|
+
label: "Aion 3.0 Mini",
|
|
57
|
+
purpose: "creative-writing",
|
|
58
|
+
providerId: "openrouter",
|
|
59
|
+
providerModelId: "aion-labs/aion-3.0-mini",
|
|
60
|
+
flagship: false,
|
|
61
|
+
note: "The small Aion. Cheap enough for the drafts nobody reads twice.",
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
model: "aion-2",
|
|
65
|
+
label: "Aion 2.0",
|
|
66
|
+
purpose: "creative-writing",
|
|
67
|
+
providerId: "openrouter",
|
|
68
|
+
providerModelId: "aion-labs/aion-2.0",
|
|
69
|
+
flagship: false,
|
|
70
|
+
note: "The previous Aion generation, for prompts tuned against it.",
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
model: "aion-rp",
|
|
74
|
+
label: "Aion RP",
|
|
75
|
+
purpose: "creative-writing",
|
|
76
|
+
providerId: "openrouter",
|
|
77
|
+
providerModelId: "aion-labs/aion-rp-llama-3.1-8b",
|
|
78
|
+
flagship: false,
|
|
79
|
+
note: "Aion's roleplay-tuned 8B. Stays in character; does not reason.",
|
|
80
|
+
},
|
|
81
|
+
{
|
|
82
|
+
model: "euryale",
|
|
83
|
+
label: "Euryale 3.3 70B",
|
|
84
|
+
purpose: "creative-writing",
|
|
85
|
+
providerId: "openrouter",
|
|
86
|
+
providerModelId: "sao10k/l3.3-euryale-70b",
|
|
87
|
+
flagship: true,
|
|
88
|
+
note: "Sao10K's Llama-3.3 finetune. Distinctive voice, little assistant register.",
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
model: "euryale-3.1",
|
|
92
|
+
label: "Euryale 3.1 70B",
|
|
93
|
+
purpose: "creative-writing",
|
|
94
|
+
providerId: "openrouter",
|
|
95
|
+
providerModelId: "sao10k/l3.1-euryale-70b",
|
|
96
|
+
flagship: false,
|
|
97
|
+
note: "The Llama-3.1 generation of Euryale.",
|
|
98
|
+
},
|
|
99
|
+
{
|
|
100
|
+
model: "mistral-large",
|
|
101
|
+
label: "Mistral Large 3",
|
|
102
|
+
purpose: "creative-writing",
|
|
103
|
+
providerId: "openrouter",
|
|
104
|
+
providerModelId: "mistralai/mistral-large-2512",
|
|
105
|
+
flagship: true,
|
|
106
|
+
note: "The steadiest of the four at following a structured brief.",
|
|
107
|
+
},
|
|
108
|
+
{
|
|
109
|
+
model: "mistral-large-2407",
|
|
110
|
+
label: "Mistral Large 2 (2407)",
|
|
111
|
+
purpose: "creative-writing",
|
|
112
|
+
providerId: "openrouter",
|
|
113
|
+
providerModelId: "mistralai/mistral-large-2407",
|
|
114
|
+
flagship: false,
|
|
115
|
+
note: "The 2024 Large, kept for prompts written against it.",
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
model: "mistral-medium",
|
|
119
|
+
label: "Mistral Medium 3.5",
|
|
120
|
+
purpose: "creative-writing",
|
|
121
|
+
providerId: "openrouter",
|
|
122
|
+
providerModelId: "mistralai/mistral-medium-3-5",
|
|
123
|
+
flagship: false,
|
|
124
|
+
note: "The cheaper Mistral. A reasonable fallback rather than a first choice.",
|
|
125
|
+
},
|
|
126
|
+
{
|
|
127
|
+
model: "hermes",
|
|
128
|
+
label: "Hermes 4 405B",
|
|
129
|
+
purpose: "creative-writing",
|
|
130
|
+
providerId: "openrouter",
|
|
131
|
+
providerModelId: "nousresearch/hermes-4-405b",
|
|
132
|
+
flagship: true,
|
|
133
|
+
note: "Nous Research's largest. Follows a persona brief more literally than most.",
|
|
134
|
+
},
|
|
135
|
+
{
|
|
136
|
+
model: "hermes-70b",
|
|
137
|
+
label: "Hermes 4 70B",
|
|
138
|
+
purpose: "creative-writing",
|
|
139
|
+
providerId: "openrouter",
|
|
140
|
+
providerModelId: "nousresearch/hermes-4-70b",
|
|
141
|
+
flagship: false,
|
|
142
|
+
note: "The 70B Hermes 4, at a fraction of the flagship's price.",
|
|
143
|
+
},
|
|
144
|
+
{
|
|
145
|
+
model: "hermes-3",
|
|
146
|
+
label: "Hermes 3 405B",
|
|
147
|
+
purpose: "creative-writing",
|
|
148
|
+
providerId: "openrouter",
|
|
149
|
+
providerModelId: "nousresearch/hermes-3-llama-3.1-405b",
|
|
150
|
+
flagship: false,
|
|
151
|
+
note: "The Hermes 3 generation.",
|
|
152
|
+
},
|
|
153
|
+
];
|
|
154
|
+
/** A surfaced model, on the wire. */
|
|
155
|
+
export const FeaturedModelSchema = object({
|
|
156
|
+
model: string(),
|
|
157
|
+
label: string(),
|
|
158
|
+
purpose: FeaturedModelPurposeSchema,
|
|
159
|
+
providerId: string(),
|
|
160
|
+
providerModelId: string(),
|
|
161
|
+
flagship: boolean(),
|
|
162
|
+
note: string(),
|
|
163
|
+
});
|
|
164
|
+
/** Every surfaced model for one kind of work, in the order it is offered. */
|
|
165
|
+
export function featuredModelsFor(purpose) {
|
|
166
|
+
return FEATURED_MODELS.filter((entry) => entry.purpose === purpose);
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* The surfaced models one provider serves, as routes ready to save on it.
|
|
170
|
+
*
|
|
171
|
+
* This is the whole mechanism by which a surfaced model becomes a routable one:
|
|
172
|
+
* a console offers these rows, an operator saves them onto the provider, and
|
|
173
|
+
* from then on a preset naming `euryale` plans exactly as one naming any other
|
|
174
|
+
* configured model. Nothing here reaches routing on its own.
|
|
175
|
+
*
|
|
176
|
+
* @example
|
|
177
|
+
* ```ts
|
|
178
|
+
* import { featuredModelRoutes } from '@game-infra/ai-schemas'
|
|
179
|
+
*
|
|
180
|
+
* await updateProvider('openrouter', { models: featuredModelRoutes('openrouter') })
|
|
181
|
+
* ```
|
|
182
|
+
*/
|
|
183
|
+
export function featuredModelRoutes(providerId) {
|
|
184
|
+
return FEATURED_MODELS.filter((entry) => entry.providerId === providerId).map((entry) => ({
|
|
185
|
+
model: entry.model,
|
|
186
|
+
providerModelId: entry.providerModelId,
|
|
187
|
+
}));
|
|
188
|
+
}
|
|
189
|
+
//# sourceMappingURL=featuredModels.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"featuredModels.js","sourceRoot":"","sources":["../src/featuredModels.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoB,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAG9E;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,kBAAkB,CAAU,CAAC;AACrE,MAAM,CAAC,MAAM,0BAA0B,G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AE,MAAM,EAAE;IACf,KAAK,EAAE,MAAM,EAAE;IACf,OAAO,EAAE,0BAA0B;IACnC,UAAU,EAAE,MAAM,EAAE;IACpB,eAAe,EAAE,MAAM,EAAE;IACzB,QAAQ,EAAE,OAAO,EAAE;IACnB,IAAI,EAAE,MAAM,EAAE;CACf,CAAC,CAAC;AAEH,6EAA6E;AAC7E,MAAM,UAAU,iBAAiB,CAAC,OAA6B;IAC7D,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,OAAO,KAAK,OAAO,CAAC,CAAC;AACtE,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,mBAAmB,CAAC,UAAkB;IACpD,OAAO,eAAe,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,UAAU,KAAK,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QACxF,KAAK,EAAE,KAAK,CAAC,KAAK;QAClB,eAAe,EAAE,KAAK,CAAC,eAAe;KACvC,CAAC,CAAC,CAAC;AACN,CAAC"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @game-infra/ai-schemas
|
|
3
|
+
*
|
|
4
|
+
* The ai-service API contract: how a provider, a coding-plan subscription and a
|
|
5
|
+
* routing preset are described, what an inference request and its answer look
|
|
6
|
+
* like, and the endpoint definitions that carry them.
|
|
7
|
+
*/
|
|
8
|
+
export { CREDENTIAL_KINDS, CreateProviderRequestSchema, CredentialKindSchema, DEFAULT_TIER_PREFERENCE, PROVIDER_DIALECTS, PROVIDER_TIERS, ProviderDialectSchema, ProviderIdSchema, ProviderListResponseSchema, ProviderModelRouteSchema, ProviderProbeResponseSchema, ProviderResponseSchema, ProviderSchema, ProviderTierSchema, SetProviderCredentialRequestSchema, UpdateProviderRequestSchema, } from "./provider.js";
|
|
9
|
+
export type { CreateProviderRequest, CredentialKind, Provider, ProviderDialect, ProviderListResponse, ProviderModelRoute, ProviderProbeResponse, ProviderResponse, ProviderTier, SetProviderCredentialRequest, UpdateProviderRequest, } from "./provider.js";
|
|
10
|
+
export { CreateSubscriptionRequestSchema, SUBSCRIPTION_AUTH_SCHEMES, SUBSCRIPTION_VENDOR_PROFILES, SUBSCRIPTION_VENDORS, SubscriptionListResponseSchema, SubscriptionResponseSchema, SubscriptionAuthSchemeSchema, SubscriptionSchema, SubscriptionVendorSchema, UnlockSubscriptionRequestSchema, UnlockSubscriptionResponseSchema, UpdateSubscriptionRequestSchema, } from "./subscription.js";
|
|
11
|
+
export type { CreateSubscriptionRequest, Subscription, SubscriptionAuthScheme, SubscriptionListResponse, SubscriptionResponse, SubscriptionVendor, SubscriptionVendorProfile, UnlockSubscriptionRequest, UnlockSubscriptionResponse, UpdateSubscriptionRequest, } from "./subscription.js";
|
|
12
|
+
export { CreatePresetRequestSchema, LOCKED_SUBSCRIPTION_POLICIES, LockedSubscriptionPolicySchema, PresetListResponseSchema, PresetModelEntrySchema, PresetResponseSchema, PresetSchema, PresetSlugSchema, ROUTE_EXCLUSION_REASONS, RouteCandidateSchema, RouteExclusionReasonSchema, RouteExclusionSchema, RoutePlanResponseSchema, UpdatePresetRequestSchema, } from "./preset.js";
|
|
13
|
+
export type { CreatePresetRequest, LockedSubscriptionPolicy, Preset, PresetListResponse, PresetModelEntry, PresetResponse, RouteCandidate, RouteExclusion, RouteExclusionReason, RoutePlanResponse, UpdatePresetRequest, } from "./preset.js";
|
|
14
|
+
export { AttemptFailureSchema, GenerateObjectRequestSchema, GenerateObjectResponseSchema, GenerateTextRequestSchema, GenerateTextResponseSchema, ImagePartSchema, MESSAGE_ROLES, MessageRoleSchema, MessageSchema, RouteOutcomeSchema, STREAM_EVENTS, StreamEventSchema, TextPartSchema, UsageSchema, } from "./inference.js";
|
|
15
|
+
export type { AttemptFailure, GenerateObjectRequest, GenerateObjectResponse, GenerateTextRequest, GenerateTextResponse, Message, MessageRole, RouteOutcome, StreamEvent, Usage, } from "./inference.js";
|
|
16
|
+
export { RegisteredSchemaSchema, SchemaListResponseSchema, SchemaResponseSchema, } from "./schemaRegistry.js";
|
|
17
|
+
export type { RegisteredSchema, SchemaListResponse, SchemaResponse } from "./schemaRegistry.js";
|
|
18
|
+
export { CatalogResponseSchema, DiscoveredModelsResponseSchema, PROVIDER_BLUEPRINTS, ProviderBlueprintSchema, SubscriptionVendorOptionSchema, } from "./catalog.js";
|
|
19
|
+
export type { CatalogResponse, DiscoveredModelsResponse, ProviderBlueprint } from "./catalog.js";
|
|
20
|
+
export { FEATURED_MODEL_PURPOSES, FEATURED_MODELS, FeaturedModelPurposeSchema, FeaturedModelSchema, featuredModelRoutes, featuredModelsFor, } from "./featuredModels.js";
|
|
21
|
+
export type { FeaturedModel, FeaturedModelPurpose } from "./featuredModels.js";
|
|
22
|
+
export { AiReadinessResponseSchema, CALL_LIST_SCOPES, CallListQuerySchema, CallListResponseSchema, CallListScopeSchema, CallRecordSchema, DeleteResponseSchema, } from "./service.js";
|
|
23
|
+
export type { AiReadinessResponse, CallListQuery, CallListResponse, CallListScope, CallRecord, DeleteResponse, } from "./service.js";
|
|
24
|
+
export { aiCallListContract, aiCatalogContract, aiGenerateObjectContract, aiGenerateStreamContract, aiGenerateTextContract, aiPresetCreateContract, aiPresetDeleteContract, aiPresetGetContract, aiPresetListContract, aiPresetRoutePlanContract, aiPresetUpdateContract, aiProviderCreateContract, aiProviderCredentialDeleteContract, aiProviderCredentialSetContract, aiProviderDeleteContract, aiProviderGetContract, aiProviderListContract, aiProviderModelsContract, aiProviderProbeContract, aiProviderUpdateContract, aiReadinessContract, aiSchemaGetContract, aiSchemaListContract, aiSubscriptionCreateContract, aiSubscriptionDeleteContract, aiSubscriptionListContract, aiSubscriptionUnlockContract, aiSubscriptionUpdateContract, } from "./contracts.js";
|
|
25
|
+
export { orderedProviderPreference, orderedTierPreference } from "./preference.js";
|
|
26
|
+
/**
|
|
27
|
+
* The header a request carries the subscription unlock password in.
|
|
28
|
+
*
|
|
29
|
+
* A header rather than a body field, for the same reason the bearer token is
|
|
30
|
+
* one: it is a credential rather than an argument, it must not vary between the
|
|
31
|
+
* text and the streaming forms of the same call, and a body field would end up
|
|
32
|
+
* copied into request logs by every client that logs what it posted.
|
|
33
|
+
*/
|
|
34
|
+
export declare const SUBSCRIPTION_PASSWORD_HEADER = "X-AI-Subscription-Password";
|
|
35
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAGH,OAAO,EACL,gBAAgB,EAChB,2BAA2B,EAC3B,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,EACjB,cAAc,EACd,qBAAqB,EACrB,gBAAgB,EAChB,0BAA0B,EAC1B,wBAAwB,EACxB,2BAA2B,EAC3B,sBAAsB,EACtB,cAAc,EACd,kBAAkB,EAClB,kCAAkC,EAClC,2BAA2B,GAC5B,MAAM,eAAe,CAAC;AACvB,YAAY,EACV,qBAAqB,EACrB,cAAc,EACd,QAAQ,EACR,eAAe,EACf,oBAAoB,EACpB,kBAAkB,EAClB,qBAAqB,EACrB,gBAAgB,EAChB,YAAY,EACZ,4BAA4B,EAC5B,qBAAqB,GACtB,MAAM,eAAe,CAAC;AAGvB,OAAO,EACL,+BAA+B,EAC/B,yBAAyB,EACzB,4BAA4B,EAC5B,oBAAoB,EACpB,8BAA8B,EAC9B,0BAA0B,EAC1B,4BAA4B,EAC5B,kBAAkB,EAClB,wBAAwB,EACxB,+BAA+B,EAC/B,gCAAgC,EAChC,+BAA+B,GAChC,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,yBAAyB,EACzB,YAAY,EACZ,sBAAsB,EACtB,wBAAwB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,yBAAyB,EACzB,yBAAyB,EACzB,0BAA0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