@dcdr/contracts 1.9.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/LICENSE +176 -0
  2. package/README.md +411 -0
  3. package/dist/capabilities.contract.d.ts +69 -0
  4. package/dist/capabilities.contract.d.ts.map +1 -0
  5. package/dist/capabilities.contract.js +126 -0
  6. package/dist/control.contract.d.ts +39 -0
  7. package/dist/control.contract.d.ts.map +1 -0
  8. package/dist/control.contract.js +2 -0
  9. package/dist/credentials.contract.d.ts +37 -0
  10. package/dist/credentials.contract.d.ts.map +1 -0
  11. package/dist/credentials.contract.js +15 -0
  12. package/dist/entitlements.contract.d.ts +107 -0
  13. package/dist/entitlements.contract.d.ts.map +1 -0
  14. package/dist/entitlements.contract.js +11 -0
  15. package/dist/errors.contract.d.ts +47 -0
  16. package/dist/errors.contract.d.ts.map +1 -0
  17. package/dist/errors.contract.js +48 -0
  18. package/dist/execution.contract.d.ts +240 -0
  19. package/dist/execution.contract.d.ts.map +1 -0
  20. package/dist/execution.contract.js +22 -0
  21. package/dist/http.contract.d.ts +20 -0
  22. package/dist/http.contract.d.ts.map +1 -0
  23. package/dist/http.contract.js +8 -0
  24. package/dist/implementations.contract.d.ts +120 -0
  25. package/dist/implementations.contract.d.ts.map +1 -0
  26. package/dist/implementations.contract.js +2 -0
  27. package/dist/index.d.ts +22 -0
  28. package/dist/index.d.ts.map +1 -0
  29. package/dist/index.js +37 -0
  30. package/dist/intent.contract.d.ts +137 -0
  31. package/dist/intent.contract.d.ts.map +1 -0
  32. package/dist/intent.contract.js +76 -0
  33. package/dist/logs.contract.d.ts +10 -0
  34. package/dist/logs.contract.d.ts.map +1 -0
  35. package/dist/logs.contract.js +2 -0
  36. package/dist/messages.contract.d.ts +16 -0
  37. package/dist/messages.contract.d.ts.map +1 -0
  38. package/dist/messages.contract.js +2 -0
  39. package/dist/policies.contract.d.ts +253 -0
  40. package/dist/policies.contract.d.ts.map +1 -0
  41. package/dist/policies.contract.js +283 -0
  42. package/dist/prompt-variable-schema.contract.d.ts +75 -0
  43. package/dist/prompt-variable-schema.contract.d.ts.map +1 -0
  44. package/dist/prompt-variable-schema.contract.js +572 -0
  45. package/dist/prompts.contract.d.ts +97 -0
  46. package/dist/prompts.contract.d.ts.map +1 -0
  47. package/dist/prompts.contract.js +87 -0
  48. package/dist/provider.contract.d.ts +477 -0
  49. package/dist/provider.contract.d.ts.map +1 -0
  50. package/dist/provider.contract.js +3310 -0
  51. package/dist/registry.stats.contract.d.ts +39 -0
  52. package/dist/registry.stats.contract.d.ts.map +1 -0
  53. package/dist/registry.stats.contract.js +9 -0
  54. package/dist/runtime.client.d.ts +362 -0
  55. package/dist/runtime.client.d.ts.map +1 -0
  56. package/dist/runtime.client.js +545 -0
  57. package/dist/service-tokens.contract.d.ts +29 -0
  58. package/dist/service-tokens.contract.d.ts.map +1 -0
  59. package/dist/service-tokens.contract.js +10 -0
  60. package/dist/session.contract.d.ts +51 -0
  61. package/dist/session.contract.d.ts.map +1 -0
  62. package/dist/session.contract.js +187 -0
  63. package/dist/subscription.contract.d.ts +37 -0
  64. package/dist/subscription.contract.d.ts.map +1 -0
  65. package/dist/subscription.contract.js +45 -0
  66. package/dist/utils.contract.d.ts +21 -0
  67. package/dist/utils.contract.d.ts.map +1 -0
  68. package/dist/utils.contract.js +79 -0
  69. package/package.json +57 -0
@@ -0,0 +1,3310 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ProviderModelRegistry = exports.PROVIDER_MODEL_E2E_OVERRIDES = exports.ProviderModelE2EStatus = exports.PROVIDER_MODEL_IDS_BY_PROVIDER_AND_TYPE = exports.PROVIDER_MODEL_CATALOG = exports.PROVIDER_MODEL_DEFINITIONS_BY_PROVIDER = exports.DcdrPublicModelCategory = exports.ProviderModelParameterSupportStatus = exports.PromptParameterKey = exports.ProviderModelPreferredApi = exports.ProviderModelRuntimeSupportStatus = exports.IntentProvider = void 0;
4
+ exports.formatDcdrVirtualModelId = formatDcdrVirtualModelId;
5
+ exports.parseDcdrVirtualModelId = parseDcdrVirtualModelId;
6
+ const intent_contract_1 = require("./intent.contract");
7
+ /**
8
+ * Supported provider backends capable of executing an intent.
9
+ *
10
+ * These represent the underlying execution engines used by the runtime.
11
+ * A provider may represent:
12
+ *
13
+ * - A hosted LLM service (OpenAI, Gemini, Grok, etc.)
14
+ * - A local inference runtime (OFFICE, OLLAMA, VLLM)
15
+ * - A specialized processing engine (OCR, CLIP)
16
+ * - An internal execution system (RULES, HTTP_TOOL)
17
+ */
18
+ var IntentProvider;
19
+ (function (IntentProvider) {
20
+ /**
21
+ * Virtual provider managed by DCDR.
22
+ *
23
+ * Notes
24
+ * - Cloud-only concept: the registry/runtime can resolve the underlying real provider (OpenAI/Anthropic/Gemini/Office).
25
+ * - Model IDs are namespaced as `provider/model` (e.g. `openai/gpt-4o-mini`) for deterministic resolution.
26
+ */
27
+ IntentProvider["DCDR"] = "DCDR";
28
+ /** OpenAI hosted models (GPT family, embeddings, etc.) */
29
+ IntentProvider["OPEN_AI"] = "OPEN_AI";
30
+ /** Google Gemini models */
31
+ IntentProvider["GEMINI"] = "GEMINI";
32
+ /** xAI Grok models */
33
+ IntentProvider["GROK"] = "GROK";
34
+ /** Anthropic Claude models */
35
+ IntentProvider["ANTHROPIC"] = "ANTHROPIC";
36
+ /** Mistral hosted models */
37
+ IntentProvider["MISTRAL"] = "MISTRAL";
38
+ /** Cohere models (chat + embeddings) */
39
+ IntentProvider["COHERE"] = "COHERE";
40
+ /**
41
+ * Local inference runtime hosted internally (runtime-managed).
42
+ *
43
+ * Notes
44
+ * - Use this when the runtime/operator controls the endpoint (e.g. office GPU cluster running vLLM).
45
+ * - If a customer wants to plug in their own OpenAI-compatible endpoint, use OPEN_AI_COMPATIBLE.
46
+ */
47
+ IntentProvider["OFFICE"] = "OFFICE";
48
+ /**
49
+ * Ollama local inference runtime.
50
+ * Useful for developer setups and local deployments.
51
+ */
52
+ IntentProvider["OLLAMA"] = "OLLAMA";
53
+ /**
54
+ * Generic OpenAI-compatible endpoint (bring-your-own).
55
+ *
56
+ * Goal
57
+ * - Allow customers to plug in internal systems that expose an OpenAI-style API.
58
+ *
59
+ * Examples
60
+ * - vLLM, TGI, LM Studio, or custom gateways that mimic the OpenAI schema.
61
+ */
62
+ IntentProvider["OPEN_AI_COMPATIBLE"] = "OPEN_AI_COMPATIBLE";
63
+ /**
64
+ * Optical character recognition engine.
65
+ */
66
+ IntentProvider["OCR"] = "OCR";
67
+ /**
68
+ * CLIP-like models for multimodal embedding.
69
+ */
70
+ IntentProvider["CLIP"] = "CLIP";
71
+ /**
72
+ * Generic HTTP tool provider.
73
+ * Used to call external APIs or services.
74
+ */
75
+ IntentProvider["HTTP_TOOL"] = "HTTP_TOOL";
76
+ /**
77
+ * Internal rule-based execution engine.
78
+ * Used for deterministic logic instead of LLMs.
79
+ */
80
+ IntentProvider["RULES"] = "RULES";
81
+ })(IntentProvider || (exports.IntentProvider = IntentProvider = {}));
82
+ /** Runtime-level support status for a (provider, modelId) pair. */
83
+ var ProviderModelRuntimeSupportStatus;
84
+ (function (ProviderModelRuntimeSupportStatus) {
85
+ /** Supported by this runtime (intended to work). */
86
+ ProviderModelRuntimeSupportStatus["SUPPORTED"] = "SUPPORTED";
87
+ /** Explicitly not supported by this runtime (do not attempt provider calls). */
88
+ ProviderModelRuntimeSupportStatus["NOT_SUPPORTED"] = "NOT_SUPPORTED";
89
+ /** Known failing in current runtime; keep visible but treat as unstable. */
90
+ ProviderModelRuntimeSupportStatus["FAILING"] = "FAILING";
91
+ /** Under active work; may be partially implemented. */
92
+ ProviderModelRuntimeSupportStatus["IN_PROGRESS"] = "IN_PROGRESS";
93
+ })(ProviderModelRuntimeSupportStatus || (exports.ProviderModelRuntimeSupportStatus = ProviderModelRuntimeSupportStatus = {}));
94
+ /** Preferred upstream API surface for this model (when provider offers multiple). */
95
+ var ProviderModelPreferredApi;
96
+ (function (ProviderModelPreferredApi) {
97
+ ProviderModelPreferredApi["CHAT_COMPLETIONS"] = "CHAT_COMPLETIONS";
98
+ ProviderModelPreferredApi["RESPONSES"] = "RESPONSES";
99
+ })(ProviderModelPreferredApi || (exports.ProviderModelPreferredApi = ProviderModelPreferredApi = {}));
100
+ /** Generic prompt/runtime parameter keys that can be exposed to users (UI) and adapters. */
101
+ var PromptParameterKey;
102
+ (function (PromptParameterKey) {
103
+ PromptParameterKey["TEMPERATURE"] = "temperature";
104
+ PromptParameterKey["TOP_P"] = "top_p";
105
+ PromptParameterKey["TOP_K"] = "top_k";
106
+ PromptParameterKey["MAX_TOKENS"] = "max_tokens";
107
+ PromptParameterKey["SEED"] = "seed";
108
+ PromptParameterKey["ENABLE_THINKING"] = "enable_thinking";
109
+ PromptParameterKey["RESPONSE_FORMAT"] = "response_format";
110
+ PromptParameterKey["PRESENCE_PENALTY"] = "presence_penalty";
111
+ PromptParameterKey["FREQUENCY_PENALTY"] = "frequency_penalty";
112
+ })(PromptParameterKey || (exports.PromptParameterKey = PromptParameterKey = {}));
113
+ /** Runtime-level parameter support status for a specific model. */
114
+ var ProviderModelParameterSupportStatus;
115
+ (function (ProviderModelParameterSupportStatus) {
116
+ /** Parameter is supported and may be used. */
117
+ ProviderModelParameterSupportStatus["SUPPORTED"] = "SUPPORTED";
118
+ /** Parameter is not supported and should not be sent. */
119
+ ProviderModelParameterSupportStatus["NOT_SUPPORTED"] = "NOT_SUPPORTED";
120
+ /** Only provider default is supported; runtime should avoid sending custom values. */
121
+ ProviderModelParameterSupportStatus["DEFAULT_ONLY"] = "DEFAULT_ONLY";
122
+ })(ProviderModelParameterSupportStatus || (exports.ProviderModelParameterSupportStatus = ProviderModelParameterSupportStatus = {}));
123
+ /**
124
+ * Product-level managed categories for public customer models.
125
+ *
126
+ * Purpose
127
+ * - Provide a stable grouping/filtering abstraction for customer-facing UIs.
128
+ * - Avoid exposing a flat provider/model list by default.
129
+ */
130
+ var DcdrPublicModelCategory;
131
+ (function (DcdrPublicModelCategory) {
132
+ /** Maximum quality / strongest reasoning; typically expensive. */
133
+ DcdrPublicModelCategory["BEST"] = "BEST";
134
+ /** Best balance between quality and cost; recommended default for production chat. */
135
+ DcdrPublicModelCategory["SMART"] = "SMART";
136
+ /** Low latency; good for interactive chat/support. */
137
+ DcdrPublicModelCategory["FAST"] = "FAST";
138
+ /** Lowest cost; good for high-volume simple tasks. */
139
+ DcdrPublicModelCategory["ECONOMY"] = "ECONOMY";
140
+ /** Internal/local/company-managed models (self-hosted, Office, etc.). */
141
+ DcdrPublicModelCategory["PRIVATE"] = "PRIVATE";
142
+ })(DcdrPublicModelCategory || (exports.DcdrPublicModelCategory = DcdrPublicModelCategory = {}));
143
+ const PRICING_UPDATED_AT_20260327 = Date.UTC(2026, 2, 27);
144
+ const PRICING_UPDATED_AT_20260326 = Date.UTC(2026, 2, 26);
145
+ const PRICING_UPDATED_AT_20260430 = Date.UTC(2026, 3, 30);
146
+ const PRICING_UPDATED_AT_20260519 = Date.UTC(2026, 4, 19);
147
+ const PRICING_UPDATED_AT_20260522 = Date.UTC(2026, 4, 22);
148
+ const OPENAI_PRICING_URL = "https://developers.openai.com/api/docs/pricing";
149
+ const XAI_PRICING_URL = "https://docs.x.ai/developers/models";
150
+ const ANTHROPIC_MODELS_URL = "https://platform.claude.com/docs/en/docs/about-claude/models";
151
+ const MISTRAL_MODELS_URL = "https://docs.mistral.ai/getting-started/models/";
152
+ const GEMINI_PRICING_URL = "https://ai.google.dev/gemini-api/docs/pricing";
153
+ const OPENAI_GPT5_PARAMETER_SUPPORT = {
154
+ parameters: {
155
+ [PromptParameterKey.TEMPERATURE]: ProviderModelParameterSupportStatus.DEFAULT_ONLY,
156
+ [PromptParameterKey.TOP_P]: ProviderModelParameterSupportStatus.DEFAULT_ONLY,
157
+ [PromptParameterKey.TOP_K]: ProviderModelParameterSupportStatus.NOT_SUPPORTED,
158
+ },
159
+ recommended: {
160
+ // E2E and probes showed that very low budgets (e.g. 16) can yield reasoning-only outputs.
161
+ minMaxTokens: 64,
162
+ },
163
+ notes: "GPT-5 family: avoid custom sampling params; ensure sufficient max_tokens budget.",
164
+ updatedAt: "2026-04-28",
165
+ };
166
+ const PRICING_FALLBACK_RULES_BY_PROVIDER = {
167
+ [IntentProvider.DCDR]: [],
168
+ [IntentProvider.OPEN_AI]: [
169
+ // Not officially published separately; assume same token pricing as base GPT-5.
170
+ { match: /^gpt-5-search-api/, baseModelId: "gpt-5" },
171
+ ],
172
+ [IntentProvider.ANTHROPIC]: [
173
+ // Opus/Sonnet/Haiku family pricing is expected to be consistent across close variants.
174
+ { match: /^claude-opus-4-/, baseModelId: "claude-opus-4-7" },
175
+ { match: /^claude-sonnet-4-/, baseModelId: "claude-sonnet-4-6" },
176
+ { match: /^claude-haiku-4-/, baseModelId: "claude-haiku-4-5" },
177
+ ],
178
+ [IntentProvider.GEMINI]: [],
179
+ [IntentProvider.GROK]: [],
180
+ [IntentProvider.MISTRAL]: [],
181
+ [IntentProvider.COHERE]: [],
182
+ [IntentProvider.OFFICE]: [],
183
+ [IntentProvider.OLLAMA]: [],
184
+ [IntentProvider.OPEN_AI_COMPATIBLE]: [],
185
+ [IntentProvider.OCR]: [],
186
+ [IntentProvider.CLIP]: [],
187
+ [IntentProvider.HTTP_TOOL]: [],
188
+ [IntentProvider.RULES]: [],
189
+ };
190
+ const DCDR_VIRTUAL_PROVIDER_PREFIX_BY_PROVIDER = {
191
+ [IntentProvider.OPEN_AI]: "openai",
192
+ [IntentProvider.ANTHROPIC]: "anthropic",
193
+ [IntentProvider.GEMINI]: "gemini",
194
+ [IntentProvider.OFFICE]: "office",
195
+ };
196
+ const DCDR_VIRTUAL_PROVIDER_BY_PREFIX = {
197
+ openai: IntentProvider.OPEN_AI,
198
+ anthropic: IntentProvider.ANTHROPIC,
199
+ gemini: IntentProvider.GEMINI,
200
+ office: IntentProvider.OFFICE,
201
+ };
202
+ /**
203
+ * Formats a DCDR virtual provider model id as `provider/model`.
204
+ *
205
+ * Returns an empty string for unsupported provider prefixes.
206
+ */
207
+ function formatDcdrVirtualModelId(provider, modelId) {
208
+ const prefix = DCDR_VIRTUAL_PROVIDER_PREFIX_BY_PROVIDER[provider];
209
+ if (!prefix)
210
+ return "";
211
+ const id = String(modelId ?? "").trim();
212
+ if (!id)
213
+ return "";
214
+ return `${prefix}/${id}`;
215
+ }
216
+ /**
217
+ * Parses a DCDR virtual provider model id of the form `provider/model`.
218
+ *
219
+ * Returns null when the id is not a valid DCDR virtual model id.
220
+ */
221
+ function parseDcdrVirtualModelId(prefixedModelId) {
222
+ const raw = String(prefixedModelId ?? "").trim();
223
+ if (!raw)
224
+ return null;
225
+ const idx = raw.indexOf("/");
226
+ if (idx <= 0 || idx >= raw.length - 1)
227
+ return null;
228
+ const prefix = raw.slice(0, idx).trim().toLowerCase();
229
+ const modelId = raw.slice(idx + 1).trim();
230
+ if (!prefix || !modelId)
231
+ return null;
232
+ const provider = DCDR_VIRTUAL_PROVIDER_BY_PREFIX[prefix];
233
+ if (!provider)
234
+ return null;
235
+ return { provider, modelId, prefixedModelId: raw };
236
+ }
237
+ /**
238
+ * Builds a virtual provider model list for `IntentProvider.DCDR`.
239
+ *
240
+ * Goal
241
+ * - Allow DCDR to reference any model that DCDR runtime explicitly supports.
242
+ *
243
+ * Rules
244
+ * - For hosted providers (OpenAI/Anthropic/Gemini): include only models marked `runtimeSupport.status=SUPPORTED`.
245
+ * - For `OFFICE`: include all declared models (local/runtime-managed; support is deployment-dependent).
246
+ * - Stable deterministic ordering: provider order then model declaration order.
247
+ */
248
+ function buildDcdrVirtualProviderModelDefinitions(modelsByProvider) {
249
+ const providers = [
250
+ IntentProvider.OPEN_AI,
251
+ IntentProvider.ANTHROPIC,
252
+ IntentProvider.GEMINI,
253
+ IntentProvider.OFFICE,
254
+ ];
255
+ const out = [];
256
+ for (const provider of providers) {
257
+ const defs = modelsByProvider[provider] ?? [];
258
+ for (const def of defs) {
259
+ const isOffice = provider === IntentProvider.OFFICE;
260
+ const isSupported = def.runtimeSupport?.status ===
261
+ ProviderModelRuntimeSupportStatus.SUPPORTED;
262
+ if (!isOffice && !isSupported)
263
+ continue;
264
+ const prefixedId = formatDcdrVirtualModelId(provider, def.id);
265
+ if (!prefixedId)
266
+ continue;
267
+ out.push({
268
+ ...def,
269
+ id: prefixedId,
270
+ publicForCustomers: false,
271
+ });
272
+ }
273
+ }
274
+ return out;
275
+ }
276
+ /**
277
+ * Canonical provider model catalog (single source of truth).
278
+ *
279
+ * Note: This is a curated snapshot of commonly used official model IDs (updated March 2026).
280
+ * Providers may add/deprecate models frequently; keep this list in sync with vendor docs.
281
+ */
282
+ const PROVIDER_MODEL_DEFINITIONS_BY_PROVIDER_RAW = {
283
+ [IntentProvider.DCDR]: [],
284
+ [IntentProvider.OPEN_AI]: [
285
+ // Pricing snapshot: OpenAI pricing page, updatedAt=2026-03-27
286
+ // Model IDs below are kept in roughly "newest first" order.
287
+ // Discovered aliases are sourced from OpenAI `GET /v1/models` (snapshot 2026-04-27).
288
+ // --- gpt-5.5 (discovered; priced) ---
289
+ {
290
+ id: "gpt-5.5",
291
+ types: [intent_contract_1.IntentType.CHAT],
292
+ publicForCustomers: true,
293
+ tokenUsageCovered: true,
294
+ publicName: "DCDR Best",
295
+ badge: "OpenAI",
296
+ primaryCategory: DcdrPublicModelCategory.BEST,
297
+ categories: [DcdrPublicModelCategory.BEST],
298
+ qualityTier: 5,
299
+ speedTier: 3,
300
+ costTier: 1,
301
+ recommendedUseCases: ["reasoning", "agentic_coding"],
302
+ isRecommended: false,
303
+ isGlobalDefault: false,
304
+ isCategoryDefault: true,
305
+ pricing: pricingPerMillionTokens({
306
+ input: 5.0,
307
+ cachedInput: 0.5,
308
+ output: 30.0,
309
+ tiers: [
310
+ {
311
+ name: "long_context",
312
+ condition: "Long context",
313
+ input: 10.0,
314
+ cachedInput: 1.0,
315
+ output: 45.0,
316
+ },
317
+ ],
318
+ sourceUrl: OPENAI_PRICING_URL,
319
+ }),
320
+ runtimeSupport: {
321
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
322
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
323
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
324
+ updatedAt: "2026-04-28",
325
+ },
326
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
327
+ },
328
+ {
329
+ id: "gpt-5.5-2026-04-23",
330
+ types: [intent_contract_1.IntentType.CHAT],
331
+ runtimeSupport: {
332
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
333
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
334
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
335
+ updatedAt: "2026-04-28",
336
+ },
337
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
338
+ },
339
+ {
340
+ id: "gpt-5.5-pro",
341
+ types: [intent_contract_1.IntentType.CHAT],
342
+ pricing: pricingPerMillionTokens({
343
+ input: 30.0,
344
+ output: 180.0,
345
+ tiers: [
346
+ {
347
+ name: "long_context",
348
+ condition: "Long context",
349
+ input: 60.0,
350
+ output: 270.0,
351
+ },
352
+ ],
353
+ sourceUrl: OPENAI_PRICING_URL,
354
+ }),
355
+ runtimeSupport: {
356
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
357
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
358
+ reason: "OpenAI responses-only model (not supported on /v1/chat/completions)",
359
+ updatedAt: "2026-04-27",
360
+ },
361
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
362
+ },
363
+ {
364
+ id: "gpt-5.5-pro-2026-04-23",
365
+ types: [intent_contract_1.IntentType.CHAT],
366
+ runtimeSupport: {
367
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
368
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
369
+ reason: "OpenAI responses-only model (not supported on /v1/chat/completions)",
370
+ updatedAt: "2026-04-27",
371
+ },
372
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
373
+ },
374
+ // --- gpt-5.4 (discovered; priced) ---
375
+ {
376
+ id: "gpt-5.4",
377
+ types: [intent_contract_1.IntentType.CHAT],
378
+ publicForCustomers: true,
379
+ tokenUsageCovered: true,
380
+ publicName: "DCDR Smart",
381
+ badge: "Recommended",
382
+ primaryCategory: DcdrPublicModelCategory.SMART,
383
+ categories: [DcdrPublicModelCategory.SMART, DcdrPublicModelCategory.BEST],
384
+ qualityTier: 4,
385
+ speedTier: 4,
386
+ costTier: 3,
387
+ recommendedUseCases: ["production_chat", "coding", "reasoning"],
388
+ isRecommended: true,
389
+ isGlobalDefault: false,
390
+ isCategoryDefault: false,
391
+ pricing: pricingPerMillionTokens({
392
+ input: 2.5,
393
+ cachedInput: 0.25,
394
+ output: 15.0,
395
+ tiers: [
396
+ {
397
+ name: "long_context",
398
+ condition: "Long context",
399
+ input: 5.0,
400
+ cachedInput: 0.5,
401
+ output: 22.5,
402
+ },
403
+ ],
404
+ sourceUrl: OPENAI_PRICING_URL,
405
+ }),
406
+ runtimeSupport: {
407
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
408
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
409
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
410
+ updatedAt: "2026-04-28",
411
+ },
412
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
413
+ },
414
+ {
415
+ id: "gpt-5.4-2026-03-05",
416
+ types: [intent_contract_1.IntentType.CHAT],
417
+ runtimeSupport: {
418
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
419
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
420
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
421
+ updatedAt: "2026-04-28",
422
+ },
423
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
424
+ },
425
+ {
426
+ id: "gpt-5.4-mini",
427
+ types: [intent_contract_1.IntentType.CHAT],
428
+ publicForCustomers: true,
429
+ tokenUsageCovered: true,
430
+ publicName: "DCDR Fast",
431
+ badge: "OpenAI",
432
+ primaryCategory: DcdrPublicModelCategory.FAST,
433
+ categories: [
434
+ DcdrPublicModelCategory.FAST,
435
+ DcdrPublicModelCategory.ECONOMY,
436
+ ],
437
+ qualityTier: 3,
438
+ speedTier: 5,
439
+ costTier: 4,
440
+ recommendedUseCases: ["interactive_chat", "support", "rewriting"],
441
+ isRecommended: false,
442
+ isGlobalDefault: false,
443
+ isCategoryDefault: true,
444
+ pricing: pricingPerMillionTokens({
445
+ input: 0.75,
446
+ cachedInput: 0.075,
447
+ output: 4.5,
448
+ sourceUrl: OPENAI_PRICING_URL,
449
+ }),
450
+ runtimeSupport: {
451
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
452
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
453
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
454
+ updatedAt: "2026-04-28",
455
+ },
456
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
457
+ },
458
+ {
459
+ id: "gpt-5.4-mini-2026-03-17",
460
+ types: [intent_contract_1.IntentType.CHAT],
461
+ runtimeSupport: {
462
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
463
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
464
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
465
+ updatedAt: "2026-04-28",
466
+ },
467
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
468
+ },
469
+ {
470
+ id: "gpt-5.4-nano",
471
+ types: [intent_contract_1.IntentType.CHAT],
472
+ publicForCustomers: true,
473
+ tokenUsageCovered: true,
474
+ publicName: "DCDR Economy",
475
+ badge: "OpenAI",
476
+ primaryCategory: DcdrPublicModelCategory.ECONOMY,
477
+ categories: [DcdrPublicModelCategory.ECONOMY],
478
+ qualityTier: 2,
479
+ speedTier: 5,
480
+ costTier: 5,
481
+ recommendedUseCases: [
482
+ "high_volume_extraction",
483
+ "classification",
484
+ "rewriting",
485
+ ],
486
+ isRecommended: false,
487
+ isGlobalDefault: false,
488
+ isCategoryDefault: false,
489
+ pricing: pricingPerMillionTokens({
490
+ input: 0.2,
491
+ cachedInput: 0.02,
492
+ output: 1.25,
493
+ sourceUrl: OPENAI_PRICING_URL,
494
+ }),
495
+ runtimeSupport: {
496
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
497
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
498
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
499
+ updatedAt: "2026-04-28",
500
+ },
501
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
502
+ },
503
+ {
504
+ id: "gpt-5.4-nano-2026-03-17",
505
+ types: [intent_contract_1.IntentType.CHAT],
506
+ runtimeSupport: {
507
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
508
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
509
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
510
+ updatedAt: "2026-04-28",
511
+ },
512
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
513
+ },
514
+ {
515
+ id: "gpt-5.4-pro",
516
+ types: [intent_contract_1.IntentType.CHAT],
517
+ pricing: pricingPerMillionTokens({
518
+ input: 30.0,
519
+ output: 180.0,
520
+ tiers: [
521
+ {
522
+ name: "long_context",
523
+ condition: "Long context",
524
+ input: 60.0,
525
+ output: 270.0,
526
+ },
527
+ ],
528
+ sourceUrl: OPENAI_PRICING_URL,
529
+ }),
530
+ runtimeSupport: {
531
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
532
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
533
+ reason: "OpenAI responses-only model (not supported on /v1/chat/completions)",
534
+ updatedAt: "2026-04-27",
535
+ },
536
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
537
+ },
538
+ {
539
+ id: "gpt-5.4-pro-2026-03-05",
540
+ types: [intent_contract_1.IntentType.CHAT],
541
+ runtimeSupport: {
542
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
543
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
544
+ reason: "OpenAI responses-only model (not supported on /v1/chat/completions)",
545
+ updatedAt: "2026-04-27",
546
+ },
547
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
548
+ },
549
+ // --- gpt-5.3 (discovered; priced) ---
550
+ {
551
+ id: "gpt-5.3-chat-latest",
552
+ types: [intent_contract_1.IntentType.CHAT],
553
+ pricing: pricingPerMillionTokens({
554
+ input: 1.75,
555
+ cachedInput: 0.175,
556
+ output: 14.0,
557
+ sourceUrl: OPENAI_PRICING_URL,
558
+ }),
559
+ runtimeSupport: {
560
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
561
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
562
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
563
+ updatedAt: "2026-04-28",
564
+ },
565
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
566
+ },
567
+ {
568
+ id: "gpt-5.3-codex",
569
+ types: [intent_contract_1.IntentType.CHAT],
570
+ pricing: pricingPerMillionTokens({
571
+ input: 1.75,
572
+ cachedInput: 0.175,
573
+ output: 14.0,
574
+ sourceUrl: OPENAI_PRICING_URL,
575
+ }),
576
+ runtimeSupport: {
577
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
578
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
579
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
580
+ updatedAt: "2026-04-28",
581
+ },
582
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
583
+ },
584
+ // --- gpt-5.2 (base IDs are priced; aliases discovered) ---
585
+ {
586
+ id: "gpt-5.2",
587
+ types: [
588
+ intent_contract_1.IntentType.CHAT,
589
+ intent_contract_1.IntentType.MULTIMODAL,
590
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
591
+ ],
592
+ pricing: pricingPerMillionTokens({
593
+ input: 1.75,
594
+ cachedInput: 0.175,
595
+ output: 14.0,
596
+ sourceUrl: OPENAI_PRICING_URL,
597
+ }),
598
+ runtimeSupport: {
599
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
600
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
601
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
602
+ updatedAt: "2026-04-28",
603
+ },
604
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
605
+ },
606
+ {
607
+ id: "gpt-5.2-2025-12-11",
608
+ types: [intent_contract_1.IntentType.CHAT],
609
+ runtimeSupport: {
610
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
611
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
612
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
613
+ updatedAt: "2026-04-28",
614
+ },
615
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
616
+ },
617
+ {
618
+ id: "gpt-5.2-chat-latest",
619
+ types: [intent_contract_1.IntentType.CHAT],
620
+ runtimeSupport: {
621
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
622
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
623
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
624
+ updatedAt: "2026-04-28",
625
+ },
626
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
627
+ },
628
+ {
629
+ id: "gpt-5.2-codex",
630
+ types: [intent_contract_1.IntentType.CHAT],
631
+ runtimeSupport: {
632
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
633
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
634
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
635
+ updatedAt: "2026-04-28",
636
+ },
637
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
638
+ },
639
+ {
640
+ id: "gpt-5.2-pro",
641
+ types: [
642
+ intent_contract_1.IntentType.CHAT,
643
+ intent_contract_1.IntentType.MULTIMODAL,
644
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
645
+ ],
646
+ pricing: pricingPerMillionTokens({
647
+ input: 21.0,
648
+ output: 168.0,
649
+ sourceUrl: OPENAI_PRICING_URL,
650
+ }),
651
+ runtimeSupport: {
652
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
653
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
654
+ reason: "OpenAI responses-only model (not supported on /v1/chat/completions)",
655
+ updatedAt: "2026-04-27",
656
+ },
657
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
658
+ },
659
+ {
660
+ id: "gpt-5.2-pro-2025-12-11",
661
+ types: [intent_contract_1.IntentType.CHAT],
662
+ runtimeSupport: {
663
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
664
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
665
+ reason: "OpenAI responses-only model (not supported on /v1/chat/completions)",
666
+ updatedAt: "2026-04-27",
667
+ },
668
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
669
+ },
670
+ // --- gpt-5.1 (base ID is priced; aliases discovered) ---
671
+ {
672
+ id: "gpt-5.1",
673
+ types: [
674
+ intent_contract_1.IntentType.CHAT,
675
+ intent_contract_1.IntentType.MULTIMODAL,
676
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
677
+ ],
678
+ pricing: pricingPerMillionTokens({
679
+ input: 1.25,
680
+ cachedInput: 0.125,
681
+ output: 10.0,
682
+ sourceUrl: OPENAI_PRICING_URL,
683
+ }),
684
+ runtimeSupport: {
685
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
686
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
687
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
688
+ updatedAt: "2026-04-28",
689
+ },
690
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
691
+ },
692
+ {
693
+ id: "gpt-5.1-2025-11-13",
694
+ types: [intent_contract_1.IntentType.CHAT],
695
+ runtimeSupport: {
696
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
697
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
698
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
699
+ updatedAt: "2026-04-28",
700
+ },
701
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
702
+ },
703
+ {
704
+ id: "gpt-5.1-chat-latest",
705
+ types: [intent_contract_1.IntentType.CHAT],
706
+ runtimeSupport: {
707
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
708
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
709
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
710
+ updatedAt: "2026-04-28",
711
+ },
712
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
713
+ },
714
+ {
715
+ id: "gpt-5.1-codex",
716
+ types: [intent_contract_1.IntentType.CHAT],
717
+ runtimeSupport: {
718
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
719
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
720
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
721
+ updatedAt: "2026-04-28",
722
+ },
723
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
724
+ },
725
+ {
726
+ id: "gpt-5.1-codex-max",
727
+ types: [intent_contract_1.IntentType.CHAT],
728
+ runtimeSupport: {
729
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
730
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
731
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
732
+ updatedAt: "2026-04-28",
733
+ },
734
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
735
+ },
736
+ {
737
+ id: "gpt-5.1-codex-mini",
738
+ types: [intent_contract_1.IntentType.CHAT],
739
+ runtimeSupport: {
740
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
741
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
742
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
743
+ updatedAt: "2026-04-28",
744
+ },
745
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
746
+ },
747
+ // --- gpt-5.0 (base IDs are priced; aliases discovered) ---
748
+ {
749
+ id: "gpt-5",
750
+ types: [
751
+ intent_contract_1.IntentType.CHAT,
752
+ intent_contract_1.IntentType.MULTIMODAL,
753
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
754
+ ],
755
+ pricing: pricingPerMillionTokens({
756
+ input: 1.25,
757
+ cachedInput: 0.125,
758
+ output: 10.0,
759
+ sourceUrl: OPENAI_PRICING_URL,
760
+ }),
761
+ runtimeSupport: {
762
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
763
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
764
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
765
+ updatedAt: "2026-04-28",
766
+ },
767
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
768
+ },
769
+ {
770
+ id: "gpt-5-2025-08-07",
771
+ types: [intent_contract_1.IntentType.CHAT],
772
+ runtimeSupport: {
773
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
774
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
775
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
776
+ updatedAt: "2026-04-28",
777
+ },
778
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
779
+ },
780
+ {
781
+ id: "gpt-5-chat-latest",
782
+ types: [intent_contract_1.IntentType.CHAT],
783
+ runtimeSupport: {
784
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
785
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
786
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
787
+ updatedAt: "2026-04-28",
788
+ },
789
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
790
+ },
791
+ {
792
+ id: "gpt-5-codex",
793
+ types: [intent_contract_1.IntentType.CHAT],
794
+ runtimeSupport: {
795
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
796
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
797
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
798
+ updatedAt: "2026-04-28",
799
+ },
800
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
801
+ },
802
+ {
803
+ id: "gpt-5-mini",
804
+ types: [
805
+ intent_contract_1.IntentType.CHAT,
806
+ intent_contract_1.IntentType.MULTIMODAL,
807
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
808
+ ],
809
+ pricing: pricingPerMillionTokens({
810
+ input: 0.25,
811
+ cachedInput: 0.025,
812
+ output: 2.0,
813
+ sourceUrl: OPENAI_PRICING_URL,
814
+ }),
815
+ runtimeSupport: {
816
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
817
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
818
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
819
+ updatedAt: "2026-04-28",
820
+ },
821
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
822
+ },
823
+ {
824
+ id: "gpt-5-mini-2025-08-07",
825
+ types: [intent_contract_1.IntentType.CHAT],
826
+ runtimeSupport: {
827
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
828
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
829
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
830
+ updatedAt: "2026-04-28",
831
+ },
832
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
833
+ },
834
+ {
835
+ id: "gpt-5-nano",
836
+ types: [
837
+ intent_contract_1.IntentType.CHAT,
838
+ intent_contract_1.IntentType.MULTIMODAL,
839
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
840
+ ],
841
+ pricing: pricingPerMillionTokens({
842
+ input: 0.05,
843
+ cachedInput: 0.005,
844
+ output: 0.4,
845
+ sourceUrl: OPENAI_PRICING_URL,
846
+ }),
847
+ runtimeSupport: {
848
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
849
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
850
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
851
+ updatedAt: "2026-04-28",
852
+ },
853
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
854
+ },
855
+ {
856
+ id: "gpt-5-nano-2025-08-07",
857
+ types: [intent_contract_1.IntentType.CHAT],
858
+ runtimeSupport: {
859
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
860
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
861
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
862
+ updatedAt: "2026-04-28",
863
+ },
864
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
865
+ },
866
+ {
867
+ id: "gpt-5-pro",
868
+ types: [
869
+ intent_contract_1.IntentType.CHAT,
870
+ intent_contract_1.IntentType.MULTIMODAL,
871
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
872
+ ],
873
+ pricing: pricingPerMillionTokens({
874
+ input: 15.0,
875
+ output: 120.0,
876
+ sourceUrl: OPENAI_PRICING_URL,
877
+ }),
878
+ runtimeSupport: {
879
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
880
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
881
+ reason: "OpenAI responses-only model (not supported on /v1/chat/completions)",
882
+ updatedAt: "2026-04-27",
883
+ },
884
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
885
+ },
886
+ {
887
+ id: "gpt-5-pro-2025-10-06",
888
+ types: [intent_contract_1.IntentType.CHAT],
889
+ runtimeSupport: {
890
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
891
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
892
+ reason: "OpenAI responses-only model (not supported on /v1/chat/completions)",
893
+ updatedAt: "2026-04-27",
894
+ },
895
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
896
+ },
897
+ {
898
+ id: "gpt-5-search-api",
899
+ types: [intent_contract_1.IntentType.CHAT],
900
+ runtimeSupport: {
901
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
902
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
903
+ reason: "Not supported by runtime: upstream 5xx on basic calls; structured json_schema not supported",
904
+ updatedAt: "2026-04-28",
905
+ },
906
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
907
+ },
908
+ {
909
+ id: "gpt-5-search-api-2025-10-14",
910
+ types: [intent_contract_1.IntentType.CHAT],
911
+ runtimeSupport: {
912
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
913
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
914
+ reason: "Not supported by runtime: upstream 5xx on basic calls; structured json_schema not supported",
915
+ updatedAt: "2026-04-28",
916
+ },
917
+ parameterSupport: OPENAI_GPT5_PARAMETER_SUPPORT,
918
+ },
919
+ {
920
+ id: "gpt-4.1",
921
+ types: [
922
+ intent_contract_1.IntentType.CHAT,
923
+ intent_contract_1.IntentType.MULTIMODAL,
924
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
925
+ ],
926
+ pricing: pricingPerMillionTokens({
927
+ input: 2.0,
928
+ cachedInput: 0.5,
929
+ output: 8.0,
930
+ sourceUrl: OPENAI_PRICING_URL,
931
+ }),
932
+ runtimeSupport: {
933
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
934
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
935
+ reason: "Validated via provider E2E",
936
+ updatedAt: "2026-04-28",
937
+ },
938
+ },
939
+ {
940
+ id: "gpt-4.1-2025-04-14",
941
+ types: [intent_contract_1.IntentType.CHAT],
942
+ runtimeSupport: {
943
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
944
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
945
+ reason: "Validated via provider E2E",
946
+ updatedAt: "2026-04-28",
947
+ },
948
+ },
949
+ {
950
+ id: "gpt-4.1-mini",
951
+ types: [
952
+ intent_contract_1.IntentType.CHAT,
953
+ intent_contract_1.IntentType.MULTIMODAL,
954
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
955
+ ],
956
+ pricing: pricingPerMillionTokens({
957
+ input: 0.4,
958
+ cachedInput: 0.1,
959
+ output: 1.6,
960
+ sourceUrl: OPENAI_PRICING_URL,
961
+ }),
962
+ runtimeSupport: {
963
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
964
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
965
+ reason: "Validated via provider E2E",
966
+ updatedAt: "2026-04-28",
967
+ },
968
+ },
969
+ {
970
+ id: "gpt-4.1-mini-2025-04-14",
971
+ types: [intent_contract_1.IntentType.CHAT],
972
+ runtimeSupport: {
973
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
974
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
975
+ reason: "Validated via provider E2E",
976
+ updatedAt: "2026-04-28",
977
+ },
978
+ },
979
+ {
980
+ id: "gpt-4.1-nano",
981
+ types: [
982
+ intent_contract_1.IntentType.CHAT,
983
+ intent_contract_1.IntentType.MULTIMODAL,
984
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
985
+ ],
986
+ pricing: pricingPerMillionTokens({
987
+ input: 0.1,
988
+ cachedInput: 0.025,
989
+ output: 0.4,
990
+ sourceUrl: OPENAI_PRICING_URL,
991
+ }),
992
+ runtimeSupport: {
993
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
994
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
995
+ reason: "Validated via provider E2E",
996
+ updatedAt: "2026-04-28",
997
+ },
998
+ },
999
+ {
1000
+ id: "gpt-4.1-nano-2025-04-14",
1001
+ types: [intent_contract_1.IntentType.CHAT],
1002
+ runtimeSupport: {
1003
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1004
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1005
+ reason: "Validated via provider E2E",
1006
+ updatedAt: "2026-04-28",
1007
+ },
1008
+ },
1009
+ {
1010
+ id: "gpt-4o",
1011
+ types: [
1012
+ intent_contract_1.IntentType.CHAT,
1013
+ intent_contract_1.IntentType.MULTIMODAL,
1014
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
1015
+ ],
1016
+ pricing: pricingPerMillionTokens({
1017
+ input: 2.5,
1018
+ cachedInput: 1.25,
1019
+ output: 10.0,
1020
+ sourceUrl: OPENAI_PRICING_URL,
1021
+ }),
1022
+ runtimeSupport: {
1023
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1024
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1025
+ reason: "Validated via provider E2E",
1026
+ updatedAt: "2026-04-28",
1027
+ },
1028
+ },
1029
+ {
1030
+ id: "gpt-4o-2024-08-06",
1031
+ types: [intent_contract_1.IntentType.CHAT],
1032
+ runtimeSupport: {
1033
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1034
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1035
+ reason: "Validated via provider E2E",
1036
+ updatedAt: "2026-04-28",
1037
+ },
1038
+ },
1039
+ {
1040
+ id: "gpt-4o-2024-11-20",
1041
+ types: [intent_contract_1.IntentType.CHAT],
1042
+ runtimeSupport: {
1043
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1044
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1045
+ reason: "Validated via provider E2E",
1046
+ updatedAt: "2026-04-28",
1047
+ },
1048
+ },
1049
+ {
1050
+ id: "gpt-4o-search-preview",
1051
+ types: [intent_contract_1.IntentType.CHAT],
1052
+ runtimeSupport: {
1053
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
1054
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1055
+ reason: "Search-preview family is not supported by runtime v1",
1056
+ updatedAt: "2026-05-22",
1057
+ },
1058
+ },
1059
+ {
1060
+ id: "gpt-4o-search-preview-2025-03-11",
1061
+ types: [intent_contract_1.IntentType.CHAT],
1062
+ runtimeSupport: {
1063
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
1064
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1065
+ reason: "Search-preview family is not supported by runtime v1",
1066
+ updatedAt: "2026-05-22",
1067
+ },
1068
+ },
1069
+ {
1070
+ id: "gpt-4o-mini",
1071
+ types: [
1072
+ intent_contract_1.IntentType.CHAT,
1073
+ intent_contract_1.IntentType.MULTIMODAL,
1074
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
1075
+ ],
1076
+ pricing: pricingPerMillionTokens({
1077
+ input: 0.15,
1078
+ cachedInput: 0.075,
1079
+ output: 0.6,
1080
+ sourceUrl: OPENAI_PRICING_URL,
1081
+ }),
1082
+ runtimeSupport: {
1083
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1084
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1085
+ reason: "Validated via provider E2E",
1086
+ updatedAt: "2026-04-28",
1087
+ },
1088
+ },
1089
+ {
1090
+ id: "gpt-4o-mini-2024-07-18",
1091
+ types: [intent_contract_1.IntentType.CHAT],
1092
+ runtimeSupport: {
1093
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1094
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1095
+ reason: "Validated via provider E2E",
1096
+ updatedAt: "2026-04-28",
1097
+ },
1098
+ },
1099
+ {
1100
+ id: "gpt-4o-mini-search-preview",
1101
+ types: [intent_contract_1.IntentType.CHAT],
1102
+ runtimeSupport: {
1103
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
1104
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1105
+ reason: "Search-preview family is not supported by runtime v1",
1106
+ updatedAt: "2026-05-22",
1107
+ },
1108
+ },
1109
+ {
1110
+ id: "gpt-4o-mini-search-preview-2025-03-11",
1111
+ types: [intent_contract_1.IntentType.CHAT],
1112
+ runtimeSupport: {
1113
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
1114
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1115
+ reason: "Search-preview family is not supported by runtime v1",
1116
+ updatedAt: "2026-05-22",
1117
+ },
1118
+ },
1119
+ {
1120
+ id: "gpt-4o-2024-05-13",
1121
+ types: [
1122
+ intent_contract_1.IntentType.CHAT,
1123
+ intent_contract_1.IntentType.MULTIMODAL,
1124
+ intent_contract_1.IntentType.IMAGE_ANALYSIS,
1125
+ ],
1126
+ pricing: pricingPerMillionTokens({
1127
+ input: 5.0,
1128
+ output: 15.0,
1129
+ sourceUrl: OPENAI_PRICING_URL,
1130
+ }),
1131
+ runtimeSupport: {
1132
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1133
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1134
+ reason: "Validated via provider E2E (structured uses prompt-only JSON)",
1135
+ updatedAt: "2026-04-28",
1136
+ },
1137
+ parameterSupport: {
1138
+ parameters: {
1139
+ [PromptParameterKey.RESPONSE_FORMAT]: ProviderModelParameterSupportStatus.NOT_SUPPORTED,
1140
+ },
1141
+ notes: "This model version rejects response_format=json_schema; use prompt-only JSON + local parse.",
1142
+ updatedAt: "2026-04-28",
1143
+ },
1144
+ },
1145
+ {
1146
+ id: "gpt-4-turbo",
1147
+ types: [intent_contract_1.IntentType.CHAT],
1148
+ runtimeSupport: {
1149
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1150
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1151
+ reason: "Validated via provider E2E",
1152
+ updatedAt: "2026-04-28",
1153
+ },
1154
+ },
1155
+ {
1156
+ id: "gpt-4-turbo-2024-04-09",
1157
+ types: [intent_contract_1.IntentType.CHAT],
1158
+ pricing: pricingPerMillionTokens({
1159
+ input: 10.0,
1160
+ output: 30.0,
1161
+ sourceUrl: OPENAI_PRICING_URL,
1162
+ }),
1163
+ runtimeSupport: {
1164
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1165
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1166
+ reason: "Validated via provider E2E",
1167
+ updatedAt: "2026-04-28",
1168
+ },
1169
+ },
1170
+ {
1171
+ id: "gpt-4",
1172
+ types: [intent_contract_1.IntentType.CHAT],
1173
+ runtimeSupport: {
1174
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1175
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1176
+ reason: "Validated via provider E2E",
1177
+ updatedAt: "2026-04-28",
1178
+ },
1179
+ },
1180
+ {
1181
+ id: "gpt-4-0613",
1182
+ types: [intent_contract_1.IntentType.CHAT],
1183
+ pricing: pricingPerMillionTokens({
1184
+ input: 30.0,
1185
+ output: 60.0,
1186
+ sourceUrl: OPENAI_PRICING_URL,
1187
+ }),
1188
+ runtimeSupport: {
1189
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1190
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1191
+ reason: "Validated via provider E2E",
1192
+ updatedAt: "2026-04-28",
1193
+ },
1194
+ },
1195
+ {
1196
+ id: "gpt-3.5-turbo",
1197
+ types: [intent_contract_1.IntentType.CHAT],
1198
+ pricing: pricingPerMillionTokens({
1199
+ input: 0.5,
1200
+ output: 1.5,
1201
+ sourceUrl: OPENAI_PRICING_URL,
1202
+ }),
1203
+ runtimeSupport: {
1204
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1205
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1206
+ reason: "Validated via provider E2E",
1207
+ updatedAt: "2026-04-28",
1208
+ },
1209
+ },
1210
+ {
1211
+ id: "gpt-3.5-turbo-0125",
1212
+ types: [intent_contract_1.IntentType.CHAT],
1213
+ pricing: pricingPerMillionTokens({
1214
+ input: 0.5,
1215
+ output: 1.5,
1216
+ sourceUrl: OPENAI_PRICING_URL,
1217
+ }),
1218
+ runtimeSupport: {
1219
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1220
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1221
+ reason: "Validated via provider E2E",
1222
+ updatedAt: "2026-04-28",
1223
+ },
1224
+ },
1225
+ {
1226
+ id: "gpt-3.5-turbo-1106",
1227
+ types: [intent_contract_1.IntentType.CHAT],
1228
+ pricing: pricingPerMillionTokens({
1229
+ input: 1.0,
1230
+ output: 2.0,
1231
+ sourceUrl: OPENAI_PRICING_URL,
1232
+ }),
1233
+ runtimeSupport: {
1234
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1235
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1236
+ reason: "Validated via provider E2E",
1237
+ updatedAt: "2026-04-28",
1238
+ },
1239
+ },
1240
+ {
1241
+ id: "gpt-3.5-turbo-16k",
1242
+ types: [intent_contract_1.IntentType.CHAT],
1243
+ pricing: pricingPerMillionTokens({
1244
+ input: 3.0,
1245
+ output: 4.0,
1246
+ sourceUrl: OPENAI_PRICING_URL,
1247
+ }),
1248
+ runtimeSupport: {
1249
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1250
+ preferredApi: ProviderModelPreferredApi.CHAT_COMPLETIONS,
1251
+ reason: "Validated via provider E2E",
1252
+ updatedAt: "2026-04-28",
1253
+ },
1254
+ },
1255
+ // --- o-series (reasoning; exposed in /v1/models as o*) ---
1256
+ {
1257
+ id: "o4-mini",
1258
+ types: [intent_contract_1.IntentType.CHAT],
1259
+ pricing: pricingPerMillionTokens({
1260
+ input: 1.1,
1261
+ cachedInput: 0.275,
1262
+ output: 4.4,
1263
+ sourceUrl: OPENAI_PRICING_URL,
1264
+ notes: "Reasoning-family model",
1265
+ }),
1266
+ runtimeSupport: {
1267
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1268
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1269
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1270
+ updatedAt: "2026-04-28",
1271
+ },
1272
+ },
1273
+ {
1274
+ id: "o4-mini-2025-04-16",
1275
+ types: [intent_contract_1.IntentType.CHAT],
1276
+ runtimeSupport: {
1277
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1278
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1279
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1280
+ updatedAt: "2026-04-28",
1281
+ },
1282
+ },
1283
+ {
1284
+ id: "o4-mini-deep-research",
1285
+ types: [intent_contract_1.IntentType.CHAT],
1286
+ runtimeSupport: {
1287
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
1288
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1289
+ reason: "Deep-research family requires specialized tool wiring (not supported in runtime v1)",
1290
+ updatedAt: "2026-05-22",
1291
+ },
1292
+ },
1293
+ {
1294
+ id: "o4-mini-deep-research-2025-06-26",
1295
+ types: [intent_contract_1.IntentType.CHAT],
1296
+ runtimeSupport: {
1297
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
1298
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1299
+ reason: "Deep-research family requires specialized tool wiring (not supported in runtime v1)",
1300
+ updatedAt: "2026-05-22",
1301
+ },
1302
+ },
1303
+ {
1304
+ id: "o3-pro",
1305
+ types: [intent_contract_1.IntentType.CHAT],
1306
+ pricing: pricingPerMillionTokens({
1307
+ input: 20.0,
1308
+ output: 80.0,
1309
+ sourceUrl: OPENAI_PRICING_URL,
1310
+ notes: "Reasoning-family model",
1311
+ }),
1312
+ runtimeSupport: {
1313
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1314
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1315
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1316
+ updatedAt: "2026-04-28",
1317
+ },
1318
+ },
1319
+ {
1320
+ id: "o3-pro-2025-06-10",
1321
+ types: [intent_contract_1.IntentType.CHAT],
1322
+ runtimeSupport: {
1323
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1324
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1325
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1326
+ updatedAt: "2026-04-28",
1327
+ },
1328
+ },
1329
+ {
1330
+ id: "o3",
1331
+ types: [intent_contract_1.IntentType.CHAT],
1332
+ pricing: pricingPerMillionTokens({
1333
+ input: 2.0,
1334
+ cachedInput: 0.5,
1335
+ output: 8.0,
1336
+ sourceUrl: OPENAI_PRICING_URL,
1337
+ notes: "Reasoning-family model",
1338
+ }),
1339
+ runtimeSupport: {
1340
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1341
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1342
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1343
+ updatedAt: "2026-04-28",
1344
+ },
1345
+ },
1346
+ {
1347
+ id: "o3-2025-04-16",
1348
+ types: [intent_contract_1.IntentType.CHAT],
1349
+ runtimeSupport: {
1350
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1351
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1352
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1353
+ updatedAt: "2026-04-28",
1354
+ },
1355
+ },
1356
+ {
1357
+ id: "o3-deep-research",
1358
+ types: [intent_contract_1.IntentType.CHAT],
1359
+ runtimeSupport: {
1360
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
1361
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1362
+ reason: "Deep-research family requires specialized tool wiring (not supported in runtime v1)",
1363
+ updatedAt: "2026-05-22",
1364
+ },
1365
+ },
1366
+ {
1367
+ id: "o3-deep-research-2025-06-26",
1368
+ types: [intent_contract_1.IntentType.CHAT],
1369
+ runtimeSupport: {
1370
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
1371
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1372
+ reason: "Deep-research family requires specialized tool wiring (not supported in runtime v1)",
1373
+ updatedAt: "2026-05-22",
1374
+ },
1375
+ },
1376
+ {
1377
+ id: "o3-mini",
1378
+ types: [intent_contract_1.IntentType.CHAT],
1379
+ pricing: pricingPerMillionTokens({
1380
+ input: 1.1,
1381
+ cachedInput: 0.55,
1382
+ output: 4.4,
1383
+ sourceUrl: OPENAI_PRICING_URL,
1384
+ notes: "Reasoning-family model",
1385
+ }),
1386
+ runtimeSupport: {
1387
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1388
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1389
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1390
+ updatedAt: "2026-04-28",
1391
+ },
1392
+ },
1393
+ {
1394
+ id: "o3-mini-2025-01-31",
1395
+ types: [intent_contract_1.IntentType.CHAT],
1396
+ runtimeSupport: {
1397
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1398
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1399
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1400
+ updatedAt: "2026-04-28",
1401
+ },
1402
+ },
1403
+ {
1404
+ id: "o1-pro",
1405
+ types: [intent_contract_1.IntentType.CHAT],
1406
+ pricing: pricingPerMillionTokens({
1407
+ input: 150.0,
1408
+ output: 600.0,
1409
+ sourceUrl: OPENAI_PRICING_URL,
1410
+ notes: "Reasoning-family model",
1411
+ }),
1412
+ runtimeSupport: {
1413
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1414
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1415
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1416
+ updatedAt: "2026-04-28",
1417
+ },
1418
+ },
1419
+ {
1420
+ id: "o1-pro-2025-03-19",
1421
+ types: [intent_contract_1.IntentType.CHAT],
1422
+ runtimeSupport: {
1423
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1424
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1425
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1426
+ updatedAt: "2026-04-28",
1427
+ },
1428
+ },
1429
+ {
1430
+ id: "o1",
1431
+ types: [intent_contract_1.IntentType.CHAT],
1432
+ pricing: pricingPerMillionTokens({
1433
+ input: 15.0,
1434
+ cachedInput: 7.5,
1435
+ output: 60.0,
1436
+ sourceUrl: OPENAI_PRICING_URL,
1437
+ notes: "Reasoning-family model",
1438
+ }),
1439
+ runtimeSupport: {
1440
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1441
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1442
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1443
+ updatedAt: "2026-04-28",
1444
+ },
1445
+ },
1446
+ {
1447
+ id: "o1-mini",
1448
+ types: [intent_contract_1.IntentType.CHAT],
1449
+ pricing: pricingPerMillionTokens({
1450
+ input: 1.1,
1451
+ cachedInput: 0.55,
1452
+ output: 4.4,
1453
+ sourceUrl: OPENAI_PRICING_URL,
1454
+ notes: "Reasoning-family model",
1455
+ }),
1456
+ runtimeSupport: {
1457
+ status: ProviderModelRuntimeSupportStatus.FAILING,
1458
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1459
+ reason: "Provider E2E: OpenAI returned model_not_found (account/region gated or retired for this key)",
1460
+ updatedAt: "2026-05-22",
1461
+ },
1462
+ },
1463
+ {
1464
+ id: "o1-2024-12-17",
1465
+ types: [intent_contract_1.IntentType.CHAT],
1466
+ runtimeSupport: {
1467
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1468
+ preferredApi: ProviderModelPreferredApi.RESPONSES,
1469
+ reason: "Validated via provider E2E; routed via OpenAI Responses API",
1470
+ updatedAt: "2026-04-28",
1471
+ },
1472
+ },
1473
+ // Other OpenAI models (pricing varies by endpoint/unit; fill as needed)
1474
+ { id: "text-embedding-3-small", types: [intent_contract_1.IntentType.EMBEDDING] },
1475
+ { id: "text-embedding-3-large", types: [intent_contract_1.IntentType.EMBEDDING] },
1476
+ { id: "text-embedding-ada-002", types: [intent_contract_1.IntentType.EMBEDDING] },
1477
+ {
1478
+ id: "gpt-image-1",
1479
+ types: [intent_contract_1.IntentType.IMAGE_GENERATION],
1480
+ pricing: pricingPerMillionTokens({
1481
+ // OpenAI pricing table (standard) exposes per-modality rows; this entry captures the Image modality.
1482
+ input: 10,
1483
+ cachedInput: 2.5,
1484
+ output: 40,
1485
+ sourceUrl: OPENAI_PRICING_URL,
1486
+ updatedAt: PRICING_UPDATED_AT_20260522,
1487
+ notes: "Image modality pricing from OpenAI table; text-row output is '-'",
1488
+ }),
1489
+ runtimeSupport: {
1490
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1491
+ reason: "Discovered via /v1/models; runtime v1 does not yet implement image generation adapters",
1492
+ updatedAt: "2026-05-22",
1493
+ },
1494
+ },
1495
+ {
1496
+ id: "gpt-image-1.5",
1497
+ types: [intent_contract_1.IntentType.IMAGE_GENERATION],
1498
+ pricing: pricingPerMillionTokens({
1499
+ input: 8,
1500
+ cachedInput: 2,
1501
+ output: 32,
1502
+ sourceUrl: OPENAI_PRICING_URL,
1503
+ updatedAt: PRICING_UPDATED_AT_20260522,
1504
+ notes: "Image modality pricing from OpenAI table",
1505
+ }),
1506
+ },
1507
+ {
1508
+ id: "gpt-image-1-mini",
1509
+ types: [intent_contract_1.IntentType.IMAGE_GENERATION],
1510
+ pricing: pricingPerMillionTokens({
1511
+ input: 2.5,
1512
+ cachedInput: 0.25,
1513
+ output: 8,
1514
+ sourceUrl: OPENAI_PRICING_URL,
1515
+ updatedAt: PRICING_UPDATED_AT_20260522,
1516
+ notes: "Image modality pricing from OpenAI table; text-row output is '-'",
1517
+ }),
1518
+ },
1519
+ {
1520
+ id: "gpt-image-2",
1521
+ types: [intent_contract_1.IntentType.IMAGE_GENERATION],
1522
+ pricing: pricingPerMillionTokens({
1523
+ input: 8,
1524
+ cachedInput: 2,
1525
+ output: 30,
1526
+ sourceUrl: OPENAI_PRICING_URL,
1527
+ updatedAt: PRICING_UPDATED_AT_20260522,
1528
+ notes: "Image modality pricing from OpenAI table; text-row output is '-'",
1529
+ }),
1530
+ runtimeSupport: {
1531
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1532
+ reason: "Discovered via /v1/models; runtime v1 does not yet implement image generation adapters",
1533
+ updatedAt: "2026-05-22",
1534
+ },
1535
+ },
1536
+ {
1537
+ id: "gpt-image-2-2026-04-21",
1538
+ types: [intent_contract_1.IntentType.IMAGE_GENERATION],
1539
+ runtimeSupport: {
1540
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1541
+ reason: "Discovered via /v1/models; runtime v1 does not yet implement image generation adapters",
1542
+ updatedAt: "2026-05-22",
1543
+ },
1544
+ },
1545
+ { id: "dall-e-3", types: [intent_contract_1.IntentType.IMAGE_GENERATION] },
1546
+ { id: "dall-e-2", types: [intent_contract_1.IntentType.IMAGE_GENERATION] },
1547
+ { id: "gpt-4o-transcribe", types: [intent_contract_1.IntentType.SPEECH_TO_TEXT] },
1548
+ { id: "gpt-4o-mini-transcribe", types: [intent_contract_1.IntentType.SPEECH_TO_TEXT] },
1549
+ {
1550
+ id: "gpt-4o-mini-transcribe-2025-03-20",
1551
+ types: [intent_contract_1.IntentType.SPEECH_TO_TEXT],
1552
+ },
1553
+ {
1554
+ id: "gpt-4o-mini-transcribe-2025-12-15",
1555
+ types: [intent_contract_1.IntentType.SPEECH_TO_TEXT],
1556
+ },
1557
+ { id: "gpt-4o-transcribe-diarize", types: [intent_contract_1.IntentType.SPEECH_TO_TEXT] },
1558
+ { id: "whisper-1", types: [intent_contract_1.IntentType.SPEECH_TO_TEXT] },
1559
+ { id: "gpt-4o-mini-tts", types: [intent_contract_1.IntentType.TEXT_TO_SPEECH] },
1560
+ { id: "gpt-4o-mini-tts-2025-03-20", types: [intent_contract_1.IntentType.TEXT_TO_SPEECH] },
1561
+ { id: "gpt-4o-mini-tts-2025-12-15", types: [intent_contract_1.IntentType.TEXT_TO_SPEECH] },
1562
+ { id: "tts-1", types: [intent_contract_1.IntentType.TEXT_TO_SPEECH] },
1563
+ { id: "tts-1-hd", types: [intent_contract_1.IntentType.TEXT_TO_SPEECH] },
1564
+ {
1565
+ id: "gpt-audio",
1566
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1567
+ pricing: pricingPerMillionTokens({
1568
+ // Base = Text modality; audio modality captured as a tier.
1569
+ input: 2.5,
1570
+ output: 10,
1571
+ tiers: [
1572
+ { name: "audio", condition: "Audio modality", input: 32, output: 64 },
1573
+ ],
1574
+ sourceUrl: OPENAI_PRICING_URL,
1575
+ updatedAt: PRICING_UPDATED_AT_20260522,
1576
+ notes: "OpenAI pricing table provides separate Text/Audio modality rows; cached input is '-'",
1577
+ }),
1578
+ runtimeSupport: {
1579
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1580
+ reason: "Discovered via /v1/models; runtime v1 does not yet implement audio/multimodal adapters",
1581
+ updatedAt: "2026-05-22",
1582
+ },
1583
+ },
1584
+ {
1585
+ id: "gpt-audio-1.5",
1586
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1587
+ pricing: pricingPerMillionTokens({
1588
+ input: 2.5,
1589
+ output: 10,
1590
+ tiers: [
1591
+ { name: "audio", condition: "Audio modality", input: 32, output: 64 },
1592
+ ],
1593
+ sourceUrl: OPENAI_PRICING_URL,
1594
+ updatedAt: PRICING_UPDATED_AT_20260522,
1595
+ notes: "OpenAI pricing table provides separate Text/Audio modality rows; cached input is '-'",
1596
+ }),
1597
+ runtimeSupport: {
1598
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1599
+ reason: "Discovered via /v1/models; runtime v1 does not yet implement audio/multimodal adapters",
1600
+ updatedAt: "2026-05-22",
1601
+ },
1602
+ },
1603
+ {
1604
+ id: "gpt-audio-2025-08-28",
1605
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1606
+ runtimeSupport: {
1607
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1608
+ reason: "Discovered via /v1/models; runtime v1 does not yet implement audio/multimodal adapters",
1609
+ updatedAt: "2026-05-22",
1610
+ },
1611
+ },
1612
+ {
1613
+ id: "gpt-audio-mini",
1614
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1615
+ pricing: pricingPerMillionTokens({
1616
+ input: 0.6,
1617
+ output: 2.4,
1618
+ tiers: [
1619
+ { name: "audio", condition: "Audio modality", input: 10, output: 20 },
1620
+ ],
1621
+ sourceUrl: OPENAI_PRICING_URL,
1622
+ updatedAt: PRICING_UPDATED_AT_20260522,
1623
+ notes: "OpenAI pricing table provides separate Text/Audio modality rows; cached input is '-'",
1624
+ }),
1625
+ runtimeSupport: {
1626
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1627
+ reason: "Discovered via /v1/models; runtime v1 does not yet implement audio/multimodal adapters",
1628
+ updatedAt: "2026-05-22",
1629
+ },
1630
+ },
1631
+ {
1632
+ id: "gpt-audio-mini-2025-10-06",
1633
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1634
+ runtimeSupport: {
1635
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1636
+ reason: "Discovered via /v1/models; runtime v1 does not yet implement audio/multimodal adapters",
1637
+ updatedAt: "2026-05-22",
1638
+ },
1639
+ },
1640
+ {
1641
+ id: "gpt-audio-mini-2025-12-15",
1642
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1643
+ runtimeSupport: {
1644
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1645
+ reason: "Discovered via /v1/models; runtime v1 does not yet implement audio/multimodal adapters",
1646
+ updatedAt: "2026-05-22",
1647
+ },
1648
+ },
1649
+ {
1650
+ id: "gpt-realtime",
1651
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1652
+ pricing: pricingPerMillionTokens({
1653
+ // Base = Text modality; audio modality captured as a tier.
1654
+ input: 4,
1655
+ cachedInput: 0.4,
1656
+ output: 16,
1657
+ tiers: [
1658
+ {
1659
+ name: "audio",
1660
+ condition: "Audio modality",
1661
+ input: 32,
1662
+ cachedInput: 0.4,
1663
+ output: 64,
1664
+ },
1665
+ ],
1666
+ sourceUrl: OPENAI_PRICING_URL,
1667
+ updatedAt: PRICING_UPDATED_AT_20260522,
1668
+ notes: "OpenAI pricing table provides separate Text/Audio modality rows",
1669
+ }),
1670
+ runtimeSupport: {
1671
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1672
+ reason: "Discovered via /v1/models; realtime adapters not implemented in runtime v1",
1673
+ updatedAt: "2026-05-22",
1674
+ },
1675
+ },
1676
+ {
1677
+ id: "gpt-realtime-2",
1678
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1679
+ pricing: pricingPerMillionTokens({
1680
+ input: 4,
1681
+ cachedInput: 0.4,
1682
+ output: 24,
1683
+ tiers: [
1684
+ {
1685
+ name: "audio",
1686
+ condition: "Audio modality",
1687
+ input: 32,
1688
+ cachedInput: 0.4,
1689
+ output: 64,
1690
+ },
1691
+ ],
1692
+ sourceUrl: OPENAI_PRICING_URL,
1693
+ updatedAt: PRICING_UPDATED_AT_20260522,
1694
+ notes: "OpenAI pricing table provides separate Text/Audio modality rows",
1695
+ }),
1696
+ runtimeSupport: {
1697
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1698
+ reason: "Discovered via /v1/models; realtime adapters not implemented in runtime v1",
1699
+ updatedAt: "2026-05-22",
1700
+ },
1701
+ },
1702
+ {
1703
+ id: "gpt-realtime-2025-08-28",
1704
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1705
+ runtimeSupport: {
1706
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1707
+ reason: "Discovered via /v1/models; realtime adapters not implemented in runtime v1",
1708
+ updatedAt: "2026-05-22",
1709
+ },
1710
+ },
1711
+ {
1712
+ id: "gpt-realtime-1.5",
1713
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1714
+ pricing: pricingPerMillionTokens({
1715
+ input: 4,
1716
+ cachedInput: 0.4,
1717
+ output: 16,
1718
+ tiers: [
1719
+ {
1720
+ name: "audio",
1721
+ condition: "Audio modality",
1722
+ input: 32,
1723
+ cachedInput: 0.4,
1724
+ output: 64,
1725
+ },
1726
+ ],
1727
+ sourceUrl: OPENAI_PRICING_URL,
1728
+ updatedAt: PRICING_UPDATED_AT_20260522,
1729
+ notes: "OpenAI pricing table provides separate Text/Audio modality rows",
1730
+ }),
1731
+ },
1732
+ {
1733
+ id: "gpt-realtime-mini",
1734
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1735
+ pricing: pricingPerMillionTokens({
1736
+ input: 0.6,
1737
+ cachedInput: 0.3,
1738
+ output: 2.4,
1739
+ tiers: [
1740
+ { name: "audio", condition: "Audio modality", input: 10, output: 20 },
1741
+ ],
1742
+ sourceUrl: OPENAI_PRICING_URL,
1743
+ updatedAt: PRICING_UPDATED_AT_20260522,
1744
+ notes: "OpenAI pricing table provides separate Text/Audio modality rows; audio row has no cached input",
1745
+ }),
1746
+ },
1747
+ {
1748
+ id: "gpt-realtime-mini-2025-10-06",
1749
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1750
+ runtimeSupport: {
1751
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1752
+ reason: "Discovered via /v1/models; realtime adapters not implemented in runtime v1",
1753
+ updatedAt: "2026-05-22",
1754
+ },
1755
+ },
1756
+ {
1757
+ id: "gpt-realtime-mini-2025-12-15",
1758
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1759
+ runtimeSupport: {
1760
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1761
+ reason: "Discovered via /v1/models; realtime adapters not implemented in runtime v1",
1762
+ updatedAt: "2026-05-22",
1763
+ },
1764
+ },
1765
+ {
1766
+ id: "gpt-realtime-translate",
1767
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1768
+ pricing: pricingAudioMinutesPerMinute({
1769
+ input: 0.034,
1770
+ sourceUrl: OPENAI_PRICING_URL,
1771
+ updatedAt: PRICING_UPDATED_AT_20260522,
1772
+ notes: "OpenAI pricing table: $0.034 / minute",
1773
+ }),
1774
+ runtimeSupport: {
1775
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1776
+ reason: "Discovered via /v1/models; realtime adapters not implemented in runtime v1",
1777
+ updatedAt: "2026-05-22",
1778
+ },
1779
+ },
1780
+ {
1781
+ id: "gpt-realtime-whisper",
1782
+ types: [intent_contract_1.IntentType.MULTIMODAL],
1783
+ pricing: pricingAudioMinutesPerMinute({
1784
+ input: 0.017,
1785
+ sourceUrl: OPENAI_PRICING_URL,
1786
+ updatedAt: PRICING_UPDATED_AT_20260522,
1787
+ notes: "OpenAI pricing table: $0.017 / minute",
1788
+ }),
1789
+ runtimeSupport: {
1790
+ status: ProviderModelRuntimeSupportStatus.IN_PROGRESS,
1791
+ reason: "Discovered via /v1/models; realtime adapters not implemented in runtime v1",
1792
+ updatedAt: "2026-05-22",
1793
+ },
1794
+ },
1795
+ ],
1796
+ [IntentProvider.GEMINI]: [
1797
+ // Source: Gemini Models API (`npm run gemini-models:sync`), updated 2026-05-04
1798
+ // Notes:
1799
+ // - DCDR runtime v1 implements Gemini for CHAT only (via generateContent / generateContentStream).
1800
+ // - Embedding models are cataloged as EMBEDDING, but the runtime does not yet implement a Gemini embedding adapter.
1801
+ // --- Validated starter model ---
1802
+ {
1803
+ id: "gemini-2.5-flash",
1804
+ types: [intent_contract_1.IntentType.CHAT],
1805
+ publicForCustomers: true,
1806
+ tokenUsageCovered: true,
1807
+ publicName: "DCDR Economy",
1808
+ badge: "Fast",
1809
+ primaryCategory: DcdrPublicModelCategory.ECONOMY,
1810
+ categories: [
1811
+ DcdrPublicModelCategory.ECONOMY,
1812
+ DcdrPublicModelCategory.FAST,
1813
+ ],
1814
+ qualityTier: 3,
1815
+ speedTier: 4,
1816
+ costTier: 5,
1817
+ recommendedUseCases: ["high_volume_chat", "extraction", "classification"],
1818
+ isRecommended: false,
1819
+ isGlobalDefault: false,
1820
+ isCategoryDefault: true,
1821
+ pricing: pricingGeminiPerMillionTokens({
1822
+ input: 0.3,
1823
+ output: 2.5,
1824
+ tiers: [{ name: "audio", condition: "audio", input: 1.0, output: 2.5 }],
1825
+ notes: "Prices may differ by modality; output includes thinking tokens.",
1826
+ }),
1827
+ runtimeSupport: {
1828
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1829
+ reason: "Validated via provider E2E (run + structured + streaming SSE)",
1830
+ updatedAt: "2026-05-04",
1831
+ },
1832
+ },
1833
+ // --- Newer preview families (pending E2E curation) ---
1834
+ // Discovered via Gemini Models API (2026-05-22).
1835
+ {
1836
+ id: "gemini-3.5-flash",
1837
+ types: [intent_contract_1.IntentType.CHAT],
1838
+ publicForCustomers: true,
1839
+ tokenUsageCovered: true,
1840
+ publicName: "DCDR Smart",
1841
+ badge: "Fast",
1842
+ primaryCategory: DcdrPublicModelCategory.SMART,
1843
+ categories: [DcdrPublicModelCategory.SMART, DcdrPublicModelCategory.FAST],
1844
+ qualityTier: 4,
1845
+ speedTier: 5,
1846
+ costTier: 4,
1847
+ recommendedUseCases: ["production_chat", "interactive_chat", "support"],
1848
+ isRecommended: true,
1849
+ isGlobalDefault: true,
1850
+ isCategoryDefault: true,
1851
+ pricing: pricingGeminiPerMillionTokens({
1852
+ input: 1.5,
1853
+ output: 9.0,
1854
+ notes: "Output price includes thinking tokens.",
1855
+ }),
1856
+ runtimeSupport: {
1857
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1858
+ reason: "Validated via provider E2E (text + structured); requires default thinking disable under small token budgets",
1859
+ updatedAt: "2026-05-22",
1860
+ },
1861
+ },
1862
+ {
1863
+ id: "gemini-3.1-pro-preview-customtools",
1864
+ types: [intent_contract_1.IntentType.CHAT],
1865
+ pricing: pricingGeminiPerMillionTokens({
1866
+ input: 2.0,
1867
+ output: 12.0,
1868
+ tiers: [
1869
+ {
1870
+ name: "prompts <= 200k",
1871
+ condition: "prompts <= 200k tokens",
1872
+ input: 2.0,
1873
+ output: 12.0,
1874
+ },
1875
+ {
1876
+ name: "prompts > 200k",
1877
+ condition: "prompts > 200k tokens",
1878
+ input: 4.0,
1879
+ output: 18.0,
1880
+ },
1881
+ ],
1882
+ notes: "Output price includes thinking tokens.",
1883
+ }),
1884
+ runtimeSupport: {
1885
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1886
+ reason: "Validated via provider E2E (text + structured + streaming SSE) with larger token budgets; model uses thinking",
1887
+ updatedAt: "2026-05-04",
1888
+ },
1889
+ },
1890
+ {
1891
+ id: "gemini-3.1-pro-preview",
1892
+ types: [intent_contract_1.IntentType.CHAT],
1893
+ publicForCustomers: true,
1894
+ tokenUsageCovered: true,
1895
+ publicName: "DCDR Best",
1896
+ badge: "Gemini",
1897
+ primaryCategory: DcdrPublicModelCategory.BEST,
1898
+ categories: [DcdrPublicModelCategory.BEST],
1899
+ qualityTier: 5,
1900
+ speedTier: 3,
1901
+ costTier: 3,
1902
+ recommendedUseCases: ["reasoning", "agentic_coding", "long_context"],
1903
+ isRecommended: false,
1904
+ isGlobalDefault: false,
1905
+ isCategoryDefault: false,
1906
+ pricing: pricingGeminiPerMillionTokens({
1907
+ input: 2.0,
1908
+ output: 12.0,
1909
+ tiers: [
1910
+ {
1911
+ name: "prompts <= 200k",
1912
+ condition: "prompts <= 200k tokens",
1913
+ input: 2.0,
1914
+ output: 12.0,
1915
+ },
1916
+ {
1917
+ name: "prompts > 200k",
1918
+ condition: "prompts > 200k tokens",
1919
+ input: 4.0,
1920
+ output: 18.0,
1921
+ },
1922
+ ],
1923
+ notes: "Output price includes thinking tokens.",
1924
+ }),
1925
+ runtimeSupport: {
1926
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1927
+ reason: "Validated via provider E2E (text + structured + streaming SSE) with larger token budgets; model uses thinking",
1928
+ updatedAt: "2026-05-04",
1929
+ },
1930
+ },
1931
+ {
1932
+ id: "gemini-3.1-flash-tts-preview",
1933
+ types: [intent_contract_1.IntentType.CHAT],
1934
+ pricing: pricingGeminiPerMillionTokens({
1935
+ input: 1.0,
1936
+ output: 20.0,
1937
+ notes: "TTS preview: output billed as audio tokens (docs: ~25 tokens/sec).",
1938
+ }),
1939
+ runtimeSupport: {
1940
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
1941
+ reason: "Rejects developer/system instruction in runtime prompt shape (400 INVALID_ARGUMENT)",
1942
+ updatedAt: "2026-05-04",
1943
+ },
1944
+ },
1945
+ {
1946
+ id: "gemini-3.1-flash-live-preview",
1947
+ types: [intent_contract_1.IntentType.CHAT],
1948
+ pricing: pricingGeminiPerMillionTokens({
1949
+ input: 0.75,
1950
+ output: 4.5,
1951
+ tiers: [
1952
+ { name: "audio", condition: "audio", input: 3.0, output: 12.0 },
1953
+ {
1954
+ name: "image/video",
1955
+ condition: "image/video",
1956
+ input: 1.0,
1957
+ output: 4.5,
1958
+ },
1959
+ ],
1960
+ notes: "Live preview pricing varies by modality; docs also list per-minute rates for audio/video.",
1961
+ }),
1962
+ runtimeSupport: {
1963
+ status: ProviderModelRuntimeSupportStatus.FAILING,
1964
+ reason: "Model/endpoint not found (404) in provider E2E for this account",
1965
+ updatedAt: "2026-05-04",
1966
+ },
1967
+ },
1968
+ {
1969
+ id: "gemini-3.1-flash-lite-preview",
1970
+ types: [intent_contract_1.IntentType.CHAT],
1971
+ pricing: pricingGeminiPerMillionTokens({
1972
+ input: 0.25,
1973
+ output: 1.5,
1974
+ tiers: [{ name: "audio", condition: "audio", input: 0.5, output: 1.5 }],
1975
+ notes: "Prices may differ by modality; output includes thinking tokens.",
1976
+ }),
1977
+ runtimeSupport: {
1978
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1979
+ reason: "Validated via provider E2E (text + structured + streaming SSE)",
1980
+ updatedAt: "2026-05-04",
1981
+ },
1982
+ },
1983
+ // Discovered via Gemini Models API (2026-05-22).
1984
+ {
1985
+ id: "gemini-3.1-flash-lite",
1986
+ types: [intent_contract_1.IntentType.CHAT],
1987
+ runtimeSupport: {
1988
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
1989
+ reason: "Validated via provider E2E (text + structured)",
1990
+ updatedAt: "2026-05-22",
1991
+ },
1992
+ },
1993
+ {
1994
+ id: "gemini-3.1-flash-image-preview",
1995
+ types: [intent_contract_1.IntentType.CHAT],
1996
+ pricing: pricingGeminiPerMillionTokens({
1997
+ input: 0.5,
1998
+ output: 3.0,
1999
+ notes: "Image-preview model; docs list separate image output pricing (not modeled here).",
2000
+ }),
2001
+ runtimeSupport: {
2002
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2003
+ reason: "Validated via provider E2E (text + structured + streaming SSE)",
2004
+ updatedAt: "2026-05-04",
2005
+ },
2006
+ },
2007
+ {
2008
+ id: "gemini-3-pro-preview",
2009
+ types: [intent_contract_1.IntentType.CHAT],
2010
+ pricing: {
2011
+ ...pricingGeminiPerMillionTokens({
2012
+ input: 2.0,
2013
+ output: 12.0,
2014
+ tiers: [
2015
+ {
2016
+ name: "prompts <= 200k",
2017
+ condition: "prompts <= 200k tokens",
2018
+ input: 2.0,
2019
+ output: 12.0,
2020
+ },
2021
+ {
2022
+ name: "prompts > 200k",
2023
+ condition: "prompts > 200k tokens",
2024
+ input: 4.0,
2025
+ output: 18.0,
2026
+ },
2027
+ ],
2028
+ notes: "Output price includes thinking tokens.",
2029
+ }),
2030
+ confidence: "approx",
2031
+ notes: "Not explicitly listed on pricing page; approximated from Gemini 3.1 Pro Preview.",
2032
+ },
2033
+ runtimeSupport: {
2034
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2035
+ reason: "Validated via provider E2E (text + structured + streaming SSE)",
2036
+ updatedAt: "2026-05-04",
2037
+ },
2038
+ },
2039
+ {
2040
+ id: "gemini-3-pro-image-preview",
2041
+ types: [intent_contract_1.IntentType.CHAT],
2042
+ pricing: pricingGeminiPerMillionTokens({
2043
+ input: 2.0,
2044
+ output: 12.0,
2045
+ tiers: [
2046
+ {
2047
+ name: "prompts <= 200k",
2048
+ condition: "prompts <= 200k tokens",
2049
+ input: 2.0,
2050
+ output: 12.0,
2051
+ },
2052
+ {
2053
+ name: "prompts > 200k",
2054
+ condition: "prompts > 200k tokens",
2055
+ input: 4.0,
2056
+ output: 18.0,
2057
+ },
2058
+ ],
2059
+ notes: "Image generation model; text pricing is the same as Gemini 3.1 Pro (image output priced separately).",
2060
+ }),
2061
+ runtimeSupport: {
2062
+ status: ProviderModelRuntimeSupportStatus.FAILING,
2063
+ reason: "Structured mode returned empty text in provider E2E (streaming SSE OK)",
2064
+ updatedAt: "2026-05-04",
2065
+ },
2066
+ },
2067
+ {
2068
+ id: "gemini-3-flash-preview",
2069
+ types: [intent_contract_1.IntentType.CHAT],
2070
+ publicForCustomers: true,
2071
+ tokenUsageCovered: true,
2072
+ publicName: "DCDR Fast",
2073
+ badge: "Gemini",
2074
+ primaryCategory: DcdrPublicModelCategory.FAST,
2075
+ categories: [
2076
+ DcdrPublicModelCategory.FAST,
2077
+ DcdrPublicModelCategory.ECONOMY,
2078
+ ],
2079
+ qualityTier: 3,
2080
+ speedTier: 5,
2081
+ costTier: 4,
2082
+ recommendedUseCases: ["interactive_chat", "support", "rewriting"],
2083
+ isRecommended: false,
2084
+ isGlobalDefault: false,
2085
+ isCategoryDefault: false,
2086
+ pricing: pricingGeminiPerMillionTokens({
2087
+ input: 0.5,
2088
+ output: 3.0,
2089
+ tiers: [{ name: "audio", condition: "audio", input: 1.0, output: 3.0 }],
2090
+ notes: "Prices may differ by modality; output includes thinking tokens.",
2091
+ }),
2092
+ runtimeSupport: {
2093
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2094
+ reason: "Validated via provider E2E (text + structured + streaming SSE)",
2095
+ updatedAt: "2026-05-04",
2096
+ },
2097
+ },
2098
+ // --- 2.5 family variants (pending E2E curation) ---
2099
+ {
2100
+ id: "gemini-2.5-pro",
2101
+ types: [intent_contract_1.IntentType.CHAT],
2102
+ pricing: pricingGeminiPerMillionTokens({
2103
+ input: 1.25,
2104
+ output: 10.0,
2105
+ tiers: [
2106
+ {
2107
+ name: "prompts <= 200k",
2108
+ condition: "prompts <= 200k tokens",
2109
+ input: 1.25,
2110
+ output: 10.0,
2111
+ },
2112
+ {
2113
+ name: "prompts > 200k",
2114
+ condition: "prompts > 200k tokens",
2115
+ input: 2.5,
2116
+ output: 15.0,
2117
+ },
2118
+ ],
2119
+ notes: "Output price includes thinking tokens.",
2120
+ }),
2121
+ runtimeSupport: {
2122
+ status: ProviderModelRuntimeSupportStatus.FAILING,
2123
+ reason: "Provider E2E: empty output in text + structured (streaming SSE OK)",
2124
+ updatedAt: "2026-05-04",
2125
+ },
2126
+ },
2127
+ {
2128
+ id: "gemini-2.5-pro-preview-tts",
2129
+ types: [intent_contract_1.IntentType.CHAT],
2130
+ pricing: pricingGeminiPerMillionTokens({
2131
+ input: 1.0,
2132
+ output: 20.0,
2133
+ notes: "TTS preview: output billed as audio tokens.",
2134
+ }),
2135
+ runtimeSupport: {
2136
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
2137
+ reason: "Audio-only response modality (TEXT unsupported) in provider E2E; runtime v1 is text-only",
2138
+ updatedAt: "2026-05-04",
2139
+ },
2140
+ },
2141
+ {
2142
+ id: "gemini-2.5-flash-lite",
2143
+ types: [intent_contract_1.IntentType.CHAT],
2144
+ publicForCustomers: true,
2145
+ tokenUsageCovered: true,
2146
+ publicName: "DCDR Economy",
2147
+ badge: "Lowest cost",
2148
+ primaryCategory: DcdrPublicModelCategory.ECONOMY,
2149
+ categories: [DcdrPublicModelCategory.ECONOMY],
2150
+ qualityTier: 2,
2151
+ speedTier: 5,
2152
+ costTier: 5,
2153
+ recommendedUseCases: [
2154
+ "high_volume_extraction",
2155
+ "classification",
2156
+ "rewriting",
2157
+ ],
2158
+ isRecommended: false,
2159
+ isGlobalDefault: false,
2160
+ isCategoryDefault: false,
2161
+ pricing: pricingGeminiPerMillionTokens({
2162
+ input: 0.1,
2163
+ output: 0.4,
2164
+ tiers: [{ name: "audio", condition: "audio", input: 0.3, output: 0.4 }],
2165
+ notes: "Prices may differ by modality; output includes thinking tokens.",
2166
+ }),
2167
+ runtimeSupport: {
2168
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2169
+ reason: "Validated via provider E2E (text + structured + streaming SSE)",
2170
+ updatedAt: "2026-05-04",
2171
+ },
2172
+ },
2173
+ {
2174
+ id: "gemini-2.5-flash-image",
2175
+ types: [intent_contract_1.IntentType.CHAT],
2176
+ pricing: pricingGeminiPerMillionTokens({
2177
+ input: 0.3,
2178
+ output: 2.5,
2179
+ notes: "Image generation model; docs list separate per-image output pricing (not modeled here).",
2180
+ }),
2181
+ runtimeSupport: {
2182
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2183
+ reason: "Validated via provider E2E (text + structured + streaming SSE)",
2184
+ updatedAt: "2026-05-04",
2185
+ },
2186
+ },
2187
+ {
2188
+ id: "gemini-2.5-flash-native-audio-latest",
2189
+ types: [intent_contract_1.IntentType.CHAT],
2190
+ pricing: pricingGeminiPerMillionTokens({
2191
+ input: 0.5,
2192
+ output: 2.0,
2193
+ tiers: [
2194
+ {
2195
+ name: "audio/video",
2196
+ condition: "audio/video",
2197
+ input: 3.0,
2198
+ output: 12.0,
2199
+ },
2200
+ ],
2201
+ notes: "Native audio (Live API): docs also list per-minute rates for audio; output includes thinking tokens.",
2202
+ }),
2203
+ runtimeSupport: {
2204
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
2205
+ reason: "Native-audio model (text-only runtime v1); also 404 in provider E2E for this account",
2206
+ updatedAt: "2026-05-04",
2207
+ },
2208
+ },
2209
+ {
2210
+ id: "gemini-2.5-flash-native-audio-preview-09-2025",
2211
+ types: [intent_contract_1.IntentType.CHAT],
2212
+ pricing: pricingGeminiPerMillionTokens({
2213
+ input: 0.5,
2214
+ output: 2.0,
2215
+ tiers: [
2216
+ {
2217
+ name: "audio/video",
2218
+ condition: "audio/video",
2219
+ input: 3.0,
2220
+ output: 12.0,
2221
+ },
2222
+ ],
2223
+ notes: "Native audio (Live API): docs also list per-minute rates for audio; output includes thinking tokens.",
2224
+ }),
2225
+ runtimeSupport: {
2226
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
2227
+ reason: "Native-audio model (text-only runtime v1); also 404 in provider E2E for this account",
2228
+ updatedAt: "2026-05-04",
2229
+ },
2230
+ },
2231
+ {
2232
+ id: "gemini-2.5-flash-native-audio-preview-12-2025",
2233
+ types: [intent_contract_1.IntentType.CHAT],
2234
+ pricing: pricingGeminiPerMillionTokens({
2235
+ input: 0.5,
2236
+ output: 2.0,
2237
+ tiers: [
2238
+ {
2239
+ name: "audio/video",
2240
+ condition: "audio/video",
2241
+ input: 3.0,
2242
+ output: 12.0,
2243
+ },
2244
+ ],
2245
+ notes: "Native audio (Live API): docs also list per-minute rates for audio; output includes thinking tokens.",
2246
+ }),
2247
+ runtimeSupport: {
2248
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
2249
+ reason: "Native-audio model (text-only runtime v1); also 404 in provider E2E for this account",
2250
+ updatedAt: "2026-05-04",
2251
+ },
2252
+ },
2253
+ {
2254
+ id: "gemini-2.5-flash-preview-tts",
2255
+ types: [intent_contract_1.IntentType.CHAT],
2256
+ pricing: pricingGeminiPerMillionTokens({
2257
+ input: 0.5,
2258
+ output: 10.0,
2259
+ notes: "TTS preview: output billed as audio tokens.",
2260
+ }),
2261
+ runtimeSupport: {
2262
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
2263
+ reason: "Audio-only response modality (TEXT unsupported) in provider E2E; runtime v1 is text-only",
2264
+ updatedAt: "2026-05-04",
2265
+ },
2266
+ },
2267
+ {
2268
+ id: "gemini-2.5-computer-use-preview-10-2025",
2269
+ types: [intent_contract_1.IntentType.CHAT],
2270
+ pricing: pricingGeminiPerMillionTokens({
2271
+ input: 1.25,
2272
+ output: 10.0,
2273
+ tiers: [
2274
+ {
2275
+ name: "prompts <= 200k",
2276
+ condition: "prompts <= 200k tokens",
2277
+ input: 1.25,
2278
+ output: 10.0,
2279
+ },
2280
+ {
2281
+ name: "prompts > 200k",
2282
+ condition: "prompts > 200k tokens",
2283
+ input: 2.5,
2284
+ output: 15.0,
2285
+ },
2286
+ ],
2287
+ notes: "Computer Use model token pricing (tools may have separate charges).",
2288
+ }),
2289
+ runtimeSupport: {
2290
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
2291
+ reason: "Requires Computer Use tool wiring (not supported in runtime v1)",
2292
+ updatedAt: "2026-05-04",
2293
+ },
2294
+ },
2295
+ // --- Older 2.0 family IDs (may appear but can be unavailable to new users) ---
2296
+ {
2297
+ id: "gemini-2.0-flash",
2298
+ types: [intent_contract_1.IntentType.CHAT],
2299
+ pricing: pricingGeminiPerMillionTokens({
2300
+ input: 0.1,
2301
+ output: 0.4,
2302
+ tiers: [{ name: "audio", condition: "audio", input: 0.7, output: 0.4 }],
2303
+ notes: "Deprecated model family (shutdown noted in docs).",
2304
+ }),
2305
+ runtimeSupport: {
2306
+ status: ProviderModelRuntimeSupportStatus.FAILING,
2307
+ reason: "Visible via Models API but may be unavailable to new users (404)",
2308
+ updatedAt: "2026-05-04",
2309
+ },
2310
+ },
2311
+ {
2312
+ id: "gemini-2.0-flash-001",
2313
+ types: [intent_contract_1.IntentType.CHAT],
2314
+ pricing: pricingGeminiPerMillionTokens({
2315
+ input: 0.1,
2316
+ output: 0.4,
2317
+ tiers: [{ name: "audio", condition: "audio", input: 0.7, output: 0.4 }],
2318
+ notes: "Deprecated model family (shutdown noted in docs).",
2319
+ }),
2320
+ runtimeSupport: {
2321
+ status: ProviderModelRuntimeSupportStatus.FAILING,
2322
+ reason: "Visible via Models API but may be unavailable to new users (404)",
2323
+ updatedAt: "2026-05-04",
2324
+ },
2325
+ },
2326
+ {
2327
+ id: "gemini-2.0-flash-lite",
2328
+ types: [intent_contract_1.IntentType.CHAT],
2329
+ pricing: pricingGeminiPerMillionTokens({
2330
+ input: 0.075,
2331
+ output: 0.3,
2332
+ notes: "Deprecated model family (shutdown noted in docs).",
2333
+ }),
2334
+ runtimeSupport: {
2335
+ status: ProviderModelRuntimeSupportStatus.FAILING,
2336
+ reason: "Visible via Models API but may be unavailable to new users (404)",
2337
+ updatedAt: "2026-05-04",
2338
+ },
2339
+ },
2340
+ {
2341
+ id: "gemini-2.0-flash-lite-001",
2342
+ types: [intent_contract_1.IntentType.CHAT],
2343
+ pricing: pricingGeminiPerMillionTokens({
2344
+ input: 0.075,
2345
+ output: 0.3,
2346
+ notes: "Deprecated model family (shutdown noted in docs).",
2347
+ }),
2348
+ runtimeSupport: {
2349
+ status: ProviderModelRuntimeSupportStatus.FAILING,
2350
+ reason: "Visible via Models API but may be unavailable to new users (404)",
2351
+ updatedAt: "2026-05-04",
2352
+ },
2353
+ },
2354
+ // --- Rolling aliases ---
2355
+ {
2356
+ id: "gemini-flash-latest",
2357
+ types: [intent_contract_1.IntentType.CHAT],
2358
+ pricing: {
2359
+ ...pricingGeminiPerMillionTokens({
2360
+ input: 0.3,
2361
+ output: 2.5,
2362
+ tiers: [
2363
+ { name: "audio", condition: "audio", input: 1.0, output: 2.5 },
2364
+ ],
2365
+ notes: "Prices may differ by modality; output includes thinking tokens.",
2366
+ }),
2367
+ confidence: "approx",
2368
+ notes: "Rolling alias; priced as Gemini 2.5 Flash (approx).",
2369
+ },
2370
+ runtimeSupport: {
2371
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2372
+ reason: "Validated via provider E2E (text + structured + streaming SSE) (alias)",
2373
+ updatedAt: "2026-05-04",
2374
+ },
2375
+ },
2376
+ {
2377
+ id: "gemini-flash-lite-latest",
2378
+ types: [intent_contract_1.IntentType.CHAT],
2379
+ pricing: {
2380
+ ...pricingGeminiPerMillionTokens({
2381
+ input: 0.1,
2382
+ output: 0.4,
2383
+ tiers: [
2384
+ { name: "audio", condition: "audio", input: 0.3, output: 0.4 },
2385
+ ],
2386
+ notes: "Prices may differ by modality; output includes thinking tokens.",
2387
+ }),
2388
+ confidence: "approx",
2389
+ notes: "Rolling alias; priced as Gemini 2.5 Flash-Lite (approx).",
2390
+ },
2391
+ runtimeSupport: {
2392
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2393
+ reason: "Validated via provider E2E (text + structured + streaming SSE) (alias)",
2394
+ updatedAt: "2026-05-04",
2395
+ },
2396
+ },
2397
+ {
2398
+ id: "gemini-pro-latest",
2399
+ types: [intent_contract_1.IntentType.CHAT],
2400
+ pricing: {
2401
+ ...pricingGeminiPerMillionTokens({
2402
+ input: 1.25,
2403
+ output: 10.0,
2404
+ tiers: [
2405
+ {
2406
+ name: "prompts <= 200k",
2407
+ condition: "prompts <= 200k tokens",
2408
+ input: 1.25,
2409
+ output: 10.0,
2410
+ },
2411
+ {
2412
+ name: "prompts > 200k",
2413
+ condition: "prompts > 200k tokens",
2414
+ input: 2.5,
2415
+ output: 15.0,
2416
+ },
2417
+ ],
2418
+ notes: "Output price includes thinking tokens.",
2419
+ }),
2420
+ confidence: "approx",
2421
+ notes: "Rolling alias; priced as Gemini 2.5 Pro (approx).",
2422
+ },
2423
+ runtimeSupport: {
2424
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2425
+ reason: "Validated via provider E2E (text + structured + streaming SSE) (alias)",
2426
+ updatedAt: "2026-05-04",
2427
+ },
2428
+ },
2429
+ // --- Robotics models (listed by API; may require special modalities) ---
2430
+ {
2431
+ id: "gemini-robotics-er-1.6-preview",
2432
+ types: [intent_contract_1.IntentType.CHAT],
2433
+ pricing: pricingGeminiPerMillionTokens({
2434
+ input: 1.0,
2435
+ output: 5.0,
2436
+ tiers: [{ name: "audio", condition: "audio", input: 2.0, output: 5.0 }],
2437
+ notes: "Prices may differ by modality; output includes thinking tokens.",
2438
+ }),
2439
+ runtimeSupport: {
2440
+ status: ProviderModelRuntimeSupportStatus.FAILING,
2441
+ reason: "Provider E2E: empty output in text + structured + streaming",
2442
+ updatedAt: "2026-05-04",
2443
+ },
2444
+ },
2445
+ {
2446
+ id: "gemini-robotics-er-1.5-preview",
2447
+ types: [intent_contract_1.IntentType.CHAT],
2448
+ runtimeSupport: {
2449
+ status: ProviderModelRuntimeSupportStatus.FAILING,
2450
+ reason: "Model/endpoint not found (404) in provider E2E for this account",
2451
+ updatedAt: "2026-05-04",
2452
+ },
2453
+ },
2454
+ // --- Embeddings (cataloged, but runtime adapter not implemented yet) ---
2455
+ {
2456
+ id: "gemini-embedding-2-preview",
2457
+ types: [intent_contract_1.IntentType.EMBEDDING],
2458
+ runtimeSupport: {
2459
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
2460
+ reason: "Gemini embedding adapter not implemented in runtime v1",
2461
+ updatedAt: "2026-05-04",
2462
+ },
2463
+ },
2464
+ {
2465
+ id: "gemini-embedding-2",
2466
+ types: [intent_contract_1.IntentType.EMBEDDING],
2467
+ runtimeSupport: {
2468
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
2469
+ reason: "Gemini embedding adapter not implemented in runtime v1",
2470
+ updatedAt: "2026-05-04",
2471
+ },
2472
+ },
2473
+ {
2474
+ id: "gemini-embedding-001",
2475
+ types: [intent_contract_1.IntentType.EMBEDDING],
2476
+ runtimeSupport: {
2477
+ status: ProviderModelRuntimeSupportStatus.NOT_SUPPORTED,
2478
+ reason: "Gemini embedding adapter not implemented in runtime v1",
2479
+ updatedAt: "2026-05-04",
2480
+ },
2481
+ },
2482
+ ],
2483
+ [IntentProvider.GROK]: [],
2484
+ [IntentProvider.ANTHROPIC]: [
2485
+ // Source: Anthropic Models overview (latest models comparison), updated 2026-05-04
2486
+ // Note: DCDR runtime v1 treats Anthropic as CHAT-only; multimodal/vision intent types are intentionally not listed yet.
2487
+ {
2488
+ id: "claude-opus-4-7",
2489
+ types: [intent_contract_1.IntentType.CHAT],
2490
+ publicForCustomers: true,
2491
+ tokenUsageCovered: true,
2492
+ publicName: "DCDR Best",
2493
+ badge: "Anthropic",
2494
+ primaryCategory: DcdrPublicModelCategory.BEST,
2495
+ categories: [DcdrPublicModelCategory.BEST],
2496
+ qualityTier: 5,
2497
+ speedTier: 3,
2498
+ costTier: 1,
2499
+ recommendedUseCases: ["reasoning", "agentic_coding"],
2500
+ isRecommended: false,
2501
+ isGlobalDefault: false,
2502
+ isCategoryDefault: false,
2503
+ pricing: pricingPerMillionTokens({
2504
+ input: 5.0,
2505
+ output: 25.0,
2506
+ sourceUrl: ANTHROPIC_MODELS_URL,
2507
+ }),
2508
+ runtimeSupport: {
2509
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2510
+ reason: "Validated via provider E2E (run + streaming SSE)",
2511
+ updatedAt: "2026-05-04",
2512
+ },
2513
+ },
2514
+ // Legacy/stable IDs still visible via Models API for some accounts.
2515
+ {
2516
+ id: "claude-opus-4-6",
2517
+ types: [intent_contract_1.IntentType.CHAT],
2518
+ runtimeSupport: {
2519
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2520
+ reason: "Validated via provider E2E (run + structured + streaming SSE)",
2521
+ updatedAt: "2026-05-04",
2522
+ },
2523
+ },
2524
+ {
2525
+ id: "claude-opus-4-5-20251101",
2526
+ types: [intent_contract_1.IntentType.CHAT],
2527
+ runtimeSupport: {
2528
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2529
+ reason: "Validated via provider E2E (run + structured + streaming SSE)",
2530
+ updatedAt: "2026-05-04",
2531
+ },
2532
+ },
2533
+ {
2534
+ id: "claude-opus-4-1-20250805",
2535
+ types: [intent_contract_1.IntentType.CHAT],
2536
+ runtimeSupport: {
2537
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2538
+ reason: "Validated via provider E2E (run + structured + streaming SSE)",
2539
+ updatedAt: "2026-05-04",
2540
+ },
2541
+ },
2542
+ {
2543
+ id: "claude-sonnet-4-6",
2544
+ types: [intent_contract_1.IntentType.CHAT],
2545
+ publicForCustomers: true,
2546
+ tokenUsageCovered: true,
2547
+ publicName: "DCDR Smart",
2548
+ badge: "Anthropic",
2549
+ primaryCategory: DcdrPublicModelCategory.SMART,
2550
+ categories: [DcdrPublicModelCategory.SMART, DcdrPublicModelCategory.FAST],
2551
+ qualityTier: 4,
2552
+ speedTier: 4,
2553
+ costTier: 3,
2554
+ recommendedUseCases: ["production_chat", "coding", "reasoning"],
2555
+ isRecommended: true,
2556
+ isGlobalDefault: false,
2557
+ isCategoryDefault: false,
2558
+ pricing: pricingPerMillionTokens({
2559
+ input: 3.0,
2560
+ output: 15.0,
2561
+ sourceUrl: ANTHROPIC_MODELS_URL,
2562
+ }),
2563
+ runtimeSupport: {
2564
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2565
+ reason: "Validated via provider E2E (run + streaming SSE)",
2566
+ updatedAt: "2026-05-04",
2567
+ },
2568
+ },
2569
+ {
2570
+ id: "claude-sonnet-4-5-20250929",
2571
+ types: [intent_contract_1.IntentType.CHAT],
2572
+ runtimeSupport: {
2573
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2574
+ reason: "Validated via provider E2E (run + structured + streaming SSE)",
2575
+ updatedAt: "2026-05-04",
2576
+ },
2577
+ },
2578
+ // Haiku is the cheapest/default smoke-test model.
2579
+ {
2580
+ id: "claude-haiku-4-5",
2581
+ types: [intent_contract_1.IntentType.CHAT],
2582
+ publicForCustomers: true,
2583
+ tokenUsageCovered: true,
2584
+ publicName: "DCDR Fast",
2585
+ badge: "Anthropic",
2586
+ primaryCategory: DcdrPublicModelCategory.FAST,
2587
+ categories: [
2588
+ DcdrPublicModelCategory.FAST,
2589
+ DcdrPublicModelCategory.ECONOMY,
2590
+ ],
2591
+ qualityTier: 3,
2592
+ speedTier: 5,
2593
+ costTier: 4,
2594
+ recommendedUseCases: ["interactive_chat", "support", "classification"],
2595
+ isRecommended: false,
2596
+ isGlobalDefault: false,
2597
+ isCategoryDefault: false,
2598
+ pricing: pricingPerMillionTokens({
2599
+ input: 1.0,
2600
+ output: 5.0,
2601
+ sourceUrl: ANTHROPIC_MODELS_URL,
2602
+ }),
2603
+ runtimeSupport: {
2604
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2605
+ reason: "Validated via provider E2E (run + streaming SSE)",
2606
+ updatedAt: "2026-05-04",
2607
+ },
2608
+ },
2609
+ {
2610
+ id: "claude-haiku-4-5-20251001",
2611
+ types: [intent_contract_1.IntentType.CHAT],
2612
+ pricing: pricingPerMillionTokens({
2613
+ input: 1.0,
2614
+ output: 5.0,
2615
+ sourceUrl: ANTHROPIC_MODELS_URL,
2616
+ }),
2617
+ runtimeSupport: {
2618
+ status: ProviderModelRuntimeSupportStatus.SUPPORTED,
2619
+ reason: "Validated via provider E2E (run + streaming SSE)",
2620
+ updatedAt: "2026-05-04",
2621
+ },
2622
+ },
2623
+ ],
2624
+ [IntentProvider.MISTRAL]: [],
2625
+ [IntentProvider.COHERE]: [],
2626
+ [IntentProvider.OFFICE]: [
2627
+ // Office = internal/local OpenAI-compatible runtime (vLLM etc.)
2628
+ // Keep IDs aligned with the common local model naming used in registries.
2629
+ {
2630
+ id: "Qwen3-4B-Instruct-2507",
2631
+ types: [intent_contract_1.IntentType.CHAT],
2632
+ publicForCustomers: true,
2633
+ tokenUsageCovered: true,
2634
+ publicName: "DCDR Private",
2635
+ badge: "Local",
2636
+ primaryCategory: DcdrPublicModelCategory.PRIVATE,
2637
+ categories: [
2638
+ DcdrPublicModelCategory.PRIVATE,
2639
+ DcdrPublicModelCategory.ECONOMY,
2640
+ DcdrPublicModelCategory.FAST,
2641
+ ],
2642
+ qualityTier: 2,
2643
+ speedTier: 5,
2644
+ costTier: 5,
2645
+ recommendedUseCases: ["private_data", "on_prem", "high_volume"],
2646
+ isRecommended: false,
2647
+ isGlobalDefault: false,
2648
+ isCategoryDefault: true,
2649
+ pricing: pricingPerMillionTokens({
2650
+ // Synthetic estimate for local models: keep Office cheaper than hosted providers.
2651
+ // Pick round numbers for UI cost guidance.
2652
+ input: 0.05,
2653
+ output: 0.15,
2654
+ sourceUrl: GEMINI_PRICING_URL,
2655
+ updatedAt: PRICING_UPDATED_AT_20260519,
2656
+ confidence: "approx",
2657
+ notes: "Synthetic pricing for local OFFICE provider. For UI cost guidance only.",
2658
+ }),
2659
+ },
2660
+ ],
2661
+ [IntentProvider.OLLAMA]: [],
2662
+ [IntentProvider.OPEN_AI_COMPATIBLE]: [],
2663
+ [IntentProvider.OCR]: [],
2664
+ [IntentProvider.CLIP]: [],
2665
+ [IntentProvider.HTTP_TOOL]: [],
2666
+ [IntentProvider.RULES]: [],
2667
+ };
2668
+ /**
2669
+ * Token usage coverage overrides derived from provider E2E curation runs.
2670
+ *
2671
+ * Notes
2672
+ * - This is intended to be filled iteratively (in batches) as we validate token usage reporting
2673
+ * for all `runtimeSupport.status=SUPPORTED` chat models.
2674
+ * - These overrides only apply when a model definition omits `tokenUsageCovered`.
2675
+ * (Public customer models still require `tokenUsageCovered=true` on the definition itself.)
2676
+ */
2677
+ const TOKEN_USAGE_COVERAGE_BY_PROVIDER_AND_ID = {
2678
+ [IntentProvider.OPEN_AI]: {
2679
+ "gpt-5.5-2026-04-23": true,
2680
+ "gpt-5.5-pro": true,
2681
+ "gpt-5.5-pro-2026-04-23": true,
2682
+ "gpt-5.4-2026-03-05": true,
2683
+ "gpt-5.4-mini-2026-03-17": true,
2684
+ "gpt-5.4-nano-2026-03-17": true,
2685
+ "gpt-5.4-pro": true,
2686
+ "gpt-5.4-pro-2026-03-05": true,
2687
+ "gpt-5.3-chat-latest": true,
2688
+ "gpt-5.3-codex": true,
2689
+ "gpt-5.2": true,
2690
+ "gpt-5.2-2025-12-11": true,
2691
+ "gpt-5.2-chat-latest": true,
2692
+ "gpt-5.2-codex": true,
2693
+ "gpt-5.2-pro": true,
2694
+ "gpt-5.2-pro-2025-12-11": true,
2695
+ "gpt-5.1": true,
2696
+ "gpt-5.1-2025-11-13": true,
2697
+ "gpt-5.1-chat-latest": true,
2698
+ "gpt-5.1-codex": true,
2699
+ "gpt-5.1-codex-max": true,
2700
+ "gpt-5.1-codex-mini": true,
2701
+ "gpt-5": true,
2702
+ "gpt-5-2025-08-07": true,
2703
+ "gpt-5-chat-latest": true,
2704
+ "gpt-5-codex": true,
2705
+ "gpt-5-mini": true,
2706
+ "gpt-5-mini-2025-08-07": true,
2707
+ "gpt-5-nano": true,
2708
+ "gpt-5-nano-2025-08-07": true,
2709
+ "gpt-5-pro": true,
2710
+ "gpt-5-pro-2025-10-06": true,
2711
+ "gpt-4.1": true,
2712
+ "gpt-4.1-2025-04-14": true,
2713
+ "gpt-4.1-mini": true,
2714
+ "gpt-4.1-mini-2025-04-14": true,
2715
+ "gpt-4.1-nano": true,
2716
+ "gpt-4.1-nano-2025-04-14": true,
2717
+ "gpt-4o": true,
2718
+ "gpt-4o-2024-08-06": true,
2719
+ "gpt-4o-2024-11-20": true,
2720
+ "gpt-4o-mini": true,
2721
+ "gpt-4o-mini-2024-07-18": true,
2722
+ "gpt-4o-2024-05-13": true,
2723
+ "gpt-4-turbo": true,
2724
+ "gpt-4-turbo-2024-04-09": true,
2725
+ "gpt-4": true,
2726
+ "gpt-4-0613": true,
2727
+ "gpt-3.5-turbo": true,
2728
+ "gpt-3.5-turbo-0125": true,
2729
+ "gpt-3.5-turbo-1106": true,
2730
+ "gpt-3.5-turbo-16k": true,
2731
+ "o4-mini": true,
2732
+ "o4-mini-2025-04-16": true,
2733
+ "o3-pro": true,
2734
+ "o3-pro-2025-06-10": true,
2735
+ o3: true,
2736
+ "o3-2025-04-16": true,
2737
+ "o3-mini": true,
2738
+ "o3-mini-2025-01-31": true,
2739
+ "o1-pro": true,
2740
+ "o1-pro-2025-03-19": true,
2741
+ o1: true,
2742
+ "o1-2024-12-17": true,
2743
+ },
2744
+ [IntentProvider.GEMINI]: {
2745
+ "gemini-3.1-pro-preview-customtools": true,
2746
+ "gemini-3.1-flash-lite-preview": true,
2747
+ "gemini-3.1-flash-lite": true,
2748
+ "gemini-3.1-flash-image-preview": true,
2749
+ "gemini-3-pro-preview": false,
2750
+ "gemini-2.5-flash-image": true,
2751
+ "gemini-flash-latest": true,
2752
+ "gemini-flash-lite-latest": true,
2753
+ "gemini-pro-latest": true,
2754
+ },
2755
+ [IntentProvider.ANTHROPIC]: {
2756
+ "claude-opus-4-6": true,
2757
+ "claude-opus-4-5-20251101": true,
2758
+ "claude-opus-4-1-20250805": true,
2759
+ "claude-sonnet-4-5-20250929": true,
2760
+ "claude-haiku-4-5-20251001": true,
2761
+ },
2762
+ [IntentProvider.OFFICE]: {},
2763
+ };
2764
+ function getTokenUsageCoveredOverride(provider, modelId) {
2765
+ return TOKEN_USAGE_COVERAGE_BY_PROVIDER_AND_ID[provider]?.[modelId];
2766
+ }
2767
+ /** Normalizes catalog entries so optional flags become required (fail-closed). */
2768
+ function normalizeProviderModelDefinitions(modelsByProvider) {
2769
+ const out = {};
2770
+ let globalDefaultCount = 0;
2771
+ const categoryDefaultCounts = new Map();
2772
+ const categoriesWithPublicModels = new Set();
2773
+ const assertTier = (provider, modelId, field, value) => {
2774
+ if (!Number.isFinite(value)) {
2775
+ throw new Error(`Provider model catalog: ${provider}/${modelId} ${field} must be a finite number (1..5).`);
2776
+ }
2777
+ const n = Math.trunc(value);
2778
+ if (n !== value || n < 1 || n > 5) {
2779
+ throw new Error(`Provider model catalog: ${provider}/${modelId} ${field} must be an integer in range 1..5.`);
2780
+ }
2781
+ };
2782
+ const assertNoLegacyManagedFields = (provider, modelId, def) => {
2783
+ const d = def;
2784
+ const legacyFields = [
2785
+ "publicDisplayName",
2786
+ "isRecommendedDefault",
2787
+ "default",
2788
+ ];
2789
+ for (const f of legacyFields) {
2790
+ if (Object.prototype.hasOwnProperty.call(d, f)) {
2791
+ throw new Error(`Provider model catalog: ${provider}/${modelId} must not include legacy field '${f}'.`);
2792
+ }
2793
+ }
2794
+ };
2795
+ const assertNonEmptyStringArray = (provider, modelId, field, value) => {
2796
+ if (!Array.isArray(value) || value.length === 0) {
2797
+ throw new Error(`Provider model catalog: ${provider}/${modelId} ${field} must be a non-empty string array.`);
2798
+ }
2799
+ for (const v of value) {
2800
+ if (typeof v !== "string" || !v.trim()) {
2801
+ throw new Error(`Provider model catalog: ${provider}/${modelId} ${field} must contain only non-empty strings.`);
2802
+ }
2803
+ }
2804
+ };
2805
+ for (const provider of Object.values(IntentProvider)) {
2806
+ const defs = modelsByProvider[provider] ?? [];
2807
+ const ids = new Set();
2808
+ out[provider] = defs.map((def) => {
2809
+ assertNoLegacyManagedFields(provider, def.id, def);
2810
+ if (ids.has(def.id)) {
2811
+ throw new Error(`Provider model catalog: duplicate modelId '${def.id}' for provider ${provider}.`);
2812
+ }
2813
+ ids.add(def.id);
2814
+ const tokenUsageCoveredOverride = getTokenUsageCoveredOverride(provider, def.id);
2815
+ const normalized = {
2816
+ ...def,
2817
+ publicForCustomers: def.publicForCustomers === true,
2818
+ tokenUsageCovered: def.tokenUsageCovered ?? tokenUsageCoveredOverride,
2819
+ };
2820
+ if (normalized.publicForCustomers) {
2821
+ if (normalized.tokenUsageCovered !== true) {
2822
+ throw new Error(`Provider model catalog: ${provider}/${normalized.id} tokenUsageCovered=true is required for publicForCustomers models.`);
2823
+ }
2824
+ if (!normalized.publicName?.trim()) {
2825
+ throw new Error(`Provider model catalog: ${provider}/${normalized.id} publicName is required for publicForCustomers models.`);
2826
+ }
2827
+ if (!normalized.primaryCategory) {
2828
+ throw new Error(`Provider model catalog: ${provider}/${normalized.id} primaryCategory is required for publicForCustomers models.`);
2829
+ }
2830
+ if (!Array.isArray(normalized.categories) ||
2831
+ normalized.categories.length === 0) {
2832
+ throw new Error(`Provider model catalog: ${provider}/${normalized.id} categories is required for publicForCustomers models.`);
2833
+ }
2834
+ if (!normalized.categories.includes(normalized.primaryCategory)) {
2835
+ throw new Error(`Provider model catalog: ${provider}/${normalized.id} categories must include primaryCategory (${normalized.primaryCategory}).`);
2836
+ }
2837
+ categoriesWithPublicModels.add(normalized.primaryCategory);
2838
+ if (typeof normalized.isRecommended !== "boolean") {
2839
+ throw new Error(`Provider model catalog: ${provider}/${normalized.id} isRecommended is required for publicForCustomers models.`);
2840
+ }
2841
+ if (typeof normalized.isGlobalDefault !== "boolean") {
2842
+ throw new Error(`Provider model catalog: ${provider}/${normalized.id} isGlobalDefault is required for publicForCustomers models.`);
2843
+ }
2844
+ if (typeof normalized.isCategoryDefault !== "boolean") {
2845
+ throw new Error(`Provider model catalog: ${provider}/${normalized.id} isCategoryDefault is required for publicForCustomers models.`);
2846
+ }
2847
+ if (normalized.isGlobalDefault)
2848
+ globalDefaultCount += 1;
2849
+ if (normalized.isCategoryDefault) {
2850
+ const c = normalized.primaryCategory;
2851
+ const prev = categoryDefaultCounts.get(c) ?? 0;
2852
+ categoryDefaultCounts.set(c, prev + 1);
2853
+ }
2854
+ assertTier(provider, normalized.id, "qualityTier", normalized.qualityTier ?? Number.NaN);
2855
+ assertTier(provider, normalized.id, "speedTier", normalized.speedTier ?? Number.NaN);
2856
+ assertTier(provider, normalized.id, "costTier", normalized.costTier ?? Number.NaN);
2857
+ assertNonEmptyStringArray(provider, normalized.id, "recommendedUseCases", normalized.recommendedUseCases ?? []);
2858
+ }
2859
+ return normalized;
2860
+ });
2861
+ }
2862
+ if (globalDefaultCount !== 1) {
2863
+ throw new Error(`Provider model catalog: expected exactly one public model with isGlobalDefault=true, found ${globalDefaultCount}.`);
2864
+ }
2865
+ for (const c of categoriesWithPublicModels) {
2866
+ const count = categoryDefaultCounts.get(c) ?? 0;
2867
+ if (count <= 0) {
2868
+ throw new Error(`Provider model catalog: expected at least one public model with isCategoryDefault=true for primaryCategory ${c}.`);
2869
+ }
2870
+ }
2871
+ return out;
2872
+ }
2873
+ /**
2874
+ * Canonical provider model catalog (after enrichment passes).
2875
+ */
2876
+ exports.PROVIDER_MODEL_DEFINITIONS_BY_PROVIDER = (() => {
2877
+ const base = fillMissingPricingFromBaseModels(PROVIDER_MODEL_DEFINITIONS_BY_PROVIDER_RAW);
2878
+ const normalized = normalizeProviderModelDefinitions(base);
2879
+ return {
2880
+ ...normalized,
2881
+ [IntentProvider.DCDR]: buildDcdrVirtualProviderModelDefinitions(normalized),
2882
+ };
2883
+ })();
2884
+ const _PROVIDER_MODEL_INDEXES = buildProviderModelCatalogAndTypeIndex(exports.PROVIDER_MODEL_DEFINITIONS_BY_PROVIDER);
2885
+ /**
2886
+ * Canonical lookup: provider -> modelId -> model definition.
2887
+ */
2888
+ exports.PROVIDER_MODEL_CATALOG = _PROVIDER_MODEL_INDEXES.catalog;
2889
+ /**
2890
+ * Primary listing structure (no duplicated metadata): provider -> intent type -> model IDs.
2891
+ */
2892
+ exports.PROVIDER_MODEL_IDS_BY_PROVIDER_AND_TYPE = _PROVIDER_MODEL_INDEXES.idsByType;
2893
+ /**
2894
+ * E2E model status used by provider test suites.
2895
+ *
2896
+ * Notes
2897
+ * - This is an opt-in testing mechanism; it does not affect runtime behavior.
2898
+ * - Use `LEGACY` to explicitly skip obsolete/retired model IDs while still keeping them
2899
+ * discoverable in the catalog for historical compatibility.
2900
+ */
2901
+ var ProviderModelE2EStatus;
2902
+ (function (ProviderModelE2EStatus) {
2903
+ /** Model should be exercised by E2E suites (when provider is implemented and credentials exist). */
2904
+ ProviderModelE2EStatus["ACTIVE"] = "ACTIVE";
2905
+ /** Model is considered legacy/obsolete and may be skipped by E2E suites. */
2906
+ ProviderModelE2EStatus["LEGACY"] = "LEGACY";
2907
+ })(ProviderModelE2EStatus || (exports.ProviderModelE2EStatus = ProviderModelE2EStatus = {}));
2908
+ /**
2909
+ * Optional provider-model overrides consumed by the provider E2E matrix tests.
2910
+ *
2911
+ * How to use
2912
+ * - When a model ID becomes obsolete/retired, mark it as `LEGACY` with a reason.
2913
+ * - The E2E suite will still enumerate it (catalog stays complete) but will skip execution.
2914
+ */
2915
+ exports.PROVIDER_MODEL_E2E_OVERRIDES = {
2916
+ [IntentProvider.DCDR]: {},
2917
+ [IntentProvider.OPEN_AI]: {
2918
+ // Not chat-completions models (will 404 on /v1/chat/completions)
2919
+ "babbage-002": {
2920
+ status: ProviderModelE2EStatus.LEGACY,
2921
+ reason: "Not a chat-completions model",
2922
+ },
2923
+ "davinci-002": {
2924
+ status: ProviderModelE2EStatus.LEGACY,
2925
+ reason: "Not a chat-completions model",
2926
+ },
2927
+ "gpt-3.5-turbo-instruct": {
2928
+ status: ProviderModelE2EStatus.LEGACY,
2929
+ reason: "Not a chat-completions model",
2930
+ },
2931
+ "gpt-3.5-turbo-instruct-0914": {
2932
+ status: ProviderModelE2EStatus.LEGACY,
2933
+ reason: "Not a chat-completions model",
2934
+ },
2935
+ // Listed in some OpenAI pricing/docs snapshots but not visible/callable for many accounts (model_not_found).
2936
+ "o1-mini": {
2937
+ status: ProviderModelE2EStatus.LEGACY,
2938
+ reason: "Listed but not callable for many accounts (model_not_found)",
2939
+ },
2940
+ // OpenAI lists moderation-only models under /v1/models; runtime does not expose a moderation intent type.
2941
+ "omni-moderation-latest": {
2942
+ status: ProviderModelE2EStatus.LEGACY,
2943
+ reason: "Moderation-only model (no IntentType mapping in runtime)",
2944
+ },
2945
+ "omni-moderation-2024-09-26": {
2946
+ status: ProviderModelE2EStatus.LEGACY,
2947
+ reason: "Moderation-only model (no IntentType mapping in runtime)",
2948
+ },
2949
+ },
2950
+ [IntentProvider.GEMINI]: {
2951
+ // Listed by the Models API but not callable for many accounts (404).
2952
+ "gemini-2.0-flash": {
2953
+ status: ProviderModelE2EStatus.LEGACY,
2954
+ reason: "Listed but not callable for many accounts (404)",
2955
+ },
2956
+ "gemini-2.0-flash-001": {
2957
+ status: ProviderModelE2EStatus.LEGACY,
2958
+ reason: "Listed but not callable for many accounts (404)",
2959
+ },
2960
+ "gemini-2.0-flash-lite": {
2961
+ status: ProviderModelE2EStatus.LEGACY,
2962
+ reason: "Listed but not callable for many accounts (404)",
2963
+ },
2964
+ "gemini-2.0-flash-lite-001": {
2965
+ status: ProviderModelE2EStatus.LEGACY,
2966
+ reason: "Listed but not callable for many accounts (404)",
2967
+ },
2968
+ // Preview/live endpoint variants can be account-gated or missing.
2969
+ "gemini-3.1-flash-live-preview": {
2970
+ status: ProviderModelE2EStatus.LEGACY,
2971
+ reason: "Model/endpoint not found (404) in provider E2E",
2972
+ },
2973
+ // Requires explicit Computer Use tooling.
2974
+ "gemini-2.5-computer-use-preview-10-2025": {
2975
+ status: ProviderModelE2EStatus.LEGACY,
2976
+ reason: "Requires Computer Use tool wiring (not supported in runtime v1)",
2977
+ },
2978
+ // Audio-only response modalities (runtime v1 is text-only).
2979
+ "gemini-2.5-pro-preview-tts": {
2980
+ status: ProviderModelE2EStatus.LEGACY,
2981
+ reason: "Audio-only response modality (TEXT unsupported)",
2982
+ },
2983
+ "gemini-2.5-flash-preview-tts": {
2984
+ status: ProviderModelE2EStatus.LEGACY,
2985
+ reason: "Audio-only response modality (TEXT unsupported)",
2986
+ },
2987
+ "gemini-2.5-flash-native-audio-latest": {
2988
+ status: ProviderModelE2EStatus.LEGACY,
2989
+ reason: "Native-audio model (text-only runtime)",
2990
+ },
2991
+ "gemini-2.5-flash-native-audio-preview-09-2025": {
2992
+ status: ProviderModelE2EStatus.LEGACY,
2993
+ reason: "Native-audio model (text-only runtime)",
2994
+ },
2995
+ "gemini-2.5-flash-native-audio-preview-12-2025": {
2996
+ status: ProviderModelE2EStatus.LEGACY,
2997
+ reason: "Native-audio model (text-only runtime)",
2998
+ },
2999
+ // Some robotics preview IDs appear/disappear across accounts.
3000
+ "gemini-robotics-er-1.5-preview": {
3001
+ status: ProviderModelE2EStatus.LEGACY,
3002
+ reason: "Model/endpoint not found (404) in provider E2E",
3003
+ },
3004
+ },
3005
+ [IntentProvider.GROK]: {},
3006
+ [IntentProvider.ANTHROPIC]: {},
3007
+ [IntentProvider.MISTRAL]: {},
3008
+ [IntentProvider.COHERE]: {},
3009
+ [IntentProvider.OFFICE]: {},
3010
+ [IntentProvider.OLLAMA]: {},
3011
+ [IntentProvider.OPEN_AI_COMPATIBLE]: {},
3012
+ [IntentProvider.OCR]: {},
3013
+ [IntentProvider.CLIP]: {},
3014
+ [IntentProvider.HTTP_TOOL]: {},
3015
+ [IntentProvider.RULES]: {},
3016
+ };
3017
+ function pricingPerMillionTokens(args) {
3018
+ return {
3019
+ currency: "USD",
3020
+ sourceUrl: args.sourceUrl,
3021
+ updatedAt: args.updatedAt ?? PRICING_UPDATED_AT_20260327,
3022
+ confidence: args.confidence ?? "official",
3023
+ notes: args.notes,
3024
+ components: [
3025
+ {
3026
+ kind: "tokens",
3027
+ unit: "per_million_tokens",
3028
+ input: args.input,
3029
+ outputUsd: args.output,
3030
+ cachedInput: args.cachedInput,
3031
+ cachedOutput: args.cachedOutput,
3032
+ tiers: args.tiers,
3033
+ },
3034
+ ],
3035
+ };
3036
+ }
3037
+ /**
3038
+ * Gemini token pricing helper.
3039
+ *
3040
+ * Notes
3041
+ * - Uses the Gemini Developer API pricing page as the canonical source.
3042
+ * - Pricing tables sometimes vary by modality (text vs audio) and/or prompt size (<=200k vs >200k tokens).
3043
+ * We represent those as `tiers` with a human-readable condition.
3044
+ */
3045
+ function pricingGeminiPerMillionTokens(args) {
3046
+ return pricingPerMillionTokens({
3047
+ input: args.input,
3048
+ output: args.output,
3049
+ tiers: args.tiers,
3050
+ sourceUrl: GEMINI_PRICING_URL,
3051
+ // Gemini pricing page last updated 2026-05-19 UTC.
3052
+ updatedAt: PRICING_UPDATED_AT_20260519,
3053
+ confidence: "official",
3054
+ notes: args.notes,
3055
+ });
3056
+ }
3057
+ function pricingAudioMinutesPerMinute(args) {
3058
+ return {
3059
+ currency: "USD",
3060
+ sourceUrl: args.sourceUrl,
3061
+ updatedAt: args.updatedAt ?? PRICING_UPDATED_AT_20260522,
3062
+ confidence: args.confidence ?? "official",
3063
+ notes: args.notes,
3064
+ components: [
3065
+ {
3066
+ kind: "audio_minutes",
3067
+ unit: "per_minute",
3068
+ input: args.input,
3069
+ notes: args.notes,
3070
+ },
3071
+ ],
3072
+ };
3073
+ }
3074
+ function clonePricingAsApproxFromBase(args) {
3075
+ const base = args.basePricing;
3076
+ const relation = args.relation ?? "base";
3077
+ const extraNote = relation === "fallback"
3078
+ ? `Inherited pricing from fallback model: ${args.baseId}`
3079
+ : `Inherited pricing from base model: ${args.baseId}`;
3080
+ const notes = base.notes ? `${base.notes} | ${extraNote}` : extraNote;
3081
+ return {
3082
+ currency: base.currency,
3083
+ sourceUrl: base.sourceUrl,
3084
+ updatedAt: base.updatedAt,
3085
+ confidence: "approx",
3086
+ notes,
3087
+ components: base.components.map((c) => ({ ...c })),
3088
+ };
3089
+ }
3090
+ function tryGetBaseModelIdFromVersionedId(modelId) {
3091
+ const id = String(modelId || "").trim();
3092
+ if (!id)
3093
+ return null;
3094
+ // Common vendor patterns:
3095
+ // - OpenAI: gpt-4o-2024-11-20
3096
+ // - OpenAI: gpt-5.4-mini-2026-03-17
3097
+ // - Anthropic: claude-haiku-4-5-20251001
3098
+ const m1 = id.match(/^(.*)-\d{4}-\d{2}-\d{2}$/);
3099
+ if (m1?.[1])
3100
+ return m1[1];
3101
+ const m2 = id.match(/^(.*)-\d{8}$/);
3102
+ if (m2?.[1])
3103
+ return m2[1];
3104
+ return null;
3105
+ }
3106
+ /**
3107
+ * Fills pricing gaps by inheriting pricing from the base model when a vendor exposes
3108
+ * versioned/dated aliases that share the same pricing.
3109
+ *
3110
+ * Notes
3111
+ * - Inherited pricing is marked as `confidence: "approx"`.
3112
+ * - Only applies when a base model is present in the same provider list.
3113
+ */
3114
+ function fillMissingPricingFromBaseModels(modelsByProvider) {
3115
+ const out = {};
3116
+ for (const provider of Object.values(IntentProvider)) {
3117
+ const defs = modelsByProvider[provider] ?? [];
3118
+ const pricingById = {};
3119
+ for (const def of defs) {
3120
+ if (def.pricing)
3121
+ pricingById[def.id] = def.pricing;
3122
+ }
3123
+ const fallbacks = PRICING_FALLBACK_RULES_BY_PROVIDER[provider] ?? [];
3124
+ out[provider] = defs.map((def) => {
3125
+ if (def.pricing)
3126
+ return def;
3127
+ const baseId = tryGetBaseModelIdFromVersionedId(def.id);
3128
+ if (baseId) {
3129
+ const basePricing = pricingById[baseId];
3130
+ if (basePricing) {
3131
+ return {
3132
+ ...def,
3133
+ pricing: clonePricingAsApproxFromBase({
3134
+ modelId: def.id,
3135
+ baseId,
3136
+ basePricing,
3137
+ relation: "base",
3138
+ }),
3139
+ };
3140
+ }
3141
+ }
3142
+ for (const rule of fallbacks) {
3143
+ if (!rule.match.test(def.id))
3144
+ continue;
3145
+ const fallbackPricing = pricingById[rule.baseModelId];
3146
+ if (!fallbackPricing)
3147
+ continue;
3148
+ return {
3149
+ ...def,
3150
+ pricing: clonePricingAsApproxFromBase({
3151
+ modelId: def.id,
3152
+ baseId: rule.baseModelId,
3153
+ basePricing: fallbackPricing,
3154
+ relation: "fallback",
3155
+ }),
3156
+ };
3157
+ }
3158
+ return def;
3159
+ });
3160
+ }
3161
+ return out;
3162
+ }
3163
+ function buildProviderModelCatalogAndTypeIndex(modelsByProvider) {
3164
+ const intentTypes = Object.values(intent_contract_1.IntentType);
3165
+ const catalog = {};
3166
+ const idsByType = {};
3167
+ for (const provider of Object.values(IntentProvider)) {
3168
+ catalog[provider] = {};
3169
+ const perType = {};
3170
+ for (const t of intentTypes)
3171
+ perType[t] = [];
3172
+ idsByType[provider] = perType;
3173
+ const defs = modelsByProvider[provider] ?? [];
3174
+ for (const def of defs) {
3175
+ catalog[provider][def.id] = def;
3176
+ for (const t of def.types) {
3177
+ idsByType[provider][t].push(def.id);
3178
+ }
3179
+ }
3180
+ }
3181
+ return { catalog, idsByType };
3182
+ }
3183
+ /**
3184
+ * Static utility class for querying the provider model catalog.
3185
+ *
3186
+ * Designed for client consumption: `ProviderModelRegistry.listProvidersSupportingType(...)`.
3187
+ */
3188
+ class ProviderModelRegistry {
3189
+ /** Canonical catalog view: provider -> modelId -> definition. */
3190
+ static catalog = exports.PROVIDER_MODEL_CATALOG;
3191
+ /** Primary listing view: provider -> intent type -> model IDs. */
3192
+ static idsByProviderAndType = exports.PROVIDER_MODEL_IDS_BY_PROVIDER_AND_TYPE;
3193
+ /** Source-of-truth definitions in declared order (useful for UI display). */
3194
+ static definitionsByProvider = exports.PROVIDER_MODEL_DEFINITIONS_BY_PROVIDER;
3195
+ /** Returns the model definition if present; otherwise null. */
3196
+ static getModelDefinition(provider, modelId) {
3197
+ return ProviderModelRegistry.catalog[provider]?.[modelId] ?? null;
3198
+ }
3199
+ /** Lists all model IDs for a provider (stable order as declared in the catalog). */
3200
+ static listProviderModelIds(provider) {
3201
+ return (ProviderModelRegistry.definitionsByProvider[provider] ?? []).map((m) => m.id);
3202
+ }
3203
+ /** Lists all model definitions for a provider (stable order as declared in the catalog). */
3204
+ static listProviderModels(provider, options) {
3205
+ const defs = ProviderModelRegistry.definitionsByProvider[provider] ?? [];
3206
+ if (!options?.onlyPublicForCustomers)
3207
+ return defs;
3208
+ return defs.filter((m) => m.publicForCustomers === true);
3209
+ }
3210
+ /**
3211
+ * Lists all public customer models across all providers.
3212
+ *
3213
+ * Notes
3214
+ * - Uses the catalog declared order (provider order, then per-provider declaration order).
3215
+ * - This is a UI/helper surface only; execution still uses provider+modelId.
3216
+ */
3217
+ static listPublicCustomerModels(options) {
3218
+ const out = [];
3219
+ for (const provider of Object.values(IntentProvider)) {
3220
+ const defs = ProviderModelRegistry.listProviderModels(provider, {
3221
+ onlyPublicForCustomers: true,
3222
+ });
3223
+ for (const def of defs) {
3224
+ const model = def;
3225
+ if (options?.primaryCategory &&
3226
+ model.primaryCategory !== options.primaryCategory) {
3227
+ continue;
3228
+ }
3229
+ if (options?.includeCategories?.length) {
3230
+ const include = options.includeCategories;
3231
+ const hasAny = include.some((c) => model.categories.includes(c));
3232
+ if (!hasAny)
3233
+ continue;
3234
+ }
3235
+ out.push({ provider, modelId: model.id, model });
3236
+ }
3237
+ }
3238
+ return out;
3239
+ }
3240
+ /**
3241
+ * Groups all public customer models by their primaryCategory.
3242
+ *
3243
+ * Intended for the "simple UI" mode where the UI shows high-level DCDR groups.
3244
+ */
3245
+ static listPublicCustomerModelsByPrimaryCategory() {
3246
+ const out = {};
3247
+ for (const c of Object.values(DcdrPublicModelCategory)) {
3248
+ out[c] = [];
3249
+ }
3250
+ for (const item of ProviderModelRegistry.listPublicCustomerModels()) {
3251
+ out[item.model.primaryCategory].push(item);
3252
+ }
3253
+ return out;
3254
+ }
3255
+ /** Lists model IDs for a provider that support a given IntentType. */
3256
+ static listProviderModelIdsForType(provider, type) {
3257
+ return ProviderModelRegistry.idsByProviderAndType[provider]?.[type] ?? [];
3258
+ }
3259
+ /** Lists model definitions for a provider that support a given IntentType. */
3260
+ static listProviderModelsForType(provider, type) {
3261
+ const ids = ProviderModelRegistry.listProviderModelIdsForType(provider, type);
3262
+ return ids
3263
+ .map((id) => ProviderModelRegistry.getModelDefinition(provider, id))
3264
+ .filter((m) => m !== null);
3265
+ }
3266
+ /** Returns true if the provider has at least one model for the given IntentType. */
3267
+ static providerSupportsType(provider, type) {
3268
+ return (ProviderModelRegistry.listProviderModelIdsForType(provider, type).length >
3269
+ 0);
3270
+ }
3271
+ /** Returns true if the model supports the given IntentType (based on the catalog). */
3272
+ static modelSupportsType(provider, modelId, type) {
3273
+ const def = ProviderModelRegistry.getModelDefinition(provider, modelId);
3274
+ if (!def)
3275
+ return false;
3276
+ return def.types.includes(type);
3277
+ }
3278
+ /** Lists all providers that have at least one model supporting the given IntentType. */
3279
+ static listProvidersSupportingType(type) {
3280
+ return Object.values(IntentProvider).filter((p) => ProviderModelRegistry.providerSupportsType(p, type));
3281
+ }
3282
+ /** Returns all model IDs across all providers for a given type. */
3283
+ static listAllModelIdsForType(type) {
3284
+ const out = [];
3285
+ for (const provider of Object.values(IntentProvider)) {
3286
+ for (const modelId of ProviderModelRegistry.listProviderModelIdsForType(provider, type)) {
3287
+ out.push({ provider, modelId });
3288
+ }
3289
+ }
3290
+ return out;
3291
+ }
3292
+ /** Convenience: get unified pricing if present (or null if not set/unknown). */
3293
+ static getModelPricing(provider, modelId) {
3294
+ return (ProviderModelRegistry.getModelDefinition(provider, modelId)?.pricing ??
3295
+ null);
3296
+ }
3297
+ /** Get a specific pricing component from a model by kind (or null if absent). */
3298
+ static getPricingComponent(provider, modelId, kind) {
3299
+ const pricing = ProviderModelRegistry.getModelPricing(provider, modelId);
3300
+ if (!pricing)
3301
+ return null;
3302
+ const found = pricing.components.find((c) => c.kind === kind);
3303
+ return found ?? null;
3304
+ }
3305
+ /** Convenience: token pricing (per MTok) if present. */
3306
+ static getTokenPricing(provider, modelId) {
3307
+ return ProviderModelRegistry.getPricingComponent(provider, modelId, "tokens");
3308
+ }
3309
+ }
3310
+ exports.ProviderModelRegistry = ProviderModelRegistry;