@kortix/llm-catalog 0.13.40 → 0.13.41

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.
@@ -1,4 +1,4 @@
1
- import type { Catalog, CatalogModel } from './index.js';
1
+ import type { Catalog, CatalogModel } from './lite.js';
2
2
  /**
3
3
  * The bundled models.dev snapshot. Kept out of `index.ts` so consumers that
4
4
  * never read it (browser bundles) do not ship it — see
@@ -1 +1 @@
1
- {"version":3,"file":"catalog-data.d.ts","sourceRoot":"","sources":["../src/catalog-data.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAGrD;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAkB,OAAO,CAAC;AAU9C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,OAAiB,GACzB,YAAY,GAAG,SAAS,CA6B1B"}
1
+ {"version":3,"file":"catalog-data.d.ts","sourceRoot":"","sources":["../src/catalog-data.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAC;AAGpD;;;;GAIG;AACH,eAAO,MAAM,OAAO,EAAkB,OAAO,CAAC;AAU9C;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,wBAAwB,CACtC,SAAS,EAAE,MAAM,EACjB,OAAO,GAAE,OAAiB,GACzB,YAAY,GAAG,SAAS,CAgC1B"}
@@ -1,5 +1,5 @@
1
1
  import catalogJson from './catalog.generated.json' with { type: 'json' };
2
- import { getManagedModel, pricingRefLookupCandidates } from './index.js';
2
+ import { getManagedModel, pricingRefLookupCandidates } from './lite.js';
3
3
  /**
4
4
  * The bundled models.dev snapshot. Kept out of `index.ts` so consumers that
5
5
  * never read it (browser bundles) do not ship it — see
@@ -61,6 +61,9 @@ export function catalogModelForWireModel(wireModel, catalog = CATALOG) {
61
61
  reasoning: true,
62
62
  tool_call: true,
63
63
  temperature: true,
64
+ attachment: managed.vision,
65
+ modalities: { input: managed.vision ? ['text', 'image'] : ['text'], output: ['text'] },
66
+ ...(managed.reasoningOptions ? { reasoning_options: managed.reasoningOptions } : {}),
64
67
  limit: managed.limit,
65
68
  };
66
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"catalog-data.js","sourceRoot":"","sources":["../src/catalog-data.ts"],"names":[],"mappings":"AAAA,OAAO,WAAW,MAAM,0BAA0B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAEzE,OAAO,EAAE,eAAe,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAEtE;;;;GAIG;AACH,MAAM,CAAC,MAAM,OAAO,GAAG,WAAsB,CAAC;AAE9C,SAAS,cAAc,CAAC,OAAgB;IACtC,MAAM,IAAI,GAAG,IAAI,GAAG,EAAwB,CAAC;IAC7C,KAAK,MAAM,QAAQ,IAAI,OAAO,CAAC,SAAS,EAAE,CAAC;QACzC,KAAK,MAAM,KAAK,IAAI,QAAQ,CAAC,MAAM;YAAE,IAAI,CAAC,GAAG,CAAC,GAAG,QAAQ,CAAC,EAAE,IAAI,KAAK,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,CAAC;IACrF,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,MAAM,UAAU,wBAAwB,CACtC,SAAiB,EACjB,UAAmB,OAAO;IAE1B,IAAI,SAAS,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACnC,OAAO,cAAc,CAAC,OAAO,CAAC,CAAC,GAAG,CAAC,UAAU,SAAS,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC;IACnF,CAAC;IACD,MAAM,KAAK,GAAG,SAAS,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACrC,IAAI,KAAK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EAAE,KAAK,OAAO,CAAC,CAAC;IACnD,CAAC;IACD,MAAM,OAAO,GAAG,eAAe,CAAC,SAAS,CAAC,CAAC;IAC3C,IAAI,OAAO,EAAE,CAAC;QACZ,MAAM,WAAW,GAAG,cAAc,CAAC,OAAO,CAAC,CAAC;QAC5C,MAAM,YAAY,GAAG,0BAA0B,CAAC,OAAO,CAAC,UAAU,CAAC;aAChE,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,WAAW,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;aAClC,IAAI,CAAC,CAAC,KAAK,EAAyB,EAAE,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC;QAC/D,IAAI,YAAY;YAAE,OAAO,YAAY,CAAC;QACtC,OAAO;YACL,EAAE,EAAE,OAAO,CAAC,EAAE;YACd,IAAI,EAAE,OAAO,CAAC,IAAI;YAClB,SAAS,EAAE,IAAI;YACf,SAAS,EAAE,IAAI;YACf,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,OAAO,CAAC,MAAM;YAC1B,UAAU,EAAE,EAAE,KAAK,EAAE,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC,MAAM,CAAC,EAAE;YACtF,GAAG,CAAC,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,iBAAiB,EAAE,OAAO,CAAC,gBAAgB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;YACpF,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,224 +1,3 @@
1
- export { DEFAULT_ENABLEMENT_WINDOW_MONTHS, defaultEnabledModelIds, type EnablementCandidate, autoSeedDefaultModel, autoSeedableModels, bedrockInferenceProfileRank, } from './enablement.js';
2
- export interface ProviderAuthMethod {
3
- /** Optional label, surfaced only if a provider ever exposes >1 method in the UI (none do today — the connect form always uses methods[0]). */
4
- label?: string;
5
- /** Every one of these project-secret env vars must be set for this method to count as satisfied. */
6
- envVars: string[];
7
- }
8
- export interface ProviderAuthRequirement {
9
- /**
10
- * One or more independent ways to authenticate. A provider is CONNECTED if
11
- * ANY method's envVars are all present — see `isProviderAuthSatisfied`.
12
- */
13
- methods: ProviderAuthMethod[];
14
- }
15
- interface CatalogProviderLike {
16
- id: string;
17
- env?: string[];
18
- }
19
- /**
20
- * The auth requirement Kortix actually enforces for a catalog provider.
21
- * Falls back to a single method requiring every var in `provider.env`
22
- * (unchanged behavior) unless an override above corrects it.
23
- */
24
- export declare function providerAuthRequirement(provider: CatalogProviderLike): ProviderAuthRequirement;
25
- /**
26
- * The env vars the connect form should collect for a provider — always the
27
- * first (primary) auth method. Every provider has exactly one usable method
28
- * today; this is the field list `ApiKeyConnectForm` renders and writes.
29
- */
30
- export declare function primaryAuthEnvVars(provider: CatalogProviderLike): string[];
31
- /**
32
- * True when at least one of the requirement's auth methods has every one of
33
- * its env vars present, per `hasEnvVar`. ANY-OF-methods, ALL-OF-vars-within-
34
- * a-method — the one predicate every "is this provider connected" check
35
- * (web connect modal, model-selector gating, native-mode provider merge, CLI
36
- * `providers ls`) should use instead of hand-rolling `envVars.every(...)`
37
- * over the raw catalog list.
38
- */
39
- export declare function isProviderAuthSatisfied(requirement: ProviderAuthRequirement, hasEnvVar: (envVar: string) => boolean): boolean;
40
- export interface CatalogReasoningOption {
41
- type: string;
42
- values?: string[];
43
- min?: number;
44
- max?: number;
45
- }
46
- export interface CatalogCostTier {
47
- input?: number;
48
- output?: number;
49
- cache_read?: number;
50
- cache_write?: number;
51
- tier?: {
52
- type: string;
53
- size: number;
54
- };
55
- }
56
- export interface CatalogCost {
57
- input?: number;
58
- output?: number;
59
- cache_read?: number;
60
- cache_write?: number;
61
- tiers?: CatalogCostTier[];
62
- context_over_200k?: CatalogCostTier;
63
- }
64
- export interface CatalogModalities {
65
- input?: string[];
66
- output?: string[];
67
- }
68
- export interface CatalogModel {
69
- id: string;
70
- name: string;
71
- released?: string | null;
72
- status?: string;
73
- description?: string;
74
- attachment?: boolean;
75
- reasoning?: boolean;
76
- reasoning_options?: CatalogReasoningOption[];
77
- tool_call?: boolean;
78
- temperature?: boolean;
79
- structured_output?: boolean;
80
- interleaved?: boolean | {
81
- field?: string;
82
- };
83
- open_weights?: boolean;
84
- knowledge?: string;
85
- last_updated?: string;
86
- family?: string;
87
- modalities?: CatalogModalities;
88
- limit?: {
89
- context?: number;
90
- input?: number;
91
- output?: number;
92
- };
93
- cost?: CatalogCost;
94
- }
95
- /** Generic per-model generation defaults a project can configure. Extensible
96
- * without a schema/migration change — see packages/db's jsonb column. */
97
- export interface GenerationConfig {
98
- reasoningEffort?: string;
99
- temperature?: number;
100
- topP?: number;
101
- maxOutputTokens?: number;
102
- }
103
- export interface GenerationControlCapabilities {
104
- /**
105
- * Present iff the model publishes a REAL reasoning_options knob — from
106
- * EITHER an `effort` entry (its exact `values`) OR a `budget_tokens` entry
107
- * (a synthesized standard low/medium/high tier set — `budget_tokens` has no
108
- * discrete values of its own, but it IS a real published knob, e.g. every
109
- * mainline Claude model, which the transport maps via
110
- * `resolveAnthropicThinkingBudget`/`REASONING_EFFORT_BUDGET_TOKENS`
111
- * — so exposing an effort-style control for it is not fabrication the way
112
- * inventing one for a bare `reasoning:true` model with NO reasoning_options
113
- * at all would be). A `toggle` entry gets no control here (on/off is not an
114
- * effort enum) but does not crash — see the `toggle` branch below. Absent
115
- * entirely when the model publishes no real reasoning_options at all (we
116
- * never fabricate one out of thin air).
117
- */
118
- reasoningEffort?: {
119
- values: string[];
120
- };
121
- /** True iff the model accepts a client-supplied temperature (models.dev
122
- * `temperature:false` means FIXED — e.g. gpt-5.6-sol — hide the control). */
123
- temperature: boolean;
124
- /** top_p has no distinct models.dev flag — gated on the same standard-
125
- * sampling capability as temperature (documented heuristic: models that
126
- * reject a custom temperature reject a custom top_p too). */
127
- topP: boolean;
128
- /** Present iff the model declares a positive max output-token window —
129
- * the ceiling a "max output tokens" control must clamp to. */
130
- maxOutputTokens?: {
131
- ceiling: number;
132
- };
133
- }
134
- /** Pure capability derivation — NEVER a per-model id lookup table. */
135
- export declare function generationControlCapabilities(model: CatalogModel | undefined | null): GenerationControlCapabilities;
136
- /**
137
- * Drop/clamp every field of a (possibly user- or client-supplied)
138
- * `GenerationConfig` against what `model` actually supports — the single
139
- * gate BOTH the routing-policy write path (persistence) and the gateway
140
- * resolution-layer injection path (see apps/api's routing/resolve-route.ts)
141
- * must run a value through before it's trusted. A field the model doesn't
142
- * support is silently dropped (never a validation error) so a model swap
143
- * doesn't require the caller to also scrub unrelated config.
144
- */
145
- export declare function clampGenerationConfig(config: GenerationConfig | null | undefined, model: CatalogModel | undefined | null): GenerationConfig;
146
- interface CatalogProvider {
147
- id: string;
148
- name: string;
149
- env?: string[];
150
- doc?: string;
151
- api?: string | null;
152
- npm?: string | null;
153
- models: CatalogModel[];
154
- }
155
- export interface Catalog {
156
- source: string;
157
- fetched_at: string;
158
- provider_count: number;
159
- model_count: number;
160
- providers: CatalogProvider[];
161
- }
1
+ export * from './lite.js';
162
2
  export { CATALOG, catalogModelForWireModel } from './catalog-data.js';
163
- /**
164
- * `{ id, env }` for every provider in `CATALOG`, in the same order — the only
165
- * catalog fields `providerAuthRequirement` reads. ~8 KB instead of the ~7.6 MB
166
- * snapshot, for browser code that needs provider credentials but no models.
167
- * Regenerated together with the snapshot; catalog-isolation.test.ts checks
168
- * that the two agree.
169
- */
170
- export declare const CATALOG_PROVIDER_ENV: ReadonlyArray<{
171
- id: string;
172
- env: string[];
173
- }>;
174
- export interface ManagedModel {
175
- id: string;
176
- name: string;
177
- upstreamModelId: string;
178
- transport: 'openrouter';
179
- morphModelId?: string;
180
- morphPricing?: {
181
- inputPerMillion: number;
182
- cachedInputPerMillion?: number;
183
- outputPerMillion: number;
184
- };
185
- openrouterEndpointPricing?: Record<string, {
186
- inputPerMillion: number;
187
- cachedInputPerMillion: number;
188
- outputPerMillion: number;
189
- }>;
190
- providerBrand?: string;
191
- pricingRef: string;
192
- pricing?: {
193
- inputPerMillion: number;
194
- outputPerMillion: number;
195
- cachedInputPerMillion?: number;
196
- cacheWritePerMillion?: number;
197
- contextOver200k?: {
198
- inputPerMillion: number;
199
- outputPerMillion: number;
200
- cachedInputPerMillion?: number;
201
- cacheWritePerMillion?: number;
202
- contextThreshold: number;
203
- };
204
- };
205
- tier: 'flagship' | 'balanced' | 'fast';
206
- vision: boolean;
207
- limit: {
208
- context: number;
209
- output: number;
210
- };
211
- openrouterProvider?: Record<string, unknown>;
212
- }
213
- export declare function pricingRefLookupCandidates(pricingRef: string): string[];
214
- export declare const VERIFIED_US_MANAGED_ENDPOINTS: readonly ["coreweave/fp8", "decart/fp4", "coreweave/nvfp4", "fireworks/us"];
215
- export declare const MANAGED_MODELS: ManagedModel[];
216
- export declare function getManagedModel(id: string): ManagedModel | undefined;
217
- export declare function isManagedModelId(id: string): boolean;
218
- export declare const DEFAULT_MANAGED_MODEL_IDS: string[];
219
- export declare const MANAGED_FLAGSHIP_MODEL_ID: string;
220
- /** Concrete Kortix-managed default used when no account or project default exists. */
221
- export declare const PLATFORM_DEFAULT_MODEL_ID = "deepseek-v4.1-flash";
222
- export declare const MODEL_SELECTOR_PROVIDER_IDS: readonly ["kortix", "opencode", "anthropic", "openai", "github-copilot", "google", "openrouter", "vercel"];
223
- export declare const PROVIDER_LABELS: Record<string, string>;
224
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gCAAgC,EAChC,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AA2EtB,MAAM,WAAW,kBAAkB;IACjC,8IAA8I;IAC9I,KAA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AC,CAAC;CAC9C;AAWD,wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CASvE;AAkBD,eAAO,MAAM,6BAA6B,6EAEhC,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,YAAY,EA8CxC,CAAC;AAIF,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEpE;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,eAAO,MAAM,yBAAyB,UAAkC,CAAC;AAEzE,eAAO,MAAM,yBAAyB,QAElC,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D,eAAO,MAAM,2BAA2B,4GAS9B,CAAC;AAEX,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAuFlD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAIA,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/index.js CHANGED
@@ -1,337 +1,7 @@
1
- import providerEnvJson from './provider-env.generated.json' with { type: 'json' };
2
- export { DEFAULT_ENABLEMENT_WINDOW_MONTHS, defaultEnabledModelIds, autoSeedDefaultModel, autoSeedableModels, bedrockInferenceProfileRank, } from './enablement.js';
3
- const PROVIDER_AUTH_REQUIREMENT_OVERRIDES = {
4
- 'amazon-bedrock': {
5
- methods: [
6
- {
7
- label: 'Bearer token',
8
- // See the module doc comment above for the full trail. When SigV4
9
- // signing lands, ADD a second method here (e.g. `{ label: 'IAM
10
- // access key', envVars: ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY',
11
- // 'AWS_REGION'] }`) — do not replace this one; existing bearer-token
12
- // connections must keep working.
13
- envVars: ['AWS_BEARER_TOKEN_BEDROCK', 'AWS_REGION'],
14
- },
15
- ],
16
- },
17
- google: {
18
- methods: [
19
- // GOOGLE_GENERATIVE_AI_API_KEY first: the name @ai-sdk/google's own
20
- // docs lead with, and what Kortix's CLI/UI have always written when
21
- // connecting Google — kept as the connect form's primary field.
22
- { envVars: ['GOOGLE_GENERATIVE_AI_API_KEY'] },
23
- { envVars: ['GOOGLE_API_KEY'] },
24
- { envVars: ['GEMINI_API_KEY'] },
25
- ],
26
- },
27
- };
28
- /**
29
- * The auth requirement Kortix actually enforces for a catalog provider.
30
- * Falls back to a single method requiring every var in `provider.env`
31
- * (unchanged behavior) unless an override above corrects it.
32
- */
33
- export function providerAuthRequirement(provider) {
34
- const override = PROVIDER_AUTH_REQUIREMENT_OVERRIDES[provider.id];
35
- if (override)
36
- return override;
37
- const env = provider.env ?? [];
38
- return { methods: env.length > 0 ? [{ envVars: env }] : [] };
39
- }
40
- /**
41
- * The env vars the connect form should collect for a provider — always the
42
- * first (primary) auth method. Every provider has exactly one usable method
43
- * today; this is the field list `ApiKeyConnectForm` renders and writes.
44
- */
45
- export function primaryAuthEnvVars(provider) {
46
- return providerAuthRequirement(provider).methods[0]?.envVars ?? [];
47
- }
48
- /**
49
- * True when at least one of the requirement's auth methods has every one of
50
- * its env vars present, per `hasEnvVar`. ANY-OF-methods, ALL-OF-vars-within-
51
- * a-method — the one predicate every "is this provider connected" check
52
- * (web connect modal, model-selector gating, native-mode provider merge, CLI
53
- * `providers ls`) should use instead of hand-rolling `envVars.every(...)`
54
- * over the raw catalog list.
55
- */
56
- export function isProviderAuthSatisfied(requirement, hasEnvVar) {
57
- return requirement.methods.some((method) => method.envVars.length > 0 && method.envVars.every(hasEnvVar));
58
- }
59
- // The standard effort tiers synthesized for a `budget_tokens`-shaped
60
- // reasoning_options entry (no discrete `values` of its own to mirror). Chosen
61
- // to match `REASONING_EFFORT_BUDGET_TOKENS`'s well-known low/medium/high keys
62
- // (packages/llm-gateway/src/transports/ai-sdk/request.ts) so every value this
63
- // control can offer resolves to a real thinking-token budget downstream —
64
- // never an effort label the transport wouldn't know what to do with.
65
- const BUDGET_TOKENS_EFFORT_TIERS = ['low', 'medium', 'high'];
66
- /** Pure capability derivation — NEVER a per-model id lookup table. */
67
- export function generationControlCapabilities(model) {
68
- if (!model)
69
- return { temperature: false, topP: false };
70
- // Only expose an effort control when the model publishes a REAL
71
- // reasoning_options entry — never fabricate one for a model that publishes
72
- // none. Two shapes yield a control (see the field doc above): `effort`
73
- // (its own exact values) and `budget_tokens` (synthesized standard tiers —
74
- // it has no discrete values, but it's a real published knob, e.g. every
75
- // mainline Claude model). A `toggle` entry matches neither branch below and
76
- // falls through to `undefined` — deliberately: on/off isn't an effort enum,
77
- // and there's no separate toggle-control surface wired today, so this is
78
- // the "don't crash, don't fabricate" no-op for it.
79
- const effortOption = model.reasoning_options?.find((option) => option.type === 'effort');
80
- const budgetTokensOption = model.reasoning_options?.find((option) => option.type === 'budget_tokens');
81
- const reasoningEffort = effortOption?.values?.length
82
- ? { values: effortOption.values }
83
- : budgetTokensOption
84
- ? { values: [...BUDGET_TOKENS_EFFORT_TIERS] }
85
- : undefined;
86
- const temperature = model.temperature === true;
87
- const ceiling = model.limit?.output;
88
- const maxOutputTokens = typeof ceiling === 'number' && ceiling > 0 ? { ceiling } : undefined;
89
- return {
90
- reasoningEffort,
91
- temperature,
92
- topP: temperature,
93
- maxOutputTokens,
94
- };
95
- }
96
- /**
97
- * Drop/clamp every field of a (possibly user- or client-supplied)
98
- * `GenerationConfig` against what `model` actually supports — the single
99
- * gate BOTH the routing-policy write path (persistence) and the gateway
100
- * resolution-layer injection path (see apps/api's routing/resolve-route.ts)
101
- * must run a value through before it's trusted. A field the model doesn't
102
- * support is silently dropped (never a validation error) so a model swap
103
- * doesn't require the caller to also scrub unrelated config.
104
- */
105
- export function clampGenerationConfig(config, model) {
106
- if (!config)
107
- return {};
108
- const caps = generationControlCapabilities(model);
109
- const out = {};
110
- if (typeof config.reasoningEffort === 'string' &&
111
- caps.reasoningEffort?.values.includes(config.reasoningEffort)) {
112
- out.reasoningEffort = config.reasoningEffort;
113
- }
114
- if (typeof config.temperature === 'number' &&
115
- caps.temperature &&
116
- Number.isFinite(config.temperature)) {
117
- out.temperature = Math.min(2, Math.max(0, config.temperature));
118
- }
119
- if (typeof config.topP === 'number' && caps.topP && Number.isFinite(config.topP)) {
120
- out.topP = Math.min(1, Math.max(0, config.topP));
121
- }
122
- if (typeof config.maxOutputTokens === 'number' &&
123
- caps.maxOutputTokens &&
124
- Number.isFinite(config.maxOutputTokens)) {
125
- out.maxOutputTokens = Math.min(caps.maxOutputTokens.ceiling, Math.max(1, Math.floor(config.maxOutputTokens)));
126
- }
127
- return out;
128
- }
129
- // The bundled models.dev snapshot (~7.6 MB of JSON) and its one reader live in
130
- // `catalog-data.ts`, never in this module: browser bundles import this entry
131
- // for small helpers, and a bundler can drop `catalog-data.ts` only when this
132
- // file does not import the JSON itself (catalog-isolation.test.ts).
1
+ // The full surface: every helper (`./lite`) plus the bundled models.dev
2
+ // snapshot and its reader. Browser bundlers that tree-shake drop
3
+ // `catalog-data.ts` when `CATALOG` is unused; bundlers that do not (Metro)
4
+ // import `@kortix/llm-catalog/lite` instead.
5
+ export * from './lite.js';
133
6
  export { CATALOG, catalogModelForWireModel } from './catalog-data.js';
134
- /**
135
- * `{ id, env }` for every provider in `CATALOG`, in the same order — the only
136
- * catalog fields `providerAuthRequirement` reads. ~8 KB instead of the ~7.6 MB
137
- * snapshot, for browser code that needs provider credentials but no models.
138
- * Regenerated together with the snapshot; catalog-isolation.test.ts checks
139
- * that the two agree.
140
- */
141
- export const CATALOG_PROVIDER_ENV = providerEnvJson;
142
- // A managed model's `pricingRef` is supposed to be the model's real
143
- // models.dev id, but Kortix's own display id is dotted (`claude-opus-4.8`)
144
- // while models.dev Claude ids are dashed (`claude-opus-4-8`) — a mismatch
145
- // here silently misses the models.dev lookup and falls back to a permissive
146
- // synthetic capability record (no reasoning_options, temperature always
147
- // true), which is wrong for real models. Consumers doing a `provider/model`
148
- // lookup by `pricingRef` should try these candidates in order rather than
149
- // a single exact match, so a dotted/dashed slip degrades gracefully instead
150
- // of silently losing real capability data.
151
- export function pricingRefLookupCandidates(pricingRef) {
152
- const slash = pricingRef.indexOf('/');
153
- if (slash <= 0)
154
- return [pricingRef];
155
- const providerId = pricingRef.slice(0, slash);
156
- const modelId = pricingRef.slice(slash + 1);
157
- const candidates = [pricingRef];
158
- const dashed = `${providerId}/${modelId.replace(/\./g, '-')}`;
159
- if (dashed !== pricingRef)
160
- candidates.push(dashed);
161
- return candidates;
162
- }
163
- // Managed IDs are bare gateway model IDs. OpenCode uses `kortix/<id>`, so the
164
- // picker shows Kortix whichever upstream serves the request.
165
- //
166
- // Models selected by MORPH_MANAGED_MODELS try Morph direct first. Every model
167
- // has an OpenRouter endpoint pool. Each pool lists
168
- // only endpoints that, on 2026-09-24, were in
169
- // OpenRouter's ZDR feed, had a CONFIRMED US datacenter (US headquarters plus US
170
- // datacenters in /api/v1/providers, or a `/us` endpoint tag), and answered pinned
171
- // text and image probes. US headquarters alone does not qualify. `allow_fallbacks: true` lets OpenRouter move between pool members;
172
- // `only` keeps it inside the pool. `max_price` (USD per 1M tokens) excludes premium
173
- // tiers. packages/llm-catalog/README.md records the probe results.
174
- // Vision is explicit per model so the picker and runtime reject image input for text-only models.
175
- const OPENROUTER_POOL_PRIVACY = { allow_fallbacks: true, zdr: true, data_collection: 'deny' };
176
- // Checked against OpenRouter's ZDR and provider-location feeds on 2026-09-26.
177
- // Resolver uses this list for operator overlays too; an unknown endpoint fails closed.
178
- export const VERIFIED_US_MANAGED_ENDPOINTS = [
179
- 'coreweave/fp8', 'decart/fp4', 'coreweave/nvfp4', 'fireworks/us',
180
- ];
181
- export const MANAGED_MODELS = [
182
- {
183
- id: 'deepseek-v4.1-flash', name: 'DeepSeek V4.1 Flash', upstreamModelId: 'deepseek/deepseek-v4.1-flash',
184
- transport: 'openrouter', morphModelId: 'morph-dsv41flash',
185
- morphPricing: { inputPerMillion: 0.15, cachedInputPerMillion: 0.003, outputPerMillion: 0.6 },
186
- pricingRef: 'openrouter/deepseek/deepseek-v4.1-flash',
187
- pricing: { inputPerMillion: 0.2, cachedInputPerMillion: 0.03, outputPerMillion: 0.65 },
188
- openrouterEndpointPricing: { 'coreweave/fp8': { inputPerMillion: 0.2, cachedInputPerMillion: 0.03, outputPerMillion: 0.65 } },
189
- tier: 'balanced', vision: true, limit: { context: 1_048_576, output: 16_384 },
190
- openrouterProvider: {
191
- only: ['coreweave/fp8'],
192
- ...OPENROUTER_POOL_PRIVACY,
193
- max_price: { prompt: 0.3, completion: 1.2 },
194
- },
195
- },
196
- {
197
- id: 'glm-5.3-flash', name: 'GLM 5.3 Flash', upstreamModelId: 'z-ai/glm-5.3-flash',
198
- transport: 'openrouter', morphModelId: 'morph-glm53flash',
199
- morphPricing: { inputPerMillion: 0.1, cachedInputPerMillion: 0.02, outputPerMillion: 0.35 },
200
- pricingRef: 'openrouter/z-ai/glm-5.3-flash',
201
- pricing: { inputPerMillion: 0.15, cachedInputPerMillion: 0.05, outputPerMillion: 0.5 },
202
- openrouterEndpointPricing: {
203
- 'decart/fp4': { inputPerMillion: 0.1275, cachedInputPerMillion: 0.0255, outputPerMillion: 0.425 },
204
- 'coreweave/nvfp4': { inputPerMillion: 0.15, cachedInputPerMillion: 0.05, outputPerMillion: 0.5 },
205
- },
206
- tier: 'fast', vision: true, limit: { context: 1_048_576, output: 16_384 },
207
- openrouterProvider: {
208
- only: ['decart/fp4', 'coreweave/nvfp4'],
209
- ...OPENROUTER_POOL_PRIVACY,
210
- max_price: { prompt: 0.15, completion: 0.5 },
211
- },
212
- },
213
- {
214
- id: 'kimi-k3', name: 'Kimi K3 2.8T', upstreamModelId: 'moonshotai/kimi-k3',
215
- transport: 'openrouter', morphModelId: 'morph-kimik3',
216
- morphPricing: { inputPerMillion: 2.5, cachedInputPerMillion: 0.29, outputPerMillion: 14 },
217
- pricingRef: 'openrouter/moonshotai/kimi-k3',
218
- pricing: { inputPerMillion: 3.3, cachedInputPerMillion: 0.33, outputPerMillion: 16.5 },
219
- openrouterEndpointPricing: { 'fireworks/us': { inputPerMillion: 3.3, cachedInputPerMillion: 0.33, outputPerMillion: 16.5 } },
220
- tier: 'flagship', vision: true, limit: { context: 1_048_576, output: 16_384 },
221
- openrouterProvider: {
222
- only: ['fireworks/us'],
223
- ...OPENROUTER_POOL_PRIVACY,
224
- max_price: { prompt: 3.3, completion: 16.5 },
225
- },
226
- },
227
- ];
228
- const MANAGED_BY_ID = new Map(MANAGED_MODELS.map((m) => [m.id, m]));
229
- export function getManagedModel(id) {
230
- return MANAGED_BY_ID.get(id);
231
- }
232
- export function isManagedModelId(id) {
233
- return MANAGED_BY_ID.has(id);
234
- }
235
- export const DEFAULT_MANAGED_MODEL_IDS = MANAGED_MODELS.map((m) => m.id);
236
- export const MANAGED_FLAGSHIP_MODEL_ID = (MANAGED_MODELS.find((m) => m.tier === 'flagship') ?? MANAGED_MODELS[0]).id;
237
- /** Concrete Kortix-managed default used when no account or project default exists. */
238
- export const PLATFORM_DEFAULT_MODEL_ID = 'deepseek-v4.1-flash';
239
- export const MODEL_SELECTOR_PROVIDER_IDS = [
240
- 'kortix',
241
- 'opencode',
242
- 'anthropic',
243
- 'openai',
244
- 'github-copilot',
245
- 'google',
246
- 'openrouter',
247
- 'vercel',
248
- ];
249
- export const PROVIDER_LABELS = {
250
- anthropic: 'Anthropic',
251
- openai: 'OpenAI',
252
- codex: 'ChatGPT subscription',
253
- google: 'Google',
254
- xai: 'xAI',
255
- moonshotai: 'Moonshot',
256
- 'moonshotai-cn': 'Moonshot',
257
- opencode: 'OpenCode Zen',
258
- kortix: 'Kortix',
259
- firmware: 'Firmware',
260
- // models.dev's canonical provider id is `amazon-bedrock` (see
261
- // `PROVIDER_AUTH_REQUIREMENT_OVERRIDES` above and `catalog.generated.json`),
262
- // and that is the id the gateway stamps onto `GatewayModel.provider`. The
263
- // short `bedrock` alias is kept for legacy call sites, mirroring the icon
264
- // map in apps/web's provider-branding. Missing the canonical key here is
265
- // what made the picker label the whole Bedrock group "Kortix": the label
266
- // lookup fell through to `FlatModel.providerName`, which is always "Kortix"
267
- // under the gateway.
268
- 'amazon-bedrock': 'Amazon Bedrock',
269
- bedrock: 'Amazon Bedrock',
270
- openrouter: 'OpenRouter',
271
- 'github-copilot': 'GitHub Copilot',
272
- vercel: 'Vercel',
273
- groq: 'Groq',
274
- deepseek: 'DeepSeek',
275
- mistral: 'Mistral',
276
- cohere: 'Cohere',
277
- llama: 'Llama',
278
- huggingface: 'Hugging Face',
279
- cerebras: 'Cerebras',
280
- togetherai: 'Together AI',
281
- fireworks: 'Fireworks',
282
- deepinfra: 'DeepInfra',
283
- nvidia: 'NVIDIA',
284
- cloudflare: 'Cloudflare',
285
- azure: 'Azure',
286
- ollama: 'Ollama',
287
- perplexity: 'Perplexity',
288
- lmstudio: 'LM Studio',
289
- v0: 'v0',
290
- wandb: 'W&B',
291
- baseten: 'Baseten',
292
- // MiniMax is its own distinct BYOK provider (minimax.io / minimaxi.com) —
293
- // not Moonshot. Was mislabeled 'Moonshot' for both regional variants.
294
- minimax: 'MiniMax',
295
- 'minimax-cn': 'MiniMax',
296
- siliconflow: 'SiliconFlow',
297
- 'siliconflow-cn': 'SiliconFlow',
298
- zhipuai: 'ZhipuAI',
299
- 'zhipuai-cn': 'ZhipuAI',
300
- 'google-vertex': 'Google Vertex',
301
- 'google-vertex-anthropic': 'Vertex Anthropic',
302
- 'azure-cognitive-services': 'Azure Cognitive',
303
- 'cloudflare-ai-gateway': 'Cloudflare Gateway',
304
- 'github-models': 'GitHub Models',
305
- 'ollama-cloud': 'Ollama Cloud',
306
- 'kai Coding Plan': 'AI21',
307
- zaicodingplan: 'AI21',
308
- venice: 'Venice',
309
- upstage: 'Upstage',
310
- nebius: 'Nebius',
311
- vultr: 'Vultr',
312
- friendli: 'Friendli',
313
- poe: 'Poe',
314
- requesty: 'Requesty',
315
- 'sap-ai-core': 'SAP AI Core',
316
- scaleway: 'Scaleway',
317
- inception: 'Inception',
318
- morph: 'Morph',
319
- abacus: 'Abacus',
320
- bailing: 'Bailing',
321
- chutes: 'Chutes',
322
- fastrouter: 'FastRouter',
323
- helicone: 'Helicone',
324
- iflowcn: 'iFlytek',
325
- inference: 'Inference',
326
- 'io-net': 'IO.net',
327
- 'kimi-for-coding': 'Kimi',
328
- lucidquery: 'LucidQuery',
329
- modelscope: 'ModelScope',
330
- 'nano-gpt': 'NanoGPT',
331
- ovhcloud: 'OVHcloud',
332
- submodel: 'Submodel',
333
- synthetic: 'Synthetic',
334
- xiaomi: 'Xiaomi',
335
- zenmux: 'Zenmux',
336
- };
337
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,+BAA+B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAElF,OAAO,EACL,gCAAgC,EAChC,sBAAsB,EAEtB,oBAAoB,EACpB,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AA+FtB,MAAM,mCAAmC,GAA4C;IACnF,gBAAgB,EAAE;QAChB,OAAO,EAAE;YACP;gBACE,KAAK,EAAE,cAAc;gBACrB,kEAAkE;gBAClE,+DAA+D;gBAC/D,uEAAuE;gBACvE,qEAAqE;gBACrE,iCAAiC;gBACjC,OAAO,EAAE,CAAC,0BAA0B,EAAE,YAAY,CAAC;aACpD;SACF;KACF;IACD,MAAM,EAAE;QACN,OAAO,EAAE;YACP,oEAAoE;YACpE,oEAAoE;YACpE,gEAAgE;YAChE,EAAE,OAAO,EAAE,CAAC,8BAA8B,CAAC,EAAE;YAC7C,EAAE,OAAO,EAAE,CAAC,gBAAgB,CAAC,EAAE;YAC/B,EAAE,OAAO,EAAE,CAAC,gBAAgB,CAAC,EAAE;SAChC;KACF;CACF,CAAC;AAEF;;;;GAIG;AACH,M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,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,KAAK,EAAE,OAAO;IACd,MAAM,EAAE,QAAQ;IAChB,OAAO,EAAE,SAAS;IAClB,MAAM,EAAE,QAAQ;IAChB,UAAU,EAAE,YAAY;IACxB,QAAQ,EAAE,UAAU;IACpB,OAAO,EAAE,SAAS;IAClB,SAAS,EAAE,WAAW;IACtB,QAAQ,EAAE,QAAQ;IAClB,iBAAiB,EAAE,MAAM;IACzB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACjB,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,wEAAwE;AACxE,iEAAiE;AACjE,2EAA2E;AAC3E,6CAA6C;AAC7C,cAAc,QAAQ,CAAC;AACvB,OAAO,EAAE,OAAO,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC"}
package/dist/lite.d.ts ADDED
@@ -0,0 +1,225 @@
1
+ export { DEFAULT_ENABLEMENT_WINDOW_MONTHS, defaultEnabledModelIds, type EnablementCandidate, autoSeedDefaultModel, autoSeedableModels, bedrockInferenceProfileRank, } from './enablement.js';
2
+ export interface ProviderAuthMethod {
3
+ /** Optional label, surfaced only if a provider ever exposes >1 method in the UI (none do today — the connect form always uses methods[0]). */
4
+ label?: string;
5
+ /** Every one of these project-secret env vars must be set for this method to count as satisfied. */
6
+ envVars: string[];
7
+ }
8
+ export interface ProviderAuthRequirement {
9
+ /**
10
+ * One or more independent ways to authenticate. A provider is CONNECTED if
11
+ * ANY method's envVars are all present — see `isProviderAuthSatisfied`.
12
+ */
13
+ methods: ProviderAuthMethod[];
14
+ }
15
+ interface CatalogProviderLike {
16
+ id: string;
17
+ env?: string[];
18
+ }
19
+ /**
20
+ * The auth requirement Kortix actually enforces for a catalog provider.
21
+ * Falls back to a single method requiring every var in `provider.env`
22
+ * (unchanged behavior) unless an override above corrects it.
23
+ */
24
+ export declare function providerAuthRequirement(provider: CatalogProviderLike): ProviderAuthRequirement;
25
+ /**
26
+ * The env vars the connect form should collect for a provider — always the
27
+ * first (primary) auth method. Every provider has exactly one usable method
28
+ * today; this is the field list `ApiKeyConnectForm` renders and writes.
29
+ */
30
+ export declare function primaryAuthEnvVars(provider: CatalogProviderLike): string[];
31
+ /**
32
+ * True when at least one of the requirement's auth methods has every one of
33
+ * its env vars present, per `hasEnvVar`. ANY-OF-methods, ALL-OF-vars-within-
34
+ * a-method — the one predicate every "is this provider connected" check
35
+ * (web connect modal, model-selector gating, native-mode provider merge, CLI
36
+ * `providers ls`) should use instead of hand-rolling `envVars.every(...)`
37
+ * over the raw catalog list.
38
+ */
39
+ export declare function isProviderAuthSatisfied(requirement: ProviderAuthRequirement, hasEnvVar: (envVar: string) => boolean): boolean;
40
+ export interface CatalogReasoningOption {
41
+ type: string;
42
+ values?: string[];
43
+ min?: number;
44
+ max?: number;
45
+ }
46
+ export interface CatalogCostTier {
47
+ input?: number;
48
+ output?: number;
49
+ cache_read?: number;
50
+ cache_write?: number;
51
+ tier?: {
52
+ type: string;
53
+ size: number;
54
+ };
55
+ }
56
+ export interface CatalogCost {
57
+ input?: number;
58
+ output?: number;
59
+ cache_read?: number;
60
+ cache_write?: number;
61
+ tiers?: CatalogCostTier[];
62
+ context_over_200k?: CatalogCostTier;
63
+ }
64
+ export interface CatalogModalities {
65
+ input?: string[];
66
+ output?: string[];
67
+ }
68
+ export interface CatalogModel {
69
+ id: string;
70
+ name: string;
71
+ released?: string | null;
72
+ status?: string;
73
+ description?: string;
74
+ attachment?: boolean;
75
+ reasoning?: boolean;
76
+ reasoning_options?: CatalogReasoningOption[];
77
+ tool_call?: boolean;
78
+ temperature?: boolean;
79
+ structured_output?: boolean;
80
+ interleaved?: boolean | {
81
+ field?: string;
82
+ };
83
+ open_weights?: boolean;
84
+ knowledge?: string;
85
+ last_updated?: string;
86
+ family?: string;
87
+ modalities?: CatalogModalities;
88
+ limit?: {
89
+ context?: number;
90
+ input?: number;
91
+ output?: number;
92
+ };
93
+ cost?: CatalogCost;
94
+ }
95
+ /** Generic per-model generation defaults a project can configure. Extensible
96
+ * without a schema/migration change — see packages/db's jsonb column. */
97
+ export interface GenerationConfig {
98
+ reasoningEffort?: string;
99
+ temperature?: number;
100
+ topP?: number;
101
+ maxOutputTokens?: number;
102
+ }
103
+ export interface GenerationControlCapabilities {
104
+ /**
105
+ * Present iff the model publishes a REAL reasoning_options knob — from
106
+ * EITHER an `effort` entry (its exact `values`) OR a `budget_tokens` entry
107
+ * (a synthesized standard low/medium/high tier set — `budget_tokens` has no
108
+ * discrete values of its own, but it IS a real published knob, e.g. every
109
+ * mainline Claude model, which the transport maps via
110
+ * `resolveAnthropicThinkingBudget`/`REASONING_EFFORT_BUDGET_TOKENS`
111
+ * — so exposing an effort-style control for it is not fabrication the way
112
+ * inventing one for a bare `reasoning:true` model with NO reasoning_options
113
+ * at all would be). A `toggle` entry gets no control here (on/off is not an
114
+ * effort enum) but does not crash — see the `toggle` branch below. Absent
115
+ * entirely when the model publishes no real reasoning_options at all (we
116
+ * never fabricate one out of thin air).
117
+ */
118
+ reasoningEffort?: {
119
+ values: string[];
120
+ };
121
+ /** True iff the model accepts a client-supplied temperature (models.dev
122
+ * `temperature:false` means FIXED — e.g. gpt-5.6-sol — hide the control). */
123
+ temperature: boolean;
124
+ /** top_p has no distinct models.dev flag — gated on the same standard-
125
+ * sampling capability as temperature (documented heuristic: models that
126
+ * reject a custom temperature reject a custom top_p too). */
127
+ topP: boolean;
128
+ /** Present iff the model declares a positive max output-token window —
129
+ * the ceiling a "max output tokens" control must clamp to. */
130
+ maxOutputTokens?: {
131
+ ceiling: number;
132
+ };
133
+ }
134
+ /** Pure capability derivation — NEVER a per-model id lookup table. */
135
+ export declare function generationControlCapabilities(model: CatalogModel | undefined | null): GenerationControlCapabilities;
136
+ /**
137
+ * Drop/clamp every field of a (possibly user- or client-supplied)
138
+ * `GenerationConfig` against what `model` actually supports — the single
139
+ * gate BOTH the routing-policy write path (persistence) and the gateway
140
+ * resolution-layer injection path (see apps/api's routing/resolve-route.ts)
141
+ * must run a value through before it's trusted. A field the model doesn't
142
+ * support is silently dropped (never a validation error) so a model swap
143
+ * doesn't require the caller to also scrub unrelated config.
144
+ */
145
+ export declare function clampGenerationConfig(config: GenerationConfig | null | undefined, model: CatalogModel | undefined | null): GenerationConfig;
146
+ interface CatalogProvider {
147
+ id: string;
148
+ name: string;
149
+ env?: string[];
150
+ doc?: string;
151
+ api?: string | null;
152
+ npm?: string | null;
153
+ models: CatalogModel[];
154
+ }
155
+ export interface Catalog {
156
+ source: string;
157
+ fetched_at: string;
158
+ provider_count: number;
159
+ model_count: number;
160
+ providers: CatalogProvider[];
161
+ }
162
+ /**
163
+ * `{ id, env }` for every provider in `CATALOG`, in the same order — the only
164
+ * catalog fields `providerAuthRequirement` reads. ~8 KB instead of the ~7.6 MB
165
+ * snapshot, for browser code that needs provider credentials but no models.
166
+ * Regenerated together with the snapshot; catalog-isolation.test.ts checks
167
+ * that the two agree.
168
+ */
169
+ export declare const CATALOG_PROVIDER_ENV: ReadonlyArray<{
170
+ id: string;
171
+ env: string[];
172
+ }>;
173
+ export interface ManagedModel {
174
+ id: string;
175
+ name: string;
176
+ upstreamModelId: string;
177
+ transport: 'openrouter';
178
+ morphModelId?: string;
179
+ morphPricing?: {
180
+ inputPerMillion: number;
181
+ cachedInputPerMillion?: number;
182
+ outputPerMillion: number;
183
+ };
184
+ openrouterEndpointPricing?: Record<string, {
185
+ inputPerMillion: number;
186
+ cachedInputPerMillion: number;
187
+ outputPerMillion: number;
188
+ }>;
189
+ providerBrand?: string;
190
+ pricingRef: string;
191
+ pricing?: {
192
+ inputPerMillion: number;
193
+ outputPerMillion: number;
194
+ cachedInputPerMillion?: number;
195
+ cacheWritePerMillion?: number;
196
+ contextOver200k?: {
197
+ inputPerMillion: number;
198
+ outputPerMillion: number;
199
+ cachedInputPerMillion?: number;
200
+ cacheWritePerMillion?: number;
201
+ contextThreshold: number;
202
+ };
203
+ };
204
+ tier: 'flagship' | 'balanced' | 'fast';
205
+ vision: boolean;
206
+ reasoningOptions?: CatalogReasoningOption[];
207
+ limit: {
208
+ context: number;
209
+ output: number;
210
+ };
211
+ openrouterProvider?: Record<string, unknown>;
212
+ }
213
+ export declare function pricingRefLookupCandidates(pricingRef: string): string[];
214
+ export declare const VERIFIED_US_MANAGED_ENDPOINTS: readonly ["coreweave/fp8", "decart/fp4", "coreweave/nvfp4", "fireworks/us"];
215
+ export declare const MANAGED_ENDPOINT_PROVIDERS: Record<(typeof VERIFIED_US_MANAGED_ENDPOINTS)[number] | 'morph', string>;
216
+ export declare const MANAGED_MODELS: ManagedModel[];
217
+ export declare function getManagedModel(id: string): ManagedModel | undefined;
218
+ export declare function isManagedModelId(id: string): boolean;
219
+ export declare const DEFAULT_MANAGED_MODEL_IDS: string[];
220
+ export declare const MANAGED_FLAGSHIP_MODEL_ID: string;
221
+ /** Concrete Kortix-managed default used when no account or project default exists. */
222
+ export declare const PLATFORM_DEFAULT_MODEL_ID = "deepseek-v4.1-flash";
223
+ export declare const MODEL_SELECTOR_PROVIDER_IDS: readonly ["kortix", "opencode", "anthropic", "openai", "github-copilot", "google", "openrouter", "vercel"];
224
+ export declare const PROVIDER_LABELS: Record<string, string>;
225
+ //# sourceMappingURL=lite.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lite.d.ts","sourceRoot":"","sources":["../src/lite.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,gCAAgC,EAChC,sBAAsB,EACtB,KAAK,mBAAmB,EACxB,oBAAoB,EACpB,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,cAAc,CAAC;AA2EtB,MAAM,WAAW,kBAAkB;IACjC,8IAA8I;IAC9I,KAAK,CA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wBAAgB,0BAA0B,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CASvE;AAkBD,eAAO,MAAM,6BAA6B,6EAEhC,CAAC;AAKX,eAAO,MAAM,0BAA0B,EAAE,MAAM,CAAC,CAAC,OAAO,6BAA6B,CAAC,CAAC,MAAM,CAAC,GAAG,OAAO,EAAE,MAAM,CAG/G,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,YAAY,EAiDxC,CAAC;AAIF,wBAAgB,eAAe,CAAC,EAAE,EAAE,MAAM,GAAG,YAAY,GAAG,SAAS,CAEpE;AAED,wBAAgB,gBAAgB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAEpD;AAED,eAAO,MAAM,yBAAyB,UAAkC,CAAC;AAEzE,eAAO,MAAM,yBAAyB,QAElC,CAAC;AAEL,sFAAsF;AACtF,eAAO,MAAM,yBAAyB,wBAAwB,CAAC;AAE/D,eAAO,MAAM,2BAA2B,4GAS9B,CAAC;AAEX,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAuFlD,CAAC"}
package/dist/lite.js ADDED
@@ -0,0 +1,346 @@
1
+ import providerEnvJson from './provider-env.generated.json' with { type: 'json' };
2
+ export { DEFAULT_ENABLEMENT_WINDOW_MONTHS, defaultEnabledModelIds, autoSeedDefaultModel, autoSeedableModels, bedrockInferenceProfileRank, } from './enablement.js';
3
+ const PROVIDER_AUTH_REQUIREMENT_OVERRIDES = {
4
+ 'amazon-bedrock': {
5
+ methods: [
6
+ {
7
+ label: 'Bearer token',
8
+ // See the module doc comment above for the full trail. When SigV4
9
+ // signing lands, ADD a second method here (e.g. `{ label: 'IAM
10
+ // access key', envVars: ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY',
11
+ // 'AWS_REGION'] }`) — do not replace this one; existing bearer-token
12
+ // connections must keep working.
13
+ envVars: ['AWS_BEARER_TOKEN_BEDROCK', 'AWS_REGION'],
14
+ },
15
+ ],
16
+ },
17
+ google: {
18
+ methods: [
19
+ // GOOGLE_GENERATIVE_AI_API_KEY first: the name @ai-sdk/google's own
20
+ // docs lead with, and what Kortix's CLI/UI have always written when
21
+ // connecting Google — kept as the connect form's primary field.
22
+ { envVars: ['GOOGLE_GENERATIVE_AI_API_KEY'] },
23
+ { envVars: ['GOOGLE_API_KEY'] },
24
+ { envVars: ['GEMINI_API_KEY'] },
25
+ ],
26
+ },
27
+ };
28
+ /**
29
+ * The auth requirement Kortix actually enforces for a catalog provider.
30
+ * Falls back to a single method requiring every var in `provider.env`
31
+ * (unchanged behavior) unless an override above corrects it.
32
+ */
33
+ export function providerAuthRequirement(provider) {
34
+ const override = PROVIDER_AUTH_REQUIREMENT_OVERRIDES[provider.id];
35
+ if (override)
36
+ return override;
37
+ const env = provider.env ?? [];
38
+ return { methods: env.length > 0 ? [{ envVars: env }] : [] };
39
+ }
40
+ /**
41
+ * The env vars the connect form should collect for a provider — always the
42
+ * first (primary) auth method. Every provider has exactly one usable method
43
+ * today; this is the field list `ApiKeyConnectForm` renders and writes.
44
+ */
45
+ export function primaryAuthEnvVars(provider) {
46
+ return providerAuthRequirement(provider).methods[0]?.envVars ?? [];
47
+ }
48
+ /**
49
+ * True when at least one of the requirement's auth methods has every one of
50
+ * its env vars present, per `hasEnvVar`. ANY-OF-methods, ALL-OF-vars-within-
51
+ * a-method — the one predicate every "is this provider connected" check
52
+ * (web connect modal, model-selector gating, native-mode provider merge, CLI
53
+ * `providers ls`) should use instead of hand-rolling `envVars.every(...)`
54
+ * over the raw catalog list.
55
+ */
56
+ export function isProviderAuthSatisfied(requirement, hasEnvVar) {
57
+ return requirement.methods.some((method) => method.envVars.length > 0 && method.envVars.every(hasEnvVar));
58
+ }
59
+ // The standard effort tiers synthesized for a `budget_tokens`-shaped
60
+ // reasoning_options entry (no discrete `values` of its own to mirror). Chosen
61
+ // to match `REASONING_EFFORT_BUDGET_TOKENS`'s well-known low/medium/high keys
62
+ // (packages/llm-gateway/src/transports/ai-sdk/request.ts) so every value this
63
+ // control can offer resolves to a real thinking-token budget downstream —
64
+ // never an effort label the transport wouldn't know what to do with.
65
+ const BUDGET_TOKENS_EFFORT_TIERS = ['low', 'medium', 'high'];
66
+ /** Pure capability derivation — NEVER a per-model id lookup table. */
67
+ export function generationControlCapabilities(model) {
68
+ if (!model)
69
+ return { temperature: false, topP: false };
70
+ // Only expose an effort control when the model publishes a REAL
71
+ // reasoning_options entry — never fabricate one for a model that publishes
72
+ // none. Two shapes yield a control (see the field doc above): `effort`
73
+ // (its own exact values) and `budget_tokens` (synthesized standard tiers —
74
+ // it has no discrete values, but it's a real published knob, e.g. every
75
+ // mainline Claude model). A `toggle` entry matches neither branch below and
76
+ // falls through to `undefined` — deliberately: on/off isn't an effort enum,
77
+ // and there's no separate toggle-control surface wired today, so this is
78
+ // the "don't crash, don't fabricate" no-op for it.
79
+ const effortOption = model.reasoning_options?.find((option) => option.type === 'effort');
80
+ const budgetTokensOption = model.reasoning_options?.find((option) => option.type === 'budget_tokens');
81
+ const reasoningEffort = effortOption?.values?.length
82
+ ? { values: effortOption.values }
83
+ : budgetTokensOption
84
+ ? { values: [...BUDGET_TOKENS_EFFORT_TIERS] }
85
+ : undefined;
86
+ const temperature = model.temperature === true;
87
+ const ceiling = model.limit?.output;
88
+ const maxOutputTokens = typeof ceiling === 'number' && ceiling > 0 ? { ceiling } : undefined;
89
+ return {
90
+ reasoningEffort,
91
+ temperature,
92
+ topP: temperature,
93
+ maxOutputTokens,
94
+ };
95
+ }
96
+ /**
97
+ * Drop/clamp every field of a (possibly user- or client-supplied)
98
+ * `GenerationConfig` against what `model` actually supports — the single
99
+ * gate BOTH the routing-policy write path (persistence) and the gateway
100
+ * resolution-layer injection path (see apps/api's routing/resolve-route.ts)
101
+ * must run a value through before it's trusted. A field the model doesn't
102
+ * support is silently dropped (never a validation error) so a model swap
103
+ * doesn't require the caller to also scrub unrelated config.
104
+ */
105
+ export function clampGenerationConfig(config, model) {
106
+ if (!config)
107
+ return {};
108
+ const caps = generationControlCapabilities(model);
109
+ const out = {};
110
+ if (typeof config.reasoningEffort === 'string' &&
111
+ caps.reasoningEffort?.values.includes(config.reasoningEffort)) {
112
+ out.reasoningEffort = config.reasoningEffort;
113
+ }
114
+ if (typeof config.temperature === 'number' &&
115
+ caps.temperature &&
116
+ Number.isFinite(config.temperature)) {
117
+ out.temperature = Math.min(2, Math.max(0, config.temperature));
118
+ }
119
+ if (typeof config.topP === 'number' && caps.topP && Number.isFinite(config.topP)) {
120
+ out.topP = Math.min(1, Math.max(0, config.topP));
121
+ }
122
+ if (typeof config.maxOutputTokens === 'number' &&
123
+ caps.maxOutputTokens &&
124
+ Number.isFinite(config.maxOutputTokens)) {
125
+ out.maxOutputTokens = Math.min(caps.maxOutputTokens.ceiling, Math.max(1, Math.floor(config.maxOutputTokens)));
126
+ }
127
+ return out;
128
+ }
129
+ // The bundled models.dev snapshot (~7.6 MB of JSON) and its one reader live in
130
+ // `catalog-data.ts`, re-exported only by `index.ts` — never from this module, so
131
+ // a bundler that keeps every import (Metro) never sees the snapshot through
132
+ // `@kortix/llm-catalog/lite` (catalog-isolation.test.ts).
133
+ /**
134
+ * `{ id, env }` for every provider in `CATALOG`, in the same order — the only
135
+ * catalog fields `providerAuthRequirement` reads. ~8 KB instead of the ~7.6 MB
136
+ * snapshot, for browser code that needs provider credentials but no models.
137
+ * Regenerated together with the snapshot; catalog-isolation.test.ts checks
138
+ * that the two agree.
139
+ */
140
+ export const CATALOG_PROVIDER_ENV = providerEnvJson;
141
+ // A managed model's `pricingRef` is supposed to be the model's real
142
+ // models.dev id, but Kortix's own display id is dotted (`claude-opus-4.8`)
143
+ // while models.dev Claude ids are dashed (`claude-opus-4-8`) — a mismatch
144
+ // here silently misses the models.dev lookup and falls back to a permissive
145
+ // synthetic capability record (no reasoning_options, temperature always
146
+ // true), which is wrong for real models. Consumers doing a `provider/model`
147
+ // lookup by `pricingRef` should try these candidates in order rather than
148
+ // a single exact match, so a dotted/dashed slip degrades gracefully instead
149
+ // of silently losing real capability data.
150
+ export function pricingRefLookupCandidates(pricingRef) {
151
+ const slash = pricingRef.indexOf('/');
152
+ if (slash <= 0)
153
+ return [pricingRef];
154
+ const providerId = pricingRef.slice(0, slash);
155
+ const modelId = pricingRef.slice(slash + 1);
156
+ const candidates = [pricingRef];
157
+ const dashed = `${providerId}/${modelId.replace(/\./g, '-')}`;
158
+ if (dashed !== pricingRef)
159
+ candidates.push(dashed);
160
+ return candidates;
161
+ }
162
+ // Managed IDs are bare gateway model IDs. OpenCode uses `kortix/<id>`, so the
163
+ // picker shows Kortix whichever upstream serves the request.
164
+ //
165
+ // Models selected by MORPH_MANAGED_MODELS try Morph direct first. Every model
166
+ // has an OpenRouter endpoint pool. Each pool lists
167
+ // only endpoints that, on 2026-09-24, were in
168
+ // OpenRouter's ZDR feed, had a CONFIRMED US datacenter (US headquarters plus US
169
+ // datacenters in /api/v1/providers, or a `/us` endpoint tag), and answered pinned
170
+ // text and image probes. US headquarters alone does not qualify. `allow_fallbacks: true` lets OpenRouter move between pool members;
171
+ // `only` keeps it inside the pool. `max_price` (USD per 1M tokens) excludes premium
172
+ // tiers. packages/llm-catalog/README.md records the probe results.
173
+ // Vision is explicit per model so the picker and runtime reject image input for text-only models.
174
+ const OPENROUTER_POOL_PRIVACY = { allow_fallbacks: true, zdr: true, data_collection: 'deny' };
175
+ // Checked against OpenRouter's ZDR and provider-location feeds on 2026-09-26.
176
+ // Resolver uses this list for operator overlays too; an unknown endpoint fails closed.
177
+ export const VERIFIED_US_MANAGED_ENDPOINTS = [
178
+ 'coreweave/fp8', 'decart/fp4', 'coreweave/nvfp4', 'fireworks/us',
179
+ ];
180
+ // Customer-facing name of the US inference provider behind each route. The
181
+ // picker shows this name, never the aggregator or the quantization tag.
182
+ // `morph` is the direct Morph route (off by default; see MORPH_MANAGED_MODELS).
183
+ export const MANAGED_ENDPOINT_PROVIDERS = {
184
+ 'coreweave/fp8': 'CoreWeave', 'decart/fp4': 'Decart', 'coreweave/nvfp4': 'CoreWeave', 'fireworks/us': 'Fireworks',
185
+ morph: 'Morph',
186
+ };
187
+ export const MANAGED_MODELS = [
188
+ {
189
+ id: 'deepseek-v4.1-flash', name: 'DeepSeek V4.1 Flash', upstreamModelId: 'deepseek/deepseek-v4.1-flash',
190
+ transport: 'openrouter', morphModelId: 'morph-dsv41flash',
191
+ morphPricing: { inputPerMillion: 0.15, cachedInputPerMillion: 0.003, outputPerMillion: 0.6 },
192
+ pricingRef: 'openrouter/deepseek/deepseek-v4.1-flash',
193
+ pricing: { inputPerMillion: 0.2, cachedInputPerMillion: 0.03, outputPerMillion: 0.65 },
194
+ openrouterEndpointPricing: { 'coreweave/fp8': { inputPerMillion: 0.2, cachedInputPerMillion: 0.03, outputPerMillion: 0.65 } },
195
+ tier: 'balanced', vision: true, limit: { context: 1_048_576, output: 16_384 },
196
+ reasoningOptions: [{ type: 'effort', values: ['none', 'low', 'high', 'max'] }],
197
+ openrouterProvider: {
198
+ only: ['coreweave/fp8'],
199
+ ...OPENROUTER_POOL_PRIVACY,
200
+ max_price: { prompt: 0.3, completion: 1.2 },
201
+ },
202
+ },
203
+ {
204
+ id: 'glm-5.3-flash', name: 'GLM 5.3 Flash', upstreamModelId: 'z-ai/glm-5.3-flash',
205
+ transport: 'openrouter', morphModelId: 'morph-glm53flash',
206
+ morphPricing: { inputPerMillion: 0.1, cachedInputPerMillion: 0.02, outputPerMillion: 0.35 },
207
+ pricingRef: 'openrouter/z-ai/glm-5.3-flash',
208
+ pricing: { inputPerMillion: 0.15, cachedInputPerMillion: 0.05, outputPerMillion: 0.5 },
209
+ openrouterEndpointPricing: {
210
+ 'decart/fp4': { inputPerMillion: 0.1275, cachedInputPerMillion: 0.0255, outputPerMillion: 0.425 },
211
+ 'coreweave/nvfp4': { inputPerMillion: 0.15, cachedInputPerMillion: 0.05, outputPerMillion: 0.5 },
212
+ },
213
+ tier: 'fast', vision: true, limit: { context: 1_048_576, output: 16_384 },
214
+ // `none` returns 400 upstream, so GLM has no off switch.
215
+ reasoningOptions: [{ type: 'effort', values: ['low', 'high', 'max'] }],
216
+ openrouterProvider: {
217
+ only: ['decart/fp4', 'coreweave/nvfp4'],
218
+ ...OPENROUTER_POOL_PRIVACY,
219
+ max_price: { prompt: 0.15, completion: 0.5 },
220
+ },
221
+ },
222
+ {
223
+ id: 'kimi-k3', name: 'Kimi K3 2.8T', upstreamModelId: 'moonshotai/kimi-k3',
224
+ transport: 'openrouter', morphModelId: 'morph-kimik3',
225
+ morphPricing: { inputPerMillion: 2.5, cachedInputPerMillion: 0.29, outputPerMillion: 14 },
226
+ pricingRef: 'openrouter/moonshotai/kimi-k3',
227
+ pricing: { inputPerMillion: 3.3, cachedInputPerMillion: 0.33, outputPerMillion: 16.5 },
228
+ openrouterEndpointPricing: { 'fireworks/us': { inputPerMillion: 3.3, cachedInputPerMillion: 0.33, outputPerMillion: 16.5 } },
229
+ tier: 'flagship', vision: true, limit: { context: 1_048_576, output: 16_384 },
230
+ openrouterProvider: {
231
+ only: ['fireworks/us'],
232
+ ...OPENROUTER_POOL_PRIVACY,
233
+ max_price: { prompt: 3.3, completion: 16.5 },
234
+ },
235
+ },
236
+ ];
237
+ const MANAGED_BY_ID = new Map(MANAGED_MODELS.map((m) => [m.id, m]));
238
+ export function getManagedModel(id) {
239
+ return MANAGED_BY_ID.get(id);
240
+ }
241
+ export function isManagedModelId(id) {
242
+ return MANAGED_BY_ID.has(id);
243
+ }
244
+ export const DEFAULT_MANAGED_MODEL_IDS = MANAGED_MODELS.map((m) => m.id);
245
+ export const MANAGED_FLAGSHIP_MODEL_ID = (MANAGED_MODELS.find((m) => m.tier === 'flagship') ?? MANAGED_MODELS[0]).id;
246
+ /** Concrete Kortix-managed default used when no account or project default exists. */
247
+ export const PLATFORM_DEFAULT_MODEL_ID = 'deepseek-v4.1-flash';
248
+ export const MODEL_SELECTOR_PROVIDER_IDS = [
249
+ 'kortix',
250
+ 'opencode',
251
+ 'anthropic',
252
+ 'openai',
253
+ 'github-copilot',
254
+ 'google',
255
+ 'openrouter',
256
+ 'vercel',
257
+ ];
258
+ export const PROVIDER_LABELS = {
259
+ anthropic: 'Anthropic',
260
+ openai: 'OpenAI',
261
+ codex: 'ChatGPT subscription',
262
+ google: 'Google',
263
+ xai: 'xAI',
264
+ moonshotai: 'Moonshot',
265
+ 'moonshotai-cn': 'Moonshot',
266
+ opencode: 'OpenCode Zen',
267
+ kortix: 'Kortix',
268
+ firmware: 'Firmware',
269
+ // models.dev's canonical provider id is `amazon-bedrock` (see
270
+ // `PROVIDER_AUTH_REQUIREMENT_OVERRIDES` above and `catalog.generated.json`),
271
+ // and that is the id the gateway stamps onto `GatewayModel.provider`. The
272
+ // short `bedrock` alias is kept for legacy call sites, mirroring the icon
273
+ // map in apps/web's provider-branding. Missing the canonical key here is
274
+ // what made the picker label the whole Bedrock group "Kortix": the label
275
+ // lookup fell through to `FlatModel.providerName`, which is always "Kortix"
276
+ // under the gateway.
277
+ 'amazon-bedrock': 'Amazon Bedrock',
278
+ bedrock: 'Amazon Bedrock',
279
+ openrouter: 'OpenRouter',
280
+ 'github-copilot': 'GitHub Copilot',
281
+ vercel: 'Vercel',
282
+ groq: 'Groq',
283
+ deepseek: 'DeepSeek',
284
+ mistral: 'Mistral',
285
+ cohere: 'Cohere',
286
+ llama: 'Llama',
287
+ huggingface: 'Hugging Face',
288
+ cerebras: 'Cerebras',
289
+ togetherai: 'Together AI',
290
+ fireworks: 'Fireworks',
291
+ deepinfra: 'DeepInfra',
292
+ nvidia: 'NVIDIA',
293
+ cloudflare: 'Cloudflare',
294
+ azure: 'Azure',
295
+ ollama: 'Ollama',
296
+ perplexity: 'Perplexity',
297
+ lmstudio: 'LM Studio',
298
+ v0: 'v0',
299
+ wandb: 'W&B',
300
+ baseten: 'Baseten',
301
+ // MiniMax is its own distinct BYOK provider (minimax.io / minimaxi.com) —
302
+ // not Moonshot. Was mislabeled 'Moonshot' for both regional variants.
303
+ minimax: 'MiniMax',
304
+ 'minimax-cn': 'MiniMax',
305
+ siliconflow: 'SiliconFlow',
306
+ 'siliconflow-cn': 'SiliconFlow',
307
+ zhipuai: 'ZhipuAI',
308
+ 'zhipuai-cn': 'ZhipuAI',
309
+ 'google-vertex': 'Google Vertex',
310
+ 'google-vertex-anthropic': 'Vertex Anthropic',
311
+ 'azure-cognitive-services': 'Azure Cognitive',
312
+ 'cloudflare-ai-gateway': 'Cloudflare Gateway',
313
+ 'github-models': 'GitHub Models',
314
+ 'ollama-cloud': 'Ollama Cloud',
315
+ 'kai Coding Plan': 'AI21',
316
+ zaicodingplan: 'AI21',
317
+ venice: 'Venice',
318
+ upstage: 'Upstage',
319
+ nebius: 'Nebius',
320
+ vultr: 'Vultr',
321
+ friendli: 'Friendli',
322
+ poe: 'Poe',
323
+ requesty: 'Requesty',
324
+ 'sap-ai-core': 'SAP AI Core',
325
+ scaleway: 'Scaleway',
326
+ inception: 'Inception',
327
+ morph: 'Morph',
328
+ abacus: 'Abacus',
329
+ bailing: 'Bailing',
330
+ chutes: 'Chutes',
331
+ fastrouter: 'FastRouter',
332
+ helicone: 'Helicone',
333
+ iflowcn: 'iFlytek',
334
+ inference: 'Inference',
335
+ 'io-net': 'IO.net',
336
+ 'kimi-for-coding': 'Kimi',
337
+ lucidquery: 'LucidQuery',
338
+ modelscope: 'ModelScope',
339
+ 'nano-gpt': 'NanoGPT',
340
+ ovhcloud: 'OVHcloud',
341
+ submodel: 'Submodel',
342
+ synthetic: 'Synthetic',
343
+ xiaomi: 'Xiaomi',
344
+ zenmux: 'Zenmux',
345
+ };
346
+ //# sourceMappingURL=lite.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"lite.js","sourceRoot":"","sources":["../src/lite.ts"],"names":[],"mappings":"AAAA,OAAO,eAAe,MAAM,+BAA+B,CAAC,OAAO,IAAI,EAAE,MAAM,EAAE,CAAC;AAElF,OAAO,EACL,gCAAgC,EAChC,sBAAsB,EAEtB,oBAAoB,EACpB,kBAAkB,EAClB,2BAA2B,GAC5B,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ClB,iBAAiB,EAAE,MAAM;IACzB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,YAAY;IACxB,UAAU,EAAE,SAAS;IACrB,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,SAAS,EAAE,WAAW;IACtB,MAAM,EAAE,QAAQ;IAChB,MAAM,EAAE,QAAQ;CACjB,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kortix/llm-catalog",
3
- "version": "0.13.40",
3
+ "version": "0.13.41",
4
4
  "description": "The Kortix LLM model catalog — the models the Kortix gateway supports and the managed-model set and defaults. Generated from models.dev; consumed across the Kortix platform and by the @kortix/sdk.",
5
5
  "license": "Elastic-2.0",
6
6
  "homepage": "https://github.com/kortix-ai/suna/tree/main/packages/llm-catalog",
@@ -23,6 +23,10 @@
23
23
  ".": {
24
24
  "types": "./dist/index.d.ts",
25
25
  "import": "./dist/index.js"
26
+ },
27
+ "./lite": {
28
+ "types": "./dist/lite.d.ts",
29
+ "import": "./dist/lite.js"
26
30
  }
27
31
  },
28
32
  "publishConfig": {