@kortix/llm-catalog 0.13.30 → 0.13.31

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/README.md CHANGED
@@ -4,21 +4,67 @@ This package supplies the bundled provider catalog and the Kortix managed model
4
4
 
5
5
  ## Managed models
6
6
 
7
- The managed lineup uses OpenRouter routes pinned to named zero-data-retention endpoints. The model picker groups every managed model under **Kortix**. Requests use Kortix credits. Project BYOK providers remain separate.
7
+ The picker groups every managed model under **Kortix**, and the provider is always Kortix. Requests use Kortix credits. Project BYOK providers remain separate.
8
8
 
9
- | Picker name | Gateway model ID | Input | USD per 1M input / cached input / output tokens |
10
- | --- | --- | --- | --- |
11
- | DeepSeek V4.1 Flash (default) | `deepseek-v4.1-flash` | Text, image | $0.20 / $0.006 / $0.60 |
12
- | GLM-5.3-Flash | `glm-5.3-flash` | Text, image | $0.15 / $0.05 / $0.50 |
13
- | Kimi K3 2.8T | `kimi-k3` | Text, image | $2.50 / $0.25 / $10.95 |
9
+ | Picker name | Gateway model ID | Morph model ID | Input | USD per 1M input / cached input / output tokens |
10
+ | --- | --- | --- | --- | --- |
11
+ | DeepSeek V4.1 Flash (default) | `deepseek-v4.1-flash` | `morph-dsv41flash` | Text, image | $0.15 / $0.0359375 / $0.60 |
12
+ | GLM-5.3-Flash | `glm-5.3-flash` | `morph-glm53flash` | Text, image | $0.10 / $0.02 / $0.35 |
13
+ | Kimi K3 2.8T | `kimi-k3` | `morph-kimik3` | Text, image | $2.50 / $0.29 / $14.00 |
14
14
 
15
- The prices match the pinned [OpenRouter endpoints](https://openrouter.ai/api/v1/endpoints/zdr) on 2026-09-18. All rates exclude Kortix credit markup.
15
+ The prices are Morph's list prices on 2026-09-24 (`https://docs.morphllm.com/llms.txt`). Morph publishes no cached rate for DeepSeek V4.1 Flash; the table uses its DeepSeek V4 Flash cached rate. All rates exclude Kortix credit markup.
16
16
 
17
- The OpenCode reference is `kortix/<gateway model ID>`. The bundled sandbox fallback uses the same IDs and capabilities. All entries require `OPENROUTER_API_KEY`.
17
+ The OpenCode reference is `kortix/<gateway model ID>`. The bundled sandbox fallback (`MINIMAL_FALLBACK_MODELS`) uses the same IDs, prices, and capabilities.
18
18
 
19
- DeepSeek V4.1 Flash uses `deepinfra/fp8`; Kimi K3 uses `wafer`; GLM-5.3-Flash uses `coreweave/nvfp4`. Every route sets `zdr: true`, `data_collection: deny`, and `allow_fallbacks: false`. All three exact model/endpoint pairs appeared in OpenRouter's ZDR endpoint feed on 2026-09-18. Kimi K3 returned HTTP 200 for text and image requests on the pinned Wafer route. On 2026-09-18, pinned GLM requests returned HTTP 429 `rate_limit_exceeded` from CoreWeave's shared pool. DeepSeek V4.1 Flash remains the default until a pinned GLM text and image request succeeds with the deployment key.
19
+ ### Routing: Morph first, OpenRouter pool second
20
20
 
21
- The public Morph feed lists a different GLM-5.3-Flash endpoint (`morph-glm53flash`) at $0.10 / $0.02 / $0.35. On 2026-09-17, the supplied Morph key received HTTP 400 `invalid_request_error` for that ID. MiniMax M3 and Qwen 3.8 27B are absent from that feed and returned HTTP 400. GLM-5.3 744B accepts only text input and is excluded.
21
+ 1. The gateway sends the request to Morph's OpenAI-compatible API (`MORPH_API_URL`, `MORPH_API_KEY`) with the Morph model ID.
22
+ 2. When Morph fails before any output (non-2xx status or network error), the gateway sends the same request to OpenRouter (`OPENROUTER_API_KEY`) with the OpenRouter model ID. The descriptor field `failover: true` enables this; `packages/llm-gateway/src/pipeline/simple-handler.ts` implements it. BYOK descriptors never set it.
23
+ 3. OpenRouter routes inside the model's endpoint pool: `only` lists the pool, `allow_fallbacks: true` lets OpenRouter move to the next pool member on an endpoint error, `zdr: true` and `data_collection: deny` are forced by the gateway, and `max_price` (USD per 1M tokens) excludes premium tiers.
24
+
25
+ A failure after output has started is not retried. The client receives the stream error.
26
+
27
+ Billing: a Morph request bills the table above. An OpenRouter request bills OpenRouter's reported `usage.cost` for the endpoint that served it, so a fallback costs at most `max_price`.
28
+
29
+ A deployment with only one of the two keys serves managed models through that provider alone.
30
+
31
+ ### OpenRouter fallback pools
32
+
33
+ Every pool member has a **confirmed US datacenter**. OpenRouter lists the provider's headquarters AND datacenters as US (`/api/v1/providers`), or the endpoint tag names the US region (`/us`). US headquarters alone does not qualify. Every member is also in OpenRouter's ZDR endpoint feed (`/api/v1/endpoints/zdr`), checked on 2026-09-24.
34
+
35
+ | Model | Pool (`only`) | `max_price` prompt / completion |
36
+ | --- | --- | --- |
37
+ | DeepSeek V4.1 Flash | `morph`, `coreweave/fp8` | $0.30 / $1.20 |
38
+ | GLM-5.3-Flash | `morph`, `decart/fp4`, `coreweave/nvfp4`, `sail-research/us` | $0.15 / $0.50 |
39
+ | Kimi K3 2.8T | `morph`, `fireworks/us` | $3.30 / $16.50 |
40
+
41
+ Probe results on 2026-09-24, as pools with `allow_fallbacks: true`:
42
+ - 30 of 30 text and image requests returned HTTP 200.
43
+ - OpenRouter routes by price, so `morph` serves most requests.
44
+
45
+ Known limits:
46
+ - `sail-research/us` serves GLM text only. OpenRouter skips it for image requests.
47
+ - `coreweave/fp8` twice answered a DeepSeek image request as if no image was sent. It stays because it is the only other US-datacenter DeepSeek endpoint. A request reaches it only after Morph direct and Morph through OpenRouter both fail.
48
+ - `coreweave/nvfp4` returns HTTP 429 from a shared pool most of the time; see below.
49
+ - `decart/fp4` is fp4 quantization.
50
+
51
+ Excluded on 2026-09-24:
52
+ - **US headquarters without a confirmed US datacenter:** `wafer`, `together`, `parasail/*`, `io-net/fp8`, `novita/fp8`, `phala*`, `baseten/fp8`, `fireworks`, `deepinfra/*`, `modal*`, `inference-net/fp4`, `open-inference/fp4`, `crusoe/fp4`, `krea/fp8`, `sail-research/fp4`.
53
+ - **Non-US or unknown location:** `z-ai/fp8` (SG), `siliconflow/fp8` (US datacenters, SG headquarters), `inceptron/fp8` (FI), `nextbit/fp8` (ES), `moonshotai/mxfp4` (SG), `dekallm` (ID), `relace`, `near-ai/fp8`, `digitalocean`, `reka`, `makora`.
54
+ - **Image input rejected (HTTP 400):** `venice` (GLM) and `venice/fp8` (DeepSeek).
55
+ - **Above `max_price`:** `morph/fast` for Kimi ($6.00 / $22.50).
56
+
57
+ ### Why GLM-5.3-Flash failed before 2026-09-24
58
+
59
+ The route pinned one endpoint (`only: ['coreweave/nvfp4']`, `allow_fallbacks: false`). CoreWeave serves OpenRouter's non-BYOK traffic from a shared pool. On 2026-09-24 that pool returned HTTP 429 `rate_limit_exceeded` (`limit_source: upstream_provider_shared_pool`) for 11 of 15 requests that OpenRouter routed to it. With a single pin and no fallback, every such 429 reached the user. The same 429 was recorded on 2026-09-18.
60
+
61
+ ### OpenAI and Anthropic models are not managed
62
+
63
+ The managed lineup offers open-weight models only. OpenAI and Anthropic models reach members through BYOK (`openai/<id>`, `anthropic/<id>`) or a ChatGPT plan (`codex/<id>`). They never bill Kortix credits. `src/managed.test.ts` fails when a managed entry routes to an `openai/` or `anthropic/` upstream. Claude Opus 5.5, GPT-6 Sol, and GPT-6 Luna were added as managed on 2026-09-24 (#7561) and removed the same day.
64
+
65
+ `CATALOG` carries the models.dev records for `openai/gpt-6-sol`, `openai/gpt-6-luna`, `anthropic/claude-opus-5-5`, and their three OpenRouter ids. The BYOK and ChatGPT routes take reasoning effort, modalities, and `temperature` from them. The ChatGPT lineup (`apps/api/src/llm-gateway/models/codex-models.ts`) offers `codex/gpt-6-sol` and `codex/gpt-6-luna`.
66
+
67
+ GLM-5.3 744B accepts only text input and is excluded.
22
68
 
23
69
  DeepSeek V4 Flash 0731 and DeepSeek V4 Pro 0813 remain excluded. DeepSeek reports that V4.1 Flash supersedes V4 Pro for performance, cost, speed, and task completion.
24
70
 
@@ -28,7 +74,7 @@ Qwen3.8 Max 0902 remains excluded. On 2026-09-21, OpenRouter listed one `alibaba
28
74
 
29
75
  ## Catalog
30
76
 
31
- `CATALOG` is the bundled models.dev snapshot. `MANAGED_MODELS` contains the managed lineup. `PLATFORM_DEFAULT_MODEL_ID` is `deepseek-v4.1-flash`. The runtime catalog refreshes from the configured models.dev URL.
77
+ `CATALOG` is the bundled models.dev snapshot. It lives in `src/catalog-data.ts`, not in `index.ts`, so a bundler drops the ~7.6 MB JSON for consumers that never read `CATALOG` or `catalogModelForWireModel`. `MANAGED_MODELS` contains the managed lineup. `PLATFORM_DEFAULT_MODEL_ID` is `deepseek-v4.1-flash`. The runtime catalog refreshes from the configured models.dev URL.
32
78
 
33
79
  ## License
34
80
 
@@ -0,0 +1,30 @@
1
+ import type { Catalog, CatalogModel } from './index.js';
2
+ /**
3
+ * The bundled models.dev snapshot. Kept out of `index.ts` so consumers that
4
+ * never read it (browser bundles) do not ship it — see
5
+ * catalog-isolation.test.ts.
6
+ */
7
+ export declare const CATALOG: Catalog;
8
+ /**
9
+ * Resolve a gateway WIRE model id to its full `CatalogModel` — the capability
10
+ * record `generationControlCapabilities`/`clampGenerationConfig` gate against.
11
+ * The CANONICAL wire-id → model resolver: it stitches together the three id
12
+ * shapes a gateway request can carry, so a caller never has to string-split
13
+ * `<provider>/<model>` or special-case managed slugs itself.
14
+ *
15
+ * - `codex/<id>` → the genuine OpenAI catalog entry (`openai/<id>`).
16
+ * - `<provider>/<id>` → that provider's catalog entry (BYOK models).
17
+ * - bare `<id>` → a managed slug, resolved via its `pricingRef` (the
18
+ * model's real models.dev id) so e.g. `claude-opus-4.8`
19
+ * gets Claude's real `reasoning_options`/`limit` instead
20
+ * of a permissive fallback; a synthesized minimal record
21
+ * (reasoning/tool_call/temperature all true) when the
22
+ * managed slug has no models.dev entry to borrow from.
23
+ *
24
+ * `catalog` defaults to the bundled static `CATALOG`. apps/api passes the LIVE
25
+ * models.dev snapshot instead (its own thin wrapper of the same name) so the
26
+ * host-side generation-controls clamp sees fresh capabilities; the standalone
27
+ * gateway transport, which has no runtime snapshot, uses the bundled catalog.
28
+ */
29
+ export declare function catalogModelForWireModel(wireModel: string, catalog?: Catalog): CatalogModel | undefined;
30
+ //# sourceMappingURL=catalog-data.d.ts.map
@@ -0,0 +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"}
@@ -0,0 +1,69 @@
1
+ import catalogJson from './catalog.generated.json' with { type: 'json' };
2
+ import { getManagedModel, pricingRefLookupCandidates } from './index.js';
3
+ /**
4
+ * The bundled models.dev snapshot. Kept out of `index.ts` so consumers that
5
+ * never read it (browser bundles) do not ship it — see
6
+ * catalog-isolation.test.ts.
7
+ */
8
+ export const CATALOG = catalogJson;
9
+ function modelsByWireId(catalog) {
10
+ const byId = new Map();
11
+ for (const provider of catalog.providers) {
12
+ for (const model of provider.models)
13
+ byId.set(`${provider.id}/${model.id}`, model);
14
+ }
15
+ return byId;
16
+ }
17
+ /**
18
+ * Resolve a gateway WIRE model id to its full `CatalogModel` — the capability
19
+ * record `generationControlCapabilities`/`clampGenerationConfig` gate against.
20
+ * The CANONICAL wire-id → model resolver: it stitches together the three id
21
+ * shapes a gateway request can carry, so a caller never has to string-split
22
+ * `<provider>/<model>` or special-case managed slugs itself.
23
+ *
24
+ * - `codex/<id>` → the genuine OpenAI catalog entry (`openai/<id>`).
25
+ * - `<provider>/<id>` → that provider's catalog entry (BYOK models).
26
+ * - bare `<id>` → a managed slug, resolved via its `pricingRef` (the
27
+ * model's real models.dev id) so e.g. `claude-opus-4.8`
28
+ * gets Claude's real `reasoning_options`/`limit` instead
29
+ * of a permissive fallback; a synthesized minimal record
30
+ * (reasoning/tool_call/temperature all true) when the
31
+ * managed slug has no models.dev entry to borrow from.
32
+ *
33
+ * `catalog` defaults to the bundled static `CATALOG`. apps/api passes the LIVE
34
+ * models.dev snapshot instead (its own thin wrapper of the same name) so the
35
+ * host-side generation-controls clamp sees fresh capabilities; the standalone
36
+ * gateway transport, which has no runtime snapshot, uses the bundled catalog.
37
+ */
38
+ export function catalogModelForWireModel(wireModel, catalog = CATALOG) {
39
+ if (wireModel.startsWith('codex/')) {
40
+ return modelsByWireId(catalog).get(`openai/${wireModel.slice('codex/'.length)}`);
41
+ }
42
+ const slash = wireModel.indexOf('/');
43
+ if (slash > 0) {
44
+ const providerId = wireModel.slice(0, slash);
45
+ const modelId = wireModel.slice(slash + 1);
46
+ return catalog.providers
47
+ .find((provider) => provider.id === providerId)
48
+ ?.models.find((model) => model.id === modelId);
49
+ }
50
+ const managed = getManagedModel(wireModel);
51
+ if (managed) {
52
+ const catalogById = modelsByWireId(catalog);
53
+ const byPricingRef = pricingRefLookupCandidates(managed.pricingRef)
54
+ .map((ref) => catalogById.get(ref))
55
+ .find((entry) => entry !== undefined);
56
+ if (byPricingRef)
57
+ return byPricingRef;
58
+ return {
59
+ id: managed.id,
60
+ name: managed.name,
61
+ reasoning: true,
62
+ tool_call: true,
63
+ temperature: true,
64
+ limit: managed.limit,
65
+ };
66
+ }
67
+ return undefined;
68
+ }
69
+ //# sourceMappingURL=catalog-data.js.map
@@ -0,0 +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,GAAG,CAAC,EAAE,CAAC;QACd,MAAM,UAAU,GAAG,SAAS,CAAC,KAAK,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;QAC7C,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,GAAG,CAAC,CAAC,CAAC;QAC3C,OAAO,OAAO,CAAC,SAAS;aACrB,IAAI,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,QAAQ,CAAC,EAAE,KAAK,UAAU,CAAC;YAC/C,EAAE,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,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,KAAK,EAAE,OAAO,CAAC,KAAK;SACrB,CAAC;IACJ,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC"}
@@ -2,7 +2,7 @@
2
2
  "source": "https://models.dev/api.json",
3
3
  "fetched_at": "2026-08-25T16:21:02.770Z",
4
4
  "provider_count": 200,
5
- "model_count": 7293,
5
+ "model_count": 7299,
6
6
  "providers": [
7
7
  {
8
8
  "id": "hpc-ai",
@@ -73198,6 +73198,187 @@
73198
73198
  }
73199
73199
  },
73200
73200
  "released": "2026-09-04"
73201
+ },
73202
+ {
73203
+ "id": "openai/gpt-6-sol",
73204
+ "name": "GPT-6 Sol",
73205
+ "description": "GPT model for general reasoning, writing, coding, and tool-assisted tasks",
73206
+ "released": "2026-09-22",
73207
+ "attachment": true,
73208
+ "reasoning": true,
73209
+ "reasoning_options": [
73210
+ {
73211
+ "type": "effort",
73212
+ "values": [
73213
+ "none",
73214
+ "low",
73215
+ "medium",
73216
+ "high",
73217
+ "xhigh",
73218
+ "max"
73219
+ ]
73220
+ }
73221
+ ],
73222
+ "tool_call": true,
73223
+ "structured_output": true,
73224
+ "open_weights": false,
73225
+ "temperature": false,
73226
+ "knowledge": "2026-04-20",
73227
+ "last_updated": "2026-09-22",
73228
+ "family": "gpt-sol",
73229
+ "modalities": {
73230
+ "input": [
73231
+ "text",
73232
+ "image",
73233
+ "pdf"
73234
+ ],
73235
+ "output": [
73236
+ "text"
73237
+ ]
73238
+ },
73239
+ "limit": {
73240
+ "context": 1050000,
73241
+ "input": 922000,
73242
+ "output": 128000
73243
+ },
73244
+ "cost": {
73245
+ "input": 2,
73246
+ "output": 10,
73247
+ "cache_read": 0.2,
73248
+ "cache_write": 2.5,
73249
+ "tiers": [
73250
+ {
73251
+ "input": 4,
73252
+ "output": 15,
73253
+ "cache_read": 0.4,
73254
+ "cache_write": 5,
73255
+ "tier": {
73256
+ "type": "context",
73257
+ "size": 272000
73258
+ }
73259
+ }
73260
+ ],
73261
+ "context_over_200k": {
73262
+ "input": 4,
73263
+ "output": 15,
73264
+ "cache_read": 0.4,
73265
+ "cache_write": 5
73266
+ }
73267
+ }
73268
+ },
73269
+ {
73270
+ "id": "openai/gpt-6-luna",
73271
+ "name": "GPT-6 Luna",
73272
+ "description": "GPT model for general reasoning, writing, coding, and tool-assisted tasks",
73273
+ "released": "2026-09-22",
73274
+ "attachment": true,
73275
+ "reasoning": true,
73276
+ "reasoning_options": [
73277
+ {
73278
+ "type": "effort",
73279
+ "values": [
73280
+ "none",
73281
+ "low",
73282
+ "medium",
73283
+ "high",
73284
+ "xhigh",
73285
+ "max"
73286
+ ]
73287
+ }
73288
+ ],
73289
+ "tool_call": true,
73290
+ "structured_output": true,
73291
+ "open_weights": false,
73292
+ "temperature": false,
73293
+ "knowledge": "2026-05-18",
73294
+ "last_updated": "2026-09-22",
73295
+ "family": "gpt-luna",
73296
+ "modalities": {
73297
+ "input": [
73298
+ "text",
73299
+ "image",
73300
+ "pdf"
73301
+ ],
73302
+ "output": [
73303
+ "text"
73304
+ ]
73305
+ },
73306
+ "limit": {
73307
+ "context": 1050000,
73308
+ "input": 922000,
73309
+ "output": 128000
73310
+ },
73311
+ "cost": {
73312
+ "input": 0.1,
73313
+ "output": 0.5,
73314
+ "cache_read": 0.01,
73315
+ "cache_write": 0.125,
73316
+ "tiers": [
73317
+ {
73318
+ "input": 0.2,
73319
+ "output": 0.75,
73320
+ "cache_read": 0.02,
73321
+ "cache_write": 0.25,
73322
+ "tier": {
73323
+ "type": "context",
73324
+ "size": 272000
73325
+ }
73326
+ }
73327
+ ],
73328
+ "context_over_200k": {
73329
+ "input": 0.2,
73330
+ "output": 0.75,
73331
+ "cache_read": 0.02,
73332
+ "cache_write": 0.25
73333
+ }
73334
+ }
73335
+ },
73336
+ {
73337
+ "id": "anthropic/claude-opus-5.5",
73338
+ "name": "Claude Opus 5.5",
73339
+ "description": "Flagship Claude model for deep reasoning, coding, and long-horizon agents",
73340
+ "released": "2026-09-22",
73341
+ "attachment": true,
73342
+ "reasoning": true,
73343
+ "reasoning_options": [
73344
+ {
73345
+ "type": "effort",
73346
+ "values": [
73347
+ "low",
73348
+ "medium",
73349
+ "high",
73350
+ "xhigh",
73351
+ "max"
73352
+ ]
73353
+ }
73354
+ ],
73355
+ "tool_call": true,
73356
+ "structured_output": true,
73357
+ "open_weights": false,
73358
+ "temperature": true,
73359
+ "knowledge": "2026-06",
73360
+ "last_updated": "2026-09-22",
73361
+ "family": "claude-opus",
73362
+ "modalities": {
73363
+ "input": [
73364
+ "text",
73365
+ "image",
73366
+ "pdf"
73367
+ ],
73368
+ "output": [
73369
+ "text"
73370
+ ]
73371
+ },
73372
+ "limit": {
73373
+ "context": 1000000,
73374
+ "output": 128000
73375
+ },
73376
+ "cost": {
73377
+ "input": 4,
73378
+ "output": 20,
73379
+ "cache_read": 0.2,
73380
+ "cache_write": 5
73381
+ }
73201
73382
  }
73202
73383
  ]
73203
73384
  },
@@ -82519,6 +82700,53 @@
82519
82700
  "cache_read": 0.3,
82520
82701
  "cache_write": 3.75
82521
82702
  }
82703
+ },
82704
+ {
82705
+ "id": "claude-opus-5-5",
82706
+ "name": "Claude Opus 5.5",
82707
+ "description": "Claude model for long-running agentic coding and knowledge work",
82708
+ "released": "2026-09-22",
82709
+ "attachment": true,
82710
+ "reasoning": true,
82711
+ "reasoning_options": [
82712
+ {
82713
+ "type": "effort",
82714
+ "values": [
82715
+ "low",
82716
+ "medium",
82717
+ "high",
82718
+ "xhigh",
82719
+ "max"
82720
+ ]
82721
+ }
82722
+ ],
82723
+ "tool_call": true,
82724
+ "structured_output": true,
82725
+ "open_weights": false,
82726
+ "temperature": false,
82727
+ "knowledge": "2026-06",
82728
+ "last_updated": "2026-09-22",
82729
+ "family": "claude-opus",
82730
+ "modalities": {
82731
+ "input": [
82732
+ "text",
82733
+ "image",
82734
+ "pdf"
82735
+ ],
82736
+ "output": [
82737
+ "text"
82738
+ ]
82739
+ },
82740
+ "limit": {
82741
+ "context": 1000000,
82742
+ "output": 128000
82743
+ },
82744
+ "cost": {
82745
+ "input": 4,
82746
+ "output": 20,
82747
+ "cache_read": 0.2,
82748
+ "cache_write": 5
82749
+ }
82522
82750
  }
82523
82751
  ]
82524
82752
  },
@@ -97410,6 +97638,140 @@
97410
97638
  }
97411
97639
  },
97412
97640
  "released": "2026-09-04"
97641
+ },
97642
+ {
97643
+ "id": "gpt-6-sol",
97644
+ "name": "GPT-6 Sol",
97645
+ "description": "OpenAI model for complex coding and agentic workflows",
97646
+ "released": "2026-09-22",
97647
+ "attachment": true,
97648
+ "reasoning": true,
97649
+ "reasoning_options": [
97650
+ {
97651
+ "type": "effort",
97652
+ "values": [
97653
+ "none",
97654
+ "low",
97655
+ "medium",
97656
+ "high",
97657
+ "xhigh",
97658
+ "max"
97659
+ ]
97660
+ }
97661
+ ],
97662
+ "tool_call": true,
97663
+ "structured_output": true,
97664
+ "open_weights": false,
97665
+ "temperature": false,
97666
+ "knowledge": "2026-04-20",
97667
+ "last_updated": "2026-09-22",
97668
+ "family": "gpt-sol",
97669
+ "modalities": {
97670
+ "input": [
97671
+ "text",
97672
+ "image",
97673
+ "pdf"
97674
+ ],
97675
+ "output": [
97676
+ "text"
97677
+ ]
97678
+ },
97679
+ "limit": {
97680
+ "context": 1050000,
97681
+ "input": 922000,
97682
+ "output": 128000
97683
+ },
97684
+ "cost": {
97685
+ "input": 2,
97686
+ "output": 10,
97687
+ "cache_read": 0.2,
97688
+ "cache_write": 2.5,
97689
+ "tiers": [
97690
+ {
97691
+ "input": 4,
97692
+ "output": 15,
97693
+ "cache_read": 0.4,
97694
+ "cache_write": 5,
97695
+ "tier": {
97696
+ "type": "context",
97697
+ "size": 272000
97698
+ }
97699
+ }
97700
+ ],
97701
+ "context_over_200k": {
97702
+ "input": 4,
97703
+ "output": 15,
97704
+ "cache_read": 0.4,
97705
+ "cache_write": 5
97706
+ }
97707
+ }
97708
+ },
97709
+ {
97710
+ "id": "gpt-6-luna",
97711
+ "name": "GPT-6 Luna",
97712
+ "description": "OpenAI's most efficient model for focused, high-volume tasks",
97713
+ "released": "2026-09-22",
97714
+ "attachment": true,
97715
+ "reasoning": true,
97716
+ "reasoning_options": [
97717
+ {
97718
+ "type": "effort",
97719
+ "values": [
97720
+ "none",
97721
+ "low",
97722
+ "medium",
97723
+ "high",
97724
+ "xhigh",
97725
+ "max"
97726
+ ]
97727
+ }
97728
+ ],
97729
+ "tool_call": true,
97730
+ "structured_output": true,
97731
+ "open_weights": false,
97732
+ "temperature": false,
97733
+ "knowledge": "2026-05-18",
97734
+ "last_updated": "2026-09-22",
97735
+ "family": "gpt-luna",
97736
+ "modalities": {
97737
+ "input": [
97738
+ "text",
97739
+ "image",
97740
+ "pdf"
97741
+ ],
97742
+ "output": [
97743
+ "text"
97744
+ ]
97745
+ },
97746
+ "limit": {
97747
+ "context": 1050000,
97748
+ "input": 922000,
97749
+ "output": 128000
97750
+ },
97751
+ "cost": {
97752
+ "input": 0.1,
97753
+ "output": 0.5,
97754
+ "cache_read": 0.01,
97755
+ "cache_write": 0.125,
97756
+ "tiers": [
97757
+ {
97758
+ "input": 0.2,
97759
+ "output": 0.75,
97760
+ "cache_read": 0.02,
97761
+ "cache_write": 0.25,
97762
+ "tier": {
97763
+ "type": "context",
97764
+ "size": 272000
97765
+ }
97766
+ }
97767
+ ],
97768
+ "context_over_200k": {
97769
+ "input": 0.2,
97770
+ "output": 0.75,
97771
+ "cache_read": 0.02,
97772
+ "cache_write": 0.25
97773
+ }
97774
+ }
97413
97775
  }
97414
97776
  ]
97415
97777
  },
@@ -59,7 +59,7 @@ export declare function defaultEnabledModelIds(models: EnablementCandidate[], op
59
59
  * id Bedrock refuses ("Invocation of model ID xai.grok-4.6 with on-demand
60
60
  * throughput isn't supported. Retry your request with the ID or ARN of an
61
61
  * inference profile"), then looped "Retrying in Ns" forever. Proven live on
62
- * the Essentia self-host 2026-08-26.
62
+ * the SampleCo self-host 2026-08-26.
63
63
  *
64
64
  * Rule: when a set carries ANY inference-profile id, its bare ids are not
65
65
  * auto-selectable. An inference profile is always invokable; a bare id may
@@ -115,7 +115,7 @@ export function defaultEnabledModelIds(models, opts) {
115
115
  * id Bedrock refuses ("Invocation of model ID xai.grok-4.6 with on-demand
116
116
  * throughput isn't supported. Retry your request with the ID or ARN of an
117
117
  * inference profile"), then looped "Retrying in Ns" forever. Proven live on
118
- * the Essentia self-host 2026-08-26.
118
+ * the SampleCo self-host 2026-08-26.
119
119
  *
120
120
  * Rule: when a set carries ANY inference-profile id, its bare ids are not
121
121
  * auto-selectable. An inference profile is always invokable; a bare id may
package/dist/index.d.ts CHANGED
@@ -159,12 +159,24 @@ export interface Catalog {
159
159
  model_count: number;
160
160
  providers: CatalogProvider[];
161
161
  }
162
- export declare const CATALOG: Catalog;
162
+ 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
+ }>;
163
174
  export interface ManagedModel {
164
175
  id: string;
165
176
  name: string;
166
177
  upstreamModelId: string;
167
178
  transport: 'openrouter';
179
+ morphModelId?: string;
168
180
  providerBrand?: string;
169
181
  pricingRef: string;
170
182
  pricing?: {
@@ -196,28 +208,6 @@ export declare const DEFAULT_MANAGED_MODEL_IDS: string[];
196
208
  export declare const MANAGED_FLAGSHIP_MODEL_ID: string;
197
209
  /** Concrete Kortix-managed default used when no account or project default exists. */
198
210
  export declare const PLATFORM_DEFAULT_MODEL_ID = "deepseek-v4.1-flash";
199
- /**
200
- * Resolve a gateway WIRE model id to its full `CatalogModel` — the capability
201
- * record `generationControlCapabilities`/`clampGenerationConfig` gate against.
202
- * The CANONICAL wire-id → model resolver: it stitches together the three id
203
- * shapes a gateway request can carry, so a caller never has to string-split
204
- * `<provider>/<model>` or special-case managed slugs itself.
205
- *
206
- * - `codex/<id>` → the genuine OpenAI catalog entry (`openai/<id>`).
207
- * - `<provider>/<id>` → that provider's catalog entry (BYOK models).
208
- * - bare `<id>` → a managed slug, resolved via its `pricingRef` (the
209
- * model's real models.dev id) so e.g. `claude-opus-4.8`
210
- * gets Claude's real `reasoning_options`/`limit` instead
211
- * of a permissive fallback; a synthesized minimal record
212
- * (reasoning/tool_call/temperature all true) when the
213
- * managed slug has no models.dev entry to borrow from.
214
- *
215
- * `catalog` defaults to the bundled static `CATALOG`. apps/api passes the LIVE
216
- * models.dev snapshot instead (its own thin wrapper of the same name) so the
217
- * host-side generation-controls clamp sees fresh capabilities; the standalone
218
- * gateway transport, which has no runtime snapshot, uses the bundled catalog.
219
- */
220
- export declare function catalogModelForWireModel(wireModel: string, catalog?: Catalog): CatalogModel | undefined;
221
211
  export declare const MODEL_SELECTOR_PROVIDER_IDS: readonly ["kortix", "opencode", "anthropic", "openai", "github-copilot", "google", "openrouter", "vercel"];
222
212
  export declare const PROVIDER_LABELS: Record<string, string>;
223
213
  //# sourceMappingURL=index.d.ts.map