@dcdr/contracts 2.2.0 → 2.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/dist/asset.contract.d.ts +195 -0
  2. package/dist/asset.contract.d.ts.map +1 -0
  3. package/dist/asset.contract.js +60 -0
  4. package/dist/catalog/anthropic.contract.d.ts +11 -0
  5. package/dist/catalog/anthropic.contract.d.ts.map +1 -0
  6. package/dist/catalog/anthropic.contract.js +342 -0
  7. package/dist/catalog/clip.contract.d.ts +10 -0
  8. package/dist/catalog/clip.contract.d.ts.map +1 -0
  9. package/dist/catalog/clip.contract.js +16 -0
  10. package/dist/catalog/cohere.contract.d.ts +10 -0
  11. package/dist/catalog/cohere.contract.d.ts.map +1 -0
  12. package/dist/catalog/cohere.contract.js +16 -0
  13. package/dist/catalog/dcdr.contract.d.ts +10 -0
  14. package/dist/catalog/dcdr.contract.d.ts.map +1 -0
  15. package/dist/catalog/dcdr.contract.js +16 -0
  16. package/dist/catalog/gemini.contract.d.ts +10 -0
  17. package/dist/catalog/gemini.contract.d.ts.map +1 -0
  18. package/dist/catalog/gemini.contract.js +1067 -0
  19. package/dist/catalog/grok.contract.d.ts +10 -0
  20. package/dist/catalog/grok.contract.d.ts.map +1 -0
  21. package/dist/catalog/grok.contract.js +194 -0
  22. package/dist/catalog/http-tool.contract.d.ts +10 -0
  23. package/dist/catalog/http-tool.contract.d.ts.map +1 -0
  24. package/dist/catalog/http-tool.contract.js +16 -0
  25. package/dist/catalog/mistral.contract.d.ts +10 -0
  26. package/dist/catalog/mistral.contract.d.ts.map +1 -0
  27. package/dist/catalog/mistral.contract.js +234 -0
  28. package/dist/catalog/ocr.contract.d.ts +10 -0
  29. package/dist/catalog/ocr.contract.d.ts.map +1 -0
  30. package/dist/catalog/ocr.contract.js +16 -0
  31. package/dist/catalog/office.contract.d.ts +10 -0
  32. package/dist/catalog/office.contract.d.ts.map +1 -0
  33. package/dist/catalog/office.contract.js +53 -0
  34. package/dist/catalog/ollama.contract.d.ts +10 -0
  35. package/dist/catalog/ollama.contract.d.ts.map +1 -0
  36. package/dist/catalog/ollama.contract.js +16 -0
  37. package/dist/catalog/openai-compatible.contract.d.ts +10 -0
  38. package/dist/catalog/openai-compatible.contract.d.ts.map +1 -0
  39. package/dist/catalog/openai-compatible.contract.js +16 -0
  40. package/dist/catalog/openai.contract.d.ts +11 -0
  41. package/dist/catalog/openai.contract.d.ts.map +1 -0
  42. package/dist/catalog/openai.contract.js +2654 -0
  43. package/dist/catalog/rules.contract.d.ts +10 -0
  44. package/dist/catalog/rules.contract.d.ts.map +1 -0
  45. package/dist/catalog/rules.contract.js +16 -0
  46. package/dist/entitlements.contract.d.ts +3 -0
  47. package/dist/entitlements.contract.d.ts.map +1 -1
  48. package/dist/execution.contract.d.ts +122 -0
  49. package/dist/execution.contract.d.ts.map +1 -1
  50. package/dist/execution.contract.js +17 -1
  51. package/dist/policies.contract.d.ts +19 -0
  52. package/dist/policies.contract.d.ts.map +1 -1
  53. package/dist/policies.contract.js +24 -1
  54. package/dist/prompt-variable-schema.contract.d.ts +8 -1
  55. package/dist/prompt-variable-schema.contract.d.ts.map +1 -1
  56. package/dist/prompt-variable-schema.contract.js +109 -4
  57. package/dist/prompts.contract.d.ts +14 -8
  58. package/dist/prompts.contract.d.ts.map +1 -1
  59. package/dist/prompts.contract.js +12 -1
  60. package/dist/provider.catalog.contract.d.ts +459 -0
  61. package/dist/provider.catalog.contract.d.ts.map +1 -0
  62. package/dist/provider.catalog.contract.js +765 -0
  63. package/dist/provider.contract.d.ts +4 -352
  64. package/dist/provider.contract.d.ts.map +1 -1
  65. package/dist/provider.contract.js +16 -3634
  66. package/dist/runtime.client.d.ts +54 -1
  67. package/dist/runtime.client.d.ts.map +1 -1
  68. package/dist/runtime.client.js +185 -0
  69. package/dist/utils.contract.d.ts +33 -0
  70. package/dist/utils.contract.d.ts.map +1 -1
  71. package/dist/utils.contract.js +35 -0
  72. package/package.json +2 -1
@@ -0,0 +1,195 @@
1
+ import { Intent } from "./intent.contract";
2
+ /**
3
+ * Stable semantic part families for managed assets and multimodal execution payloads.
4
+ */
5
+ export declare enum AssetType {
6
+ TEXT = "text",
7
+ IMAGE = "image",
8
+ AUDIO = "audio",
9
+ VIDEO = "video",
10
+ DOCUMENT = "document"
11
+ }
12
+ /**
13
+ * Canonical list of supported asset type values.
14
+ */
15
+ export declare const ASSET_TYPE_VALUES: readonly AssetType[];
16
+ /**
17
+ * Stable human-readable labels for semantic asset families.
18
+ */
19
+ export declare const ASSET_TYPE_LABELS: Readonly<Record<AssetType, string>>;
20
+ /**
21
+ * Storage datasource families for asset-backed multimodal content.
22
+ */
23
+ export declare enum ExecutionAssetDatasourceType {
24
+ S3 = "S3",
25
+ FTP = "FTP",
26
+ NAS = "NAS"
27
+ }
28
+ /**
29
+ * How a storage datasource is resolved.
30
+ */
31
+ export declare enum ExecutionAssetDatasourceResolutionMode {
32
+ EXPLICIT = "EXPLICIT",
33
+ BACKEND = "BACKEND"
34
+ }
35
+ /**
36
+ * Reference to a storage datasource used by asset-backed execution parts.
37
+ */
38
+ export interface ExecutionAssetDatasourceReference {
39
+ /** Datasource family. */
40
+ type: ExecutionAssetDatasourceType;
41
+ /** Resolution mode for this datasource. */
42
+ resolution: ExecutionAssetDatasourceResolutionMode;
43
+ /** Stable backend-managed datasource identifier when resolution is shared/implicit. */
44
+ id?: string;
45
+ /** Optional S3-compatible endpoint or equivalent base address for explicit mode. */
46
+ endpoint?: string;
47
+ /** Optional bucket/share/container name for explicit mode. */
48
+ container?: string;
49
+ /** Optional region hint for explicit object storage. */
50
+ region?: string;
51
+ /** Optional tenant/path prefix within the datasource. */
52
+ basePath?: string;
53
+ }
54
+ /**
55
+ * Stable reference to an asset stored outside the execution payload itself.
56
+ */
57
+ export interface ExecutionAssetReference {
58
+ /** Optional datasource used to resolve this asset. */
59
+ datasource?: ExecutionAssetDatasourceReference;
60
+ /** Stable datasource-relative asset path resolved by runtime. */
61
+ assetPath?: string;
62
+ /** Optional known content hash. */
63
+ sha256?: string;
64
+ /** Optional known size in bytes. */
65
+ sizeBytes?: number;
66
+ }
67
+ /**
68
+ * Stable asset-management scopes that customer service tokens can expose.
69
+ */
70
+ export declare enum DcdrAssetScope {
71
+ READ = "assets:read",
72
+ WRITE = "assets:write",
73
+ DELETE = "assets:delete"
74
+ }
75
+ /**
76
+ * Optional semantic metadata associated with a managed asset.
77
+ */
78
+ export interface DcdrAssetMetadata {
79
+ /** Optional display title for the asset. */
80
+ title?: string;
81
+ /** Optional longer human-readable description. */
82
+ description?: string;
83
+ /** Optional alternative text, primarily for images and accessibility. */
84
+ alt?: string;
85
+ /** Optional free-form discovery tags. */
86
+ tags?: string[];
87
+ /** Optional string attributes for domain-specific indexing. */
88
+ attributes?: DcdrAssetMetadataAttributes;
89
+ }
90
+ /**
91
+ * Optional string attribute bag for semantic asset metadata.
92
+ */
93
+ export interface DcdrAssetMetadataAttributes {
94
+ [key: string]: string;
95
+ }
96
+ /**
97
+ * Tenant storage descriptor used by backend entitlements and runtime resolution.
98
+ *
99
+ * Notes
100
+ * - Runtime should normally select the single `isDefault=true` storage when callers omit `storageId`.
101
+ * - `datasource` remains backend-managed in cloud mode; runtime/freeware mode does not expose managed asset storage.
102
+ */
103
+ export interface DcdrAssetStorageDescriptor {
104
+ /** Stable tenant-visible storage identifier. */
105
+ id: string;
106
+ /** Backend-managed datasource details used to resolve the physical storage target. */
107
+ datasource: ExecutionAssetDatasourceReference;
108
+ /** Marks the default storage used when API calls omit `storageId`. */
109
+ isDefault?: boolean;
110
+ /** Optional soft disable flag for maintenance or entitlement gating. */
111
+ enabled?: boolean;
112
+ /** Optional maximum size enforced by runtime for uploads to this storage. */
113
+ maxAssetSizeBytes?: number;
114
+ /** Optional backend-issued credentials expiry hint (unix ms). */
115
+ credentialsExpiresAtMs?: number;
116
+ }
117
+ /**
118
+ * Upload request for creating or reusing a managed asset in tenant storage.
119
+ */
120
+ export interface DcdrAssetUploadRequest {
121
+ /** Optional semantic intent context for logging or future business metadata. */
122
+ intent?: Intent;
123
+ /** Semantic part family represented by the uploaded asset. */
124
+ partType: AssetType;
125
+ /** Technical MIME type of the payload being uploaded. */
126
+ mimeType: string;
127
+ /** Base64-encoded binary payload. */
128
+ dataBase64: string;
129
+ /** Optional human-friendly original filename. */
130
+ name?: string;
131
+ /** Optional semantic metadata stored alongside the asset. */
132
+ metadata?: DcdrAssetMetadata;
133
+ /** Optional storage override. When omitted, runtime uses the tenant default storage. */
134
+ storageId?: string;
135
+ /**
136
+ * Optional caller-provided logical cache key override.
137
+ *
138
+ * Notes
139
+ * - When omitted, runtime computes the default value with `buildDcdrAssetCacheKey()`.
140
+ * - This key is tenant-global by design and can therefore support reuse across intents.
141
+ */
142
+ assetCacheKey?: string;
143
+ }
144
+ /**
145
+ * Runtime response for a successful asset upload.
146
+ */
147
+ export interface DcdrAssetUploadResponse {
148
+ ok: boolean;
149
+ storageId: string;
150
+ created: boolean;
151
+ mimeType: string;
152
+ name?: string;
153
+ metadata?: DcdrAssetMetadata;
154
+ asset: ExecutionAssetReference;
155
+ }
156
+ /**
157
+ * Request for fetching a managed asset through runtime.
158
+ */
159
+ export interface DcdrAssetGetRequest {
160
+ /** Datasource-relative asset path returned by a previous upload or execution result. */
161
+ assetPath: string;
162
+ /** Optional storage override. When omitted, runtime uses the tenant default storage. */
163
+ storageId?: string;
164
+ }
165
+ /**
166
+ * Runtime response for a managed asset fetch.
167
+ */
168
+ export interface DcdrAssetGetResponse {
169
+ ok: boolean;
170
+ storageId: string;
171
+ mimeType?: string;
172
+ name?: string;
173
+ metadata?: DcdrAssetMetadata;
174
+ dataBase64: string;
175
+ asset: ExecutionAssetReference;
176
+ }
177
+ /**
178
+ * Request for deleting a managed asset through runtime.
179
+ */
180
+ export interface DcdrAssetDeleteRequest {
181
+ /** Datasource-relative asset path returned by a previous upload or execution result. */
182
+ assetPath: string;
183
+ /** Optional storage override. When omitted, runtime uses the tenant default storage. */
184
+ storageId?: string;
185
+ }
186
+ /**
187
+ * Runtime response for a managed asset deletion.
188
+ */
189
+ export interface DcdrAssetDeleteResponse {
190
+ ok: boolean;
191
+ storageId: string;
192
+ assetPath: string;
193
+ deleted: boolean;
194
+ }
195
+ //# sourceMappingURL=asset.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"asset.contract.d.ts","sourceRoot":"","sources":["../src/asset.contract.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE3C;;GAEG;AACH,oBAAY,SAAS;IACnB,IAAI,SAAS;IACb,KAAK,UAAU;IACf,KAAK,UAAU;IACf,KAAK,UAAU;IACf,QAAQ,aAAa;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,SAAS,SAAS,EAMjD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,QAAQ,CAAC,MAAM,CAAC,SAAS,EAAE,MAAM,CAAC,CAMjE,CAAC;AAEF;;GAEG;AACH,oBAAY,4BAA4B;IACtC,EAAE,OAAO;IACT,GAAG,QAAQ;IACX,GAAG,QAAQ;CACZ;AAED;;GAEG;AACH,oBAAY,sCAAsC;IAChD,QAAQ,aAAa;IACrB,OAAO,YAAY;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IAChD,yBAAyB;IACzB,IAAI,EAAE,4BAA4B,CAAC;IAEnC,2CAA2C;IAC3C,UAAU,EAAE,sCAAsC,CAAC;IAEnD,uFAAuF;IACvF,EAAE,CAAC,EAAE,MAAM,CAAC;IAEZ,oFAAoF;IACpF,QAAQ,CAAC,EAAE,MAAM,CAAC;IAElB,8DAA8D;IAC9D,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,wDAAwD;IACxD,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB,yDAAyD;IACzD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,uBAA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M,CAAC;IAClB,OAAO,EAAE,OAAO,CAAC;CAClB"}
@@ -0,0 +1,60 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.DcdrAssetScope = exports.ExecutionAssetDatasourceResolutionMode = exports.ExecutionAssetDatasourceType = exports.ASSET_TYPE_LABELS = exports.ASSET_TYPE_VALUES = exports.AssetType = void 0;
4
+ /**
5
+ * Stable semantic part families for managed assets and multimodal execution payloads.
6
+ */
7
+ var AssetType;
8
+ (function (AssetType) {
9
+ AssetType["TEXT"] = "text";
10
+ AssetType["IMAGE"] = "image";
11
+ AssetType["AUDIO"] = "audio";
12
+ AssetType["VIDEO"] = "video";
13
+ AssetType["DOCUMENT"] = "document";
14
+ })(AssetType || (exports.AssetType = AssetType = {}));
15
+ /**
16
+ * Canonical list of supported asset type values.
17
+ */
18
+ exports.ASSET_TYPE_VALUES = [
19
+ AssetType.TEXT,
20
+ AssetType.IMAGE,
21
+ AssetType.AUDIO,
22
+ AssetType.VIDEO,
23
+ AssetType.DOCUMENT,
24
+ ];
25
+ /**
26
+ * Stable human-readable labels for semantic asset families.
27
+ */
28
+ exports.ASSET_TYPE_LABELS = {
29
+ [AssetType.TEXT]: "text",
30
+ [AssetType.IMAGE]: "image",
31
+ [AssetType.AUDIO]: "audio",
32
+ [AssetType.VIDEO]: "video",
33
+ [AssetType.DOCUMENT]: "document",
34
+ };
35
+ /**
36
+ * Storage datasource families for asset-backed multimodal content.
37
+ */
38
+ var ExecutionAssetDatasourceType;
39
+ (function (ExecutionAssetDatasourceType) {
40
+ ExecutionAssetDatasourceType["S3"] = "S3";
41
+ ExecutionAssetDatasourceType["FTP"] = "FTP";
42
+ ExecutionAssetDatasourceType["NAS"] = "NAS";
43
+ })(ExecutionAssetDatasourceType || (exports.ExecutionAssetDatasourceType = ExecutionAssetDatasourceType = {}));
44
+ /**
45
+ * How a storage datasource is resolved.
46
+ */
47
+ var ExecutionAssetDatasourceResolutionMode;
48
+ (function (ExecutionAssetDatasourceResolutionMode) {
49
+ ExecutionAssetDatasourceResolutionMode["EXPLICIT"] = "EXPLICIT";
50
+ ExecutionAssetDatasourceResolutionMode["BACKEND"] = "BACKEND";
51
+ })(ExecutionAssetDatasourceResolutionMode || (exports.ExecutionAssetDatasourceResolutionMode = ExecutionAssetDatasourceResolutionMode = {}));
52
+ /**
53
+ * Stable asset-management scopes that customer service tokens can expose.
54
+ */
55
+ var DcdrAssetScope;
56
+ (function (DcdrAssetScope) {
57
+ DcdrAssetScope["READ"] = "assets:read";
58
+ DcdrAssetScope["WRITE"] = "assets:write";
59
+ DcdrAssetScope["DELETE"] = "assets:delete";
60
+ })(DcdrAssetScope || (exports.DcdrAssetScope = DcdrAssetScope = {}));
@@ -0,0 +1,11 @@
1
+ import type { ProviderCatalogModuleBuildArgs, ProviderModelDefinitionInput, ProviderModelE2EOverride, ProviderPricingFallbackRule } from "../provider.catalog.contract";
2
+ export declare const ANTHROPIC_PROVIDER_PRICING_FALLBACK_RULES: ProviderPricingFallbackRule[];
3
+ /**
4
+ * Returns the curated Anthropic provider model definitions.
5
+ */
6
+ export declare function buildAnthropicProviderModelDefinitions(args: ProviderCatalogModuleBuildArgs): ProviderModelDefinitionInput[];
7
+ /**
8
+ * Returns the E2E override map for Anthropic provider models.
9
+ */
10
+ export declare function buildAnthropicProviderModelE2EOverrides(args: ProviderCatalogModuleBuildArgs): Record<string, ProviderModelE2EOverride>;
11
+ //# sourceMappingURL=anthropic.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"anthropic.contract.d.ts","sourceRoot":"","sources":["../../src/catalog/anthropic.contract.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,EACxB,2BAA2B,EAC5B,MAAM,8BAA8B,CAAC;AAKtC,eAAO,MAAM,yCAAyC,EAAE,2BAA2B,EAMhF,CAAC;AAEJ;;GAEG;AACH,wBAAgB,sCAAsC,CACpD,IAAI,EAAE,8BAA8B,GACnC,4BAA4B,EAAE,CA6UhC;AAED;;GAEG;AACH,wBAAgB,uCAAuC,CACrD,IAAI,EAAE,8BAA8B,GACnC,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAE1C"}
@@ -0,0 +1,342 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ANTHROPIC_PROVIDER_PRICING_FALLBACK_RULES = void 0;
4
+ exports.buildAnthropicProviderModelDefinitions = buildAnthropicProviderModelDefinitions;
5
+ exports.buildAnthropicProviderModelE2EOverrides = buildAnthropicProviderModelE2EOverrides;
6
+ const asset_contract_1 = require("../asset.contract");
7
+ const execution_contract_1 = require("../execution.contract");
8
+ const intent_contract_1 = require("../intent.contract");
9
+ const ANTHROPIC_PRICING_URL = "https://platform.claude.com/docs/en/about-claude/pricing";
10
+ exports.ANTHROPIC_PROVIDER_PRICING_FALLBACK_RULES = [
11
+ // Opus/Sonnet/Haiku family pricing is expected to be consistent across close variants.
12
+ { match: /^claude-opus-4-/, baseModelId: "claude-opus-4-7" },
13
+ { match: /^claude-sonnet-4-/, baseModelId: "claude-sonnet-4-6" },
14
+ { match: /^claude-haiku-4-/, baseModelId: "claude-haiku-4-5" },
15
+ ];
16
+ /**
17
+ * Returns the curated Anthropic provider model definitions.
18
+ */
19
+ function buildAnthropicProviderModelDefinitions(args) {
20
+ return [
21
+ // Source: Anthropic Models overview (latest models comparison), updated 2026-05-04
22
+ // Note: DCDR runtime v1 treats Anthropic as CHAT-only; multimodal/vision intent types are intentionally not listed yet.
23
+ {
24
+ id: "claude-opus-4-8",
25
+ types: [intent_contract_1.IntentType.CHAT],
26
+ parameterSupport: {
27
+ parameters: {
28
+ [args.catalogEnums.promptParameterKey.TEMPERATURE]: args.catalogEnums.parameterSupportStatus.NOT_SUPPORTED,
29
+ [args.catalogEnums.promptParameterKey.TOP_P]: args.catalogEnums.parameterSupportStatus.NOT_SUPPORTED,
30
+ },
31
+ notes: "Opus 4.8 currently rejects explicit temperature and top_p in provider E2E on the Anthropic Messages API; runtime should avoid sending both.",
32
+ updatedAt: "2026-06-16",
33
+ },
34
+ publicForCustomers: true,
35
+ tokenUsageCovered: true,
36
+ publicName: "DCDR Best",
37
+ badge: "Anthropic",
38
+ primaryCategory: args.catalogEnums.publicModelCategory.BEST,
39
+ categories: [args.catalogEnums.publicModelCategory.BEST],
40
+ qualityTier: 5,
41
+ speedTier: 3,
42
+ costTier: 1,
43
+ recommendedUseCases: ["reasoning", "agentic_coding"],
44
+ isRecommended: false,
45
+ isGlobalDefault: false,
46
+ isCategoryDefault: false,
47
+ pricing: args.pricingPerMillionTokens({
48
+ input: 5.0,
49
+ output: 25.0,
50
+ sourceUrl: ANTHROPIC_PRICING_URL,
51
+ }),
52
+ runtimeSupport: {
53
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
54
+ reason: "Validated via provider E2E (text + structured) with model-specific sampling parameter filtering.",
55
+ inputParts: {
56
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
57
+ supportedAssetTypes: [
58
+ asset_contract_1.AssetType.TEXT,
59
+ asset_contract_1.AssetType.IMAGE,
60
+ asset_contract_1.AssetType.DOCUMENT,
61
+ ],
62
+ supportedSourceKinds: [
63
+ execution_contract_1.ExecutionPartSourceKind.INLINE,
64
+ execution_contract_1.ExecutionPartSourceKind.URL,
65
+ execution_contract_1.ExecutionPartSourceKind.ASSET,
66
+ ],
67
+ notes: "Validated with the comprehension-grade Anthropic curator on 2026-06-26: TEXT/IMAGE/DOCUMENT pass across INLINE/URL/ASSET, while AUDIO/VIDEO are rejected deterministically with MODEL_UNSUPPORTED by the current Anthropic Messages provider path before any upstream model call.",
68
+ updatedAt: "2026-06-26",
69
+ },
70
+ updatedAt: "2026-06-07",
71
+ },
72
+ },
73
+ {
74
+ id: "claude-opus-4-7",
75
+ types: [intent_contract_1.IntentType.CHAT],
76
+ parameterSupport: {
77
+ parameters: {
78
+ [args.catalogEnums.promptParameterKey.TEMPERATURE]: args.catalogEnums.parameterSupportStatus.NOT_SUPPORTED,
79
+ [args.catalogEnums.promptParameterKey.TOP_P]: args.catalogEnums.parameterSupportStatus.NOT_SUPPORTED,
80
+ },
81
+ notes: "Opus 4.7 rejects explicit temperature/top_p in provider E2E on current Anthropic Messages API.",
82
+ updatedAt: "2026-06-07",
83
+ },
84
+ pricing: args.pricingPerMillionTokens({
85
+ input: 5.0,
86
+ output: 25.0,
87
+ sourceUrl: ANTHROPIC_PRICING_URL,
88
+ }),
89
+ runtimeSupport: {
90
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
91
+ reason: "Validated via provider E2E (run + streaming SSE)",
92
+ inputParts: {
93
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
94
+ supportedAssetTypes: [asset_contract_1.AssetType.IMAGE, asset_contract_1.AssetType.DOCUMENT],
95
+ supportedSourceKinds: [
96
+ execution_contract_1.ExecutionPartSourceKind.INLINE,
97
+ execution_contract_1.ExecutionPartSourceKind.URL,
98
+ execution_contract_1.ExecutionPartSourceKind.ASSET,
99
+ ],
100
+ notes: "Re-curated on 2026-06-28 with the 1024-token baseline: IMAGE/DOCUMENT pass across INLINE/URL/ASSET. TEXT returns 200 but does not confirm sawProvidedInput=true on any source kind (model behavior, not token truncation). AUDIO/VIDEO are rejected deterministically with MODEL_UNSUPPORTED by the Anthropic Messages provider path.",
101
+ updatedAt: "2026-06-28",
102
+ },
103
+ updatedAt: "2026-05-04",
104
+ },
105
+ },
106
+ // Legacy/stable IDs still visible via Models API for some accounts.
107
+ {
108
+ id: "claude-opus-4-6",
109
+ types: [intent_contract_1.IntentType.CHAT],
110
+ pricing: args.pricingPerMillionTokens({
111
+ input: 5.0,
112
+ output: 25.0,
113
+ sourceUrl: ANTHROPIC_PRICING_URL,
114
+ }),
115
+ runtimeSupport: {
116
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
117
+ reason: "Validated via provider E2E (run + structured + streaming SSE)",
118
+ inputParts: {
119
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
120
+ supportedAssetTypes: [
121
+ asset_contract_1.AssetType.TEXT,
122
+ asset_contract_1.AssetType.IMAGE,
123
+ asset_contract_1.AssetType.DOCUMENT,
124
+ ],
125
+ supportedSourceKinds: [
126
+ execution_contract_1.ExecutionPartSourceKind.INLINE,
127
+ execution_contract_1.ExecutionPartSourceKind.URL,
128
+ execution_contract_1.ExecutionPartSourceKind.ASSET,
129
+ ],
130
+ notes: "Validated with the comprehension-grade Anthropic curator on 2026-06-26: TEXT/IMAGE/DOCUMENT pass across INLINE/URL/ASSET, while AUDIO/VIDEO are rejected deterministically with MODEL_UNSUPPORTED by the current Anthropic Messages provider path before any upstream model call.",
131
+ updatedAt: "2026-06-26",
132
+ },
133
+ updatedAt: "2026-05-04",
134
+ },
135
+ },
136
+ {
137
+ id: "claude-opus-4-5-20251101",
138
+ types: [intent_contract_1.IntentType.CHAT],
139
+ pricing: args.pricingPerMillionTokens({
140
+ input: 5.0,
141
+ output: 25.0,
142
+ sourceUrl: ANTHROPIC_PRICING_URL,
143
+ }),
144
+ runtimeSupport: {
145
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
146
+ reason: "Validated via provider E2E (run + structured + streaming SSE)",
147
+ inputParts: {
148
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
149
+ supportedAssetTypes: [
150
+ asset_contract_1.AssetType.TEXT,
151
+ asset_contract_1.AssetType.IMAGE,
152
+ asset_contract_1.AssetType.DOCUMENT,
153
+ ],
154
+ supportedSourceKinds: [
155
+ execution_contract_1.ExecutionPartSourceKind.INLINE,
156
+ execution_contract_1.ExecutionPartSourceKind.URL,
157
+ execution_contract_1.ExecutionPartSourceKind.ASSET,
158
+ ],
159
+ notes: "Validated with the comprehension-grade Anthropic curator on 2026-06-26: TEXT/IMAGE/DOCUMENT pass across INLINE/URL/ASSET, while AUDIO/VIDEO are rejected deterministically with MODEL_UNSUPPORTED by the current Anthropic Messages provider path before any upstream model call.",
160
+ updatedAt: "2026-06-26",
161
+ },
162
+ updatedAt: "2026-05-04",
163
+ },
164
+ },
165
+ {
166
+ id: "claude-opus-4-1-20250805",
167
+ types: [intent_contract_1.IntentType.CHAT],
168
+ pricing: args.pricingPerMillionTokens({
169
+ input: 15.0,
170
+ output: 75.0,
171
+ sourceUrl: ANTHROPIC_PRICING_URL,
172
+ }),
173
+ runtimeSupport: {
174
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
175
+ reason: "Validated via provider E2E (run + structured + streaming SSE)",
176
+ inputParts: {
177
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
178
+ supportedAssetTypes: [
179
+ asset_contract_1.AssetType.TEXT,
180
+ asset_contract_1.AssetType.IMAGE,
181
+ asset_contract_1.AssetType.DOCUMENT,
182
+ ],
183
+ supportedSourceKinds: [
184
+ execution_contract_1.ExecutionPartSourceKind.INLINE,
185
+ execution_contract_1.ExecutionPartSourceKind.URL,
186
+ execution_contract_1.ExecutionPartSourceKind.ASSET,
187
+ ],
188
+ notes: "Validated with the comprehension-grade Anthropic curator on 2026-06-26: TEXT/IMAGE/DOCUMENT pass across INLINE/URL/ASSET, while AUDIO/VIDEO are rejected deterministically with MODEL_UNSUPPORTED by the current Anthropic Messages provider path before any upstream model call.",
189
+ updatedAt: "2026-06-26",
190
+ },
191
+ updatedAt: "2026-05-04",
192
+ },
193
+ },
194
+ {
195
+ id: "claude-sonnet-4-6",
196
+ types: [intent_contract_1.IntentType.CHAT],
197
+ publicForCustomers: true,
198
+ tokenUsageCovered: true,
199
+ publicName: "DCDR Smart",
200
+ badge: "Anthropic",
201
+ primaryCategory: args.catalogEnums.publicModelCategory.SMART,
202
+ categories: [
203
+ args.catalogEnums.publicModelCategory.SMART,
204
+ args.catalogEnums.publicModelCategory.FAST,
205
+ ],
206
+ qualityTier: 4,
207
+ speedTier: 4,
208
+ costTier: 3,
209
+ recommendedUseCases: ["production_chat", "coding", "reasoning"],
210
+ isRecommended: true,
211
+ isGlobalDefault: false,
212
+ isCategoryDefault: false,
213
+ pricing: args.pricingPerMillionTokens({
214
+ input: 3.0,
215
+ output: 15.0,
216
+ sourceUrl: ANTHROPIC_PRICING_URL,
217
+ }),
218
+ runtimeSupport: {
219
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
220
+ reason: "Validated via provider E2E (run + streaming SSE)",
221
+ inputParts: {
222
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
223
+ supportedAssetTypes: [asset_contract_1.AssetType.IMAGE, asset_contract_1.AssetType.DOCUMENT],
224
+ supportedSourceKinds: [
225
+ execution_contract_1.ExecutionPartSourceKind.INLINE,
226
+ execution_contract_1.ExecutionPartSourceKind.URL,
227
+ execution_contract_1.ExecutionPartSourceKind.ASSET,
228
+ ],
229
+ notes: "Re-curated on 2026-06-28 with the 1024-token baseline: IMAGE/DOCUMENT pass across INLINE/URL/ASSET (IMAGE URL had a transient 429 rate-limit hit, not structural). TEXT returns 200 but does not confirm sawProvidedInput=true on any source kind (model behavior, not token truncation). AUDIO/VIDEO are rejected deterministically with MODEL_UNSUPPORTED by the Anthropic Messages provider path.",
230
+ updatedAt: "2026-06-28",
231
+ },
232
+ updatedAt: "2026-05-04",
233
+ },
234
+ },
235
+ {
236
+ id: "claude-sonnet-4-5-20250929",
237
+ types: [intent_contract_1.IntentType.CHAT],
238
+ pricing: args.pricingPerMillionTokens({
239
+ input: 3.0,
240
+ output: 15.0,
241
+ sourceUrl: ANTHROPIC_PRICING_URL,
242
+ }),
243
+ runtimeSupport: {
244
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
245
+ reason: "Validated via provider E2E (run + structured + streaming SSE)",
246
+ inputParts: {
247
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
248
+ supportedAssetTypes: [asset_contract_1.AssetType.DOCUMENT],
249
+ supportedSourceKinds: [
250
+ execution_contract_1.ExecutionPartSourceKind.INLINE,
251
+ execution_contract_1.ExecutionPartSourceKind.URL,
252
+ execution_contract_1.ExecutionPartSourceKind.ASSET,
253
+ ],
254
+ notes: "Re-curated on 2026-06-28 with the 1024-token baseline: DOCUMENT URL/ASSET pass (INLINE got a transient 429, not structural). TEXT returns 200 but does not confirm sawProvidedInput=true on any source kind (model behavior). IMAGE fails the canonical visual cue across all source kinds. AUDIO/VIDEO are rejected deterministically with MODEL_UNSUPPORTED by the Anthropic Messages provider path.",
255
+ updatedAt: "2026-06-28",
256
+ },
257
+ updatedAt: "2026-05-04",
258
+ },
259
+ },
260
+ // Haiku is the cheapest/default smoke-test model.
261
+ {
262
+ id: "claude-haiku-4-5",
263
+ types: [intent_contract_1.IntentType.CHAT],
264
+ publicForCustomers: true,
265
+ tokenUsageCovered: true,
266
+ publicName: "DCDR Fast",
267
+ badge: "Anthropic",
268
+ primaryCategory: args.catalogEnums.publicModelCategory.FAST,
269
+ categories: [
270
+ args.catalogEnums.publicModelCategory.FAST,
271
+ args.catalogEnums.publicModelCategory.ECONOMY,
272
+ ],
273
+ qualityTier: 3,
274
+ speedTier: 5,
275
+ costTier: 4,
276
+ recommendedUseCases: ["interactive_chat", "support", "classification"],
277
+ isRecommended: false,
278
+ isGlobalDefault: false,
279
+ isCategoryDefault: false,
280
+ pricing: args.pricingPerMillionTokens({
281
+ input: 1.0,
282
+ output: 5.0,
283
+ sourceUrl: ANTHROPIC_PRICING_URL,
284
+ }),
285
+ runtimeSupport: {
286
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
287
+ reason: "Validated via provider E2E (run + streaming SSE)",
288
+ inputParts: {
289
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
290
+ supportedAssetTypes: [
291
+ asset_contract_1.AssetType.TEXT,
292
+ asset_contract_1.AssetType.IMAGE,
293
+ asset_contract_1.AssetType.DOCUMENT,
294
+ ],
295
+ supportedSourceKinds: [
296
+ execution_contract_1.ExecutionPartSourceKind.INLINE,
297
+ execution_contract_1.ExecutionPartSourceKind.URL,
298
+ execution_contract_1.ExecutionPartSourceKind.ASSET,
299
+ ],
300
+ notes: "Validated with the comprehension-grade Anthropic curator on 2026-06-26: TEXT/IMAGE/DOCUMENT pass across INLINE/URL/ASSET, while AUDIO/VIDEO are rejected deterministically with MODEL_UNSUPPORTED by the current Anthropic Messages provider path before any upstream model call.",
301
+ updatedAt: "2026-06-26",
302
+ },
303
+ updatedAt: "2026-05-04",
304
+ },
305
+ },
306
+ {
307
+ id: "claude-haiku-4-5-20251001",
308
+ types: [intent_contract_1.IntentType.CHAT],
309
+ pricing: args.pricingPerMillionTokens({
310
+ input: 1.0,
311
+ output: 5.0,
312
+ sourceUrl: ANTHROPIC_PRICING_URL,
313
+ }),
314
+ runtimeSupport: {
315
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
316
+ reason: "Validated via provider E2E (run + streaming SSE)",
317
+ inputParts: {
318
+ status: args.catalogEnums.runtimeSupportStatus.SUPPORTED,
319
+ supportedAssetTypes: [
320
+ asset_contract_1.AssetType.TEXT,
321
+ asset_contract_1.AssetType.IMAGE,
322
+ asset_contract_1.AssetType.DOCUMENT,
323
+ ],
324
+ supportedSourceKinds: [
325
+ execution_contract_1.ExecutionPartSourceKind.INLINE,
326
+ execution_contract_1.ExecutionPartSourceKind.URL,
327
+ execution_contract_1.ExecutionPartSourceKind.ASSET,
328
+ ],
329
+ notes: "Validated with the comprehension-grade Anthropic curator on 2026-06-26: TEXT/IMAGE/DOCUMENT pass across INLINE/URL/ASSET, while AUDIO/VIDEO are rejected deterministically with MODEL_UNSUPPORTED by the current Anthropic Messages provider path before any upstream model call.",
330
+ updatedAt: "2026-06-26",
331
+ },
332
+ updatedAt: "2026-05-04",
333
+ },
334
+ },
335
+ ];
336
+ }
337
+ /**
338
+ * Returns the E2E override map for Anthropic provider models.
339
+ */
340
+ function buildAnthropicProviderModelE2EOverrides(args) {
341
+ return {};
342
+ }
@@ -0,0 +1,10 @@
1
+ import type { ProviderCatalogModuleBuildArgs, ProviderModelDefinitionInput, ProviderModelE2EOverride } from "../provider.catalog.contract";
2
+ /**
3
+ * Returns the curated CLIP provider model definitions.
4
+ */
5
+ export declare function buildClipProviderModelDefinitions(args: ProviderCatalogModuleBuildArgs): ProviderModelDefinitionInput[];
6
+ /**
7
+ * Returns the E2E override map for CLIP provider models.
8
+ */
9
+ export declare function buildClipProviderModelE2EOverrides(args: ProviderCatalogModuleBuildArgs): Record<string, ProviderModelE2EOverride>;
10
+ //# sourceMappingURL=clip.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"clip.contract.d.ts","sourceRoot":"","sources":["../../src/catalog/clip.contract.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,EAGzB,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,IAAI,EAAE,8BAA8B,GACnC,4BAA4B,EAAE,CAGhC;AAED;;GAEG;AACH,wBAAgB,kCAAkC,CAChD,IAAI,EAAE,8BAA8B,GACnC,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAE1C"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.buildClipProviderModelDefinitions = buildClipProviderModelDefinitions;
4
+ exports.buildClipProviderModelE2EOverrides = buildClipProviderModelE2EOverrides;
5
+ /**
6
+ * Returns the curated CLIP provider model definitions.
7
+ */
8
+ function buildClipProviderModelDefinitions(args) {
9
+ return [];
10
+ }
11
+ /**
12
+ * Returns the E2E override map for CLIP provider models.
13
+ */
14
+ function buildClipProviderModelE2EOverrides(args) {
15
+ return {};
16
+ }
@@ -0,0 +1,10 @@
1
+ import type { ProviderCatalogModuleBuildArgs, ProviderModelDefinitionInput, ProviderModelE2EOverride } from "../provider.catalog.contract";
2
+ /**
3
+ * Returns the curated Cohere provider model definitions.
4
+ */
5
+ export declare function buildCohereProviderModelDefinitions(args: ProviderCatalogModuleBuildArgs): ProviderModelDefinitionInput[];
6
+ /**
7
+ * Returns the E2E override map for Cohere provider models.
8
+ */
9
+ export declare function buildCohereProviderModelE2EOverrides(args: ProviderCatalogModuleBuildArgs): Record<string, ProviderModelE2EOverride>;
10
+ //# sourceMappingURL=cohere.contract.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cohere.contract.d.ts","sourceRoot":"","sources":["../../src/catalog/cohere.contract.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,EAGzB,MAAM,8BAA8B,CAAC;AAEtC;;GAEG;AACH,wBAAgB,mCAAmC,CACjD,IAAI,EAAE,8BAA8B,GACnC,4BAA4B,EAAE,CAGhC;AAED;;GAEG;AACH,wBAAgB,oCAAoC,CAClD,IAAI,EAAE,8BAA8B,GACnC,MAAM,CAAC,MAAM,EAAE,wBAAwB,CAAC,CAE1C"}