@ancplua/qyl-api-schema 1.0.0 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api/routes.tsp +0 -53
- package/api/runner.tsp +48 -0
- package/generated/json-schema/qyl-api-schema.json +65 -1950
- package/generated/openapi/qyl.openapi.json +3323 -4896
- package/generated/otel-keys.gen.tsp +1 -1
- package/generated/ts-runtime/api.d.ts +0 -432
- package/generated/ts-runtime/api.js +0 -144
- package/index.tsp +0 -1
- package/package.json +2 -3
- package/models/cost-etl-audit.tsp +0 -982
|
@@ -1,982 +0,0 @@
|
|
|
1
|
-
// =============================================================================
|
|
2
|
-
// GenAI cost provenance and ETL-audit contracts
|
|
3
|
-
// =============================================================================
|
|
4
|
-
|
|
5
|
-
import "@typespec/openapi";
|
|
6
|
-
import "../common/types.tsp";
|
|
7
|
-
|
|
8
|
-
using TypeSpec.OpenAPI;
|
|
9
|
-
using Qyl.Api.Contracts.Common;
|
|
10
|
-
|
|
11
|
-
namespace Qyl.Api.Contracts.Cost;
|
|
12
|
-
|
|
13
|
-
@doc("Current synchronization state for a provider-owned billing source.")
|
|
14
|
-
enum ProviderBillingSourceStatus {
|
|
15
|
-
@doc("The source has no configured provider credential or cloud identity.")
|
|
16
|
-
unconfigured: "unconfigured",
|
|
17
|
-
|
|
18
|
-
@doc("A provider credential or cloud identity is configured, but no fetch has completed yet.")
|
|
19
|
-
pending: "pending",
|
|
20
|
-
|
|
21
|
-
@doc("The most recent provider fetch completed inside its freshness window.")
|
|
22
|
-
current: "current",
|
|
23
|
-
|
|
24
|
-
@doc("The last successful provider response is older than its freshness window.")
|
|
25
|
-
stale: "stale",
|
|
26
|
-
|
|
27
|
-
@doc("The latest provider billing fetch failed; no raw credential or upstream response is exposed.")
|
|
28
|
-
syncFailed: "sync_failed",
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
@doc("Granularity at which official provider-billed cost can be attributed to telemetry.")
|
|
32
|
-
enum ProviderBillingAttribution {
|
|
33
|
-
@doc("The provider API identified the model and period represented by the value.")
|
|
34
|
-
providerModelPeriod: "provider_model_period",
|
|
35
|
-
|
|
36
|
-
@doc("The provider API identified only a provider/account period, not a model or request.")
|
|
37
|
-
providerPeriod: "provider_period",
|
|
38
|
-
|
|
39
|
-
@doc("No defensible attribution is available.")
|
|
40
|
-
unavailable: "unavailable",
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
@doc("Provenance for billed cost data fetched directly from a provider-owned API.")
|
|
44
|
-
model ProviderBillingSource {
|
|
45
|
-
@doc("Canonical GenAI provider or cloud billing system name.")
|
|
46
|
-
provider: string;
|
|
47
|
-
|
|
48
|
-
@doc("Current billing synchronization state.")
|
|
49
|
-
status: ProviderBillingSourceStatus;
|
|
50
|
-
|
|
51
|
-
@doc("Official provider-owned API endpoint used for the fetch.")
|
|
52
|
-
@encodedName("application/json", "source_endpoint")
|
|
53
|
-
sourceEndpoint: UrlString;
|
|
54
|
-
|
|
55
|
-
@doc("Attribution granularity supported by this source response.")
|
|
56
|
-
attribution: ProviderBillingAttribution;
|
|
57
|
-
|
|
58
|
-
@doc("UTC time of the latest fetch attempt.")
|
|
59
|
-
@encodedName("application/json", "last_attempt_at")
|
|
60
|
-
lastAttemptAt?: utcDateTime;
|
|
61
|
-
|
|
62
|
-
@doc("UTC time of the latest successful fetch.")
|
|
63
|
-
@encodedName("application/json", "last_success_at")
|
|
64
|
-
lastSuccessAt?: utcDateTime;
|
|
65
|
-
|
|
66
|
-
@doc("Start of the provider billing period.")
|
|
67
|
-
@encodedName("application/json", "period_start")
|
|
68
|
-
periodStart?: utcDateTime;
|
|
69
|
-
|
|
70
|
-
@doc("End of the provider billing period.")
|
|
71
|
-
@encodedName("application/json", "period_end")
|
|
72
|
-
periodEnd?: utcDateTime;
|
|
73
|
-
|
|
74
|
-
@doc("ISO 4217 currency code returned by the provider.")
|
|
75
|
-
@encodedName("application/json", "currency_code")
|
|
76
|
-
currencyCode?: string;
|
|
77
|
-
|
|
78
|
-
@doc("Cost returned by the provider for this period, converted from provider-declared USD units without rate inference.")
|
|
79
|
-
@encodedName("application/json", "reported_cost_usd")
|
|
80
|
-
reportedCostUsd?: CostUsd;
|
|
81
|
-
|
|
82
|
-
@doc("Model identifier returned by the provider when the source supports it.")
|
|
83
|
-
@encodedName("application/json", "model")
|
|
84
|
-
modelName?: string;
|
|
85
|
-
|
|
86
|
-
@doc("Stable, non-sensitive failure category for the last attempt.")
|
|
87
|
-
@encodedName("application/json", "failure_category")
|
|
88
|
-
failureCategory?: string;
|
|
89
|
-
}
|
|
90
|
-
|
|
91
|
-
@doc("Current synchronization state for a configured live model catalog.")
|
|
92
|
-
enum ModelCatalogSourceStatus {
|
|
93
|
-
@doc("The source is registered, but its required credential or activation is not configured.")
|
|
94
|
-
unconfigured: "unconfigured",
|
|
95
|
-
|
|
96
|
-
@doc("The source is configured, but no fetch has completed yet.")
|
|
97
|
-
pending: "pending",
|
|
98
|
-
|
|
99
|
-
@doc("The most recent successful catalog fetch is inside its freshness window.")
|
|
100
|
-
current: "current",
|
|
101
|
-
|
|
102
|
-
@doc("The last successful catalog response is older than its freshness window.")
|
|
103
|
-
stale: "stale",
|
|
104
|
-
|
|
105
|
-
@doc("The latest catalog fetch failed; no raw credential or upstream response is exposed.")
|
|
106
|
-
syncFailed: "sync_failed",
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
@doc("Synchronization metadata for one configurable live model catalog source.")
|
|
110
|
-
model ModelCatalogSource {
|
|
111
|
-
@doc("Unique stable identifier of the configured catalog source.")
|
|
112
|
-
@encodedName("application/json", "source_id")
|
|
113
|
-
sourceId: string;
|
|
114
|
-
|
|
115
|
-
@doc("Configured source priority used for deterministic selection when multiple current catalogs match. Zero is highest priority; lower values win.")
|
|
116
|
-
priority: Count;
|
|
117
|
-
|
|
118
|
-
status: ModelCatalogSourceStatus;
|
|
119
|
-
|
|
120
|
-
@doc("Rate-selection semantics published by this source's active snapshot.")
|
|
121
|
-
@encodedName("application/json", "price_semantics")
|
|
122
|
-
priceSemantics?: ModelCatalogPriceSemantics;
|
|
123
|
-
|
|
124
|
-
@doc("Configured API endpoint used to fetch the live model catalog.")
|
|
125
|
-
@encodedName("application/json", "source_endpoint")
|
|
126
|
-
sourceEndpoint: UrlString;
|
|
127
|
-
|
|
128
|
-
@doc("UTC time of the latest fetch attempt.")
|
|
129
|
-
@encodedName("application/json", "last_attempt_at")
|
|
130
|
-
lastAttemptAt?: utcDateTime;
|
|
131
|
-
|
|
132
|
-
@doc("UTC time when the source was last verified successfully, including a verification that retained unchanged content.")
|
|
133
|
-
@encodedName("application/json", "last_verified_at")
|
|
134
|
-
lastVerifiedAt?: utcDateTime;
|
|
135
|
-
|
|
136
|
-
@doc("UTC time when the content of the currently retained catalog snapshot was retrieved.")
|
|
137
|
-
@encodedName("application/json", "retrieved_at")
|
|
138
|
-
retrievedAt?: utcDateTime;
|
|
139
|
-
|
|
140
|
-
@doc("Content-addressed identifier of the catalog snapshot currently used for estimates.")
|
|
141
|
-
@encodedName("application/json", "active_snapshot_id")
|
|
142
|
-
activeSnapshotId?: string;
|
|
143
|
-
|
|
144
|
-
@doc("Number of model records in the active catalog snapshot.")
|
|
145
|
-
@encodedName("application/json", "model_count")
|
|
146
|
-
modelCount?: Count;
|
|
147
|
-
|
|
148
|
-
@doc("Stable, non-sensitive failure category for the last attempt.")
|
|
149
|
-
@encodedName("application/json", "failure_category")
|
|
150
|
-
failureCategory?: string;
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
@doc("How a live catalog rate was selected when estimating cluster cost.")
|
|
154
|
-
enum ModelCatalogPriceSemantics {
|
|
155
|
-
@doc("The catalog source publishes its lowest available model rate rather than an official bill or a uniquely routed endpoint price. A conditional rate applies only when its conditions are proven.")
|
|
156
|
-
minimumAvailableRate: "minimum_available_rate",
|
|
157
|
-
|
|
158
|
-
@doc("The source's published rate was applied without selecting a lower conditional rate.")
|
|
159
|
-
publishedRate: "published_rate",
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
@doc("Deterministic exact match used to resolve an observed model identity to a catalog record. Fuzzy, prefix, suffix, date, and alias matching are not permitted.")
|
|
163
|
-
enum ModelCatalogMatchKind {
|
|
164
|
-
@doc("The observed model value exactly matched the catalog model identifier.")
|
|
165
|
-
exactModelId: "exact_model_id",
|
|
166
|
-
|
|
167
|
-
@doc("The observed model value exactly matched the catalog canonical slug.")
|
|
168
|
-
exactCanonicalSlug: "exact_canonical_slug",
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
@doc("Telemetry attribute used as the observed model identity for an exact catalog match.")
|
|
172
|
-
enum ModelCatalogObservedIdentityBasis {
|
|
173
|
-
@doc("The observed identity came from the provider response model.")
|
|
174
|
-
responseModel: "response_model",
|
|
175
|
-
|
|
176
|
-
@doc("No response model was available, so the observed identity came from the request model.")
|
|
177
|
-
requestModelFallback: "request_model_fallback",
|
|
178
|
-
}
|
|
179
|
-
|
|
180
|
-
@doc("Provenance for the live catalog rates used to estimate one cluster.")
|
|
181
|
-
model ModelCatalogPriceProvenance {
|
|
182
|
-
@doc("Unique stable identifier of the configured catalog source.")
|
|
183
|
-
@encodedName("application/json", "source_id")
|
|
184
|
-
sourceId: string;
|
|
185
|
-
|
|
186
|
-
@doc("Configured API endpoint from which the catalog was retrieved.")
|
|
187
|
-
@encodedName("application/json", "source_endpoint")
|
|
188
|
-
sourceEndpoint: UrlString;
|
|
189
|
-
|
|
190
|
-
@doc("Content-addressed identifier of the exact catalog snapshot used for this estimate.")
|
|
191
|
-
@encodedName("application/json", "snapshot_id")
|
|
192
|
-
snapshotId: string;
|
|
193
|
-
|
|
194
|
-
@doc("Exact model identifier selected from the source catalog.")
|
|
195
|
-
@encodedName("application/json", "price_model_id")
|
|
196
|
-
priceModelId: string;
|
|
197
|
-
|
|
198
|
-
@doc("Exact observed telemetry value compared with the selected catalog record.")
|
|
199
|
-
@encodedName("application/json", "observed_model_id")
|
|
200
|
-
observedModelId: string;
|
|
201
|
-
|
|
202
|
-
@encodedName("application/json", "observed_model_identity_basis")
|
|
203
|
-
observedModelIdentityBasis: ModelCatalogObservedIdentityBasis;
|
|
204
|
-
|
|
205
|
-
@encodedName("application/json", "model_match_kind")
|
|
206
|
-
modelMatchKind: ModelCatalogMatchKind;
|
|
207
|
-
|
|
208
|
-
@doc("UTC time when the current catalog snapshot used for this counterfactual estimate was retrieved. For historical audit periods, this is not evidence of the price that applied historically.")
|
|
209
|
-
@encodedName("application/json", "retrieved_at")
|
|
210
|
-
retrievedAt: utcDateTime;
|
|
211
|
-
|
|
212
|
-
@encodedName("application/json", "price_semantics")
|
|
213
|
-
priceSemantics: ModelCatalogPriceSemantics;
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
@doc("How a catalog rate charges its measured quantity.")
|
|
217
|
-
enum ModelCatalogBillingMode {
|
|
218
|
-
@doc("The rate is multiplied by a measured unit quantity.")
|
|
219
|
-
perUnit: "per_unit",
|
|
220
|
-
|
|
221
|
-
@doc("The rate is charged once for each observed request.")
|
|
222
|
-
perRequest: "per_request",
|
|
223
|
-
}
|
|
224
|
-
|
|
225
|
-
@doc("How a selected catalog rate relates to the source's published base rate for the same component.")
|
|
226
|
-
enum ModelCatalogRateRelation {
|
|
227
|
-
@doc("The selected rate is the published base rate for this component.")
|
|
228
|
-
baseRate: "base_rate",
|
|
229
|
-
|
|
230
|
-
@doc("The selected rate is an additive surcharge alongside the published base rate.")
|
|
231
|
-
additiveSurcharge: "additive_surcharge",
|
|
232
|
-
|
|
233
|
-
@doc("A source subtype rate replaces the inclusive published base rate for its target usage dimension. Conditional evidence is present only when an ordered source override altered that subtype rate.")
|
|
234
|
-
replacesInclusiveBaseRate: "replaces_inclusive_base_rate",
|
|
235
|
-
|
|
236
|
-
@doc("A proven ordered source override replaces the previously published rate for its target usage dimension.")
|
|
237
|
-
replacesPublishedRate: "replaces_published_rate",
|
|
238
|
-
}
|
|
239
|
-
|
|
240
|
-
@doc("One-based position of a conditional override in its source response.")
|
|
241
|
-
@minValue(1)
|
|
242
|
-
scalar ModelCatalogSourceOrder extends int64;
|
|
243
|
-
|
|
244
|
-
@doc("Ordered evidence proving whether a conditional catalog override applied to an observed request quantity.")
|
|
245
|
-
model ModelCatalogConditionalRateEvidence {
|
|
246
|
-
@doc("One-based position of this override in the source response; later matching overrides win. Tier zero is reserved for the published base rate and is not a source override.")
|
|
247
|
-
@encodedName("application/json", "source_order")
|
|
248
|
-
sourceOrder: ModelCatalogSourceOrder;
|
|
249
|
-
|
|
250
|
-
@doc("Observed per-call usage dimension evaluated by the source condition.")
|
|
251
|
-
@encodedName("application/json", "condition_usage_dimension")
|
|
252
|
-
conditionUsageDimension: string;
|
|
253
|
-
|
|
254
|
-
@doc("Exclusive minimum quantity declared by the source condition.")
|
|
255
|
-
@encodedName("application/json", "exclusive_minimum_quantity")
|
|
256
|
-
@minValue(0)
|
|
257
|
-
exclusiveMinimumQuantity: float64;
|
|
258
|
-
|
|
259
|
-
@doc("Observed per-call quantity compared with the exclusive minimum.")
|
|
260
|
-
@encodedName("application/json", "observed_per_call_quantity")
|
|
261
|
-
@minValue(0)
|
|
262
|
-
observedPerCallQuantity: float64;
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
@doc("Fields shared by every included token or request pricing component.")
|
|
266
|
-
model ModelCatalogTokenEstimateComponentBase {
|
|
267
|
-
@doc("Source-defined pricing component, such as prompt, completion, request, cache read, cache write, or internal reasoning.")
|
|
268
|
-
component: string;
|
|
269
|
-
|
|
270
|
-
@doc("Qyl-observed usage dimension to which this rate was applied, such as input_tokens or output_tokens.")
|
|
271
|
-
@encodedName("application/json", "usage_dimension")
|
|
272
|
-
usageDimension: string;
|
|
273
|
-
|
|
274
|
-
@doc("Source-declared unit represented by the rate.")
|
|
275
|
-
unit: string;
|
|
276
|
-
|
|
277
|
-
@doc("Source-specific billing mode retained from the catalog or deterministically derived from the provider-defined meter.")
|
|
278
|
-
@encodedName("application/json", "source_billing_mode")
|
|
279
|
-
sourceBillingMode: string;
|
|
280
|
-
|
|
281
|
-
@encodedName("application/json", "billing_mode")
|
|
282
|
-
billingMode: ModelCatalogBillingMode;
|
|
283
|
-
|
|
284
|
-
@doc("Measured quantity to which the catalog unit price was applied.")
|
|
285
|
-
@minValue(0)
|
|
286
|
-
quantity: float64;
|
|
287
|
-
|
|
288
|
-
@doc("Catalog price in USD per source-defined unit.")
|
|
289
|
-
@encodedName("application/json", "unit_price_usd")
|
|
290
|
-
unitPriceUsd: CostUsd;
|
|
291
|
-
|
|
292
|
-
@doc("Estimated USD contribution of this component for the reported cluster period.")
|
|
293
|
-
@encodedName("application/json", "estimated_cost_usd")
|
|
294
|
-
estimatedCostUsd: CostUsd;
|
|
295
|
-
}
|
|
296
|
-
|
|
297
|
-
model ModelCatalogTokenBaseRateComponent extends ModelCatalogTokenEstimateComponentBase {
|
|
298
|
-
@encodedName("application/json", "rate_relation")
|
|
299
|
-
rateRelation: "base_rate";
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
model ModelCatalogTokenAdditiveSurchargeComponent extends ModelCatalogTokenEstimateComponentBase {
|
|
303
|
-
@encodedName("application/json", "rate_relation")
|
|
304
|
-
rateRelation: "additive_surcharge";
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
model ModelCatalogTokenInclusiveReplacementRateComponent extends ModelCatalogTokenEstimateComponentBase {
|
|
308
|
-
@encodedName("application/json", "rate_relation")
|
|
309
|
-
rateRelation: "replaces_inclusive_base_rate";
|
|
310
|
-
|
|
311
|
-
@doc("Inclusive base usage dimension replaced by this subtype rate.")
|
|
312
|
-
@encodedName("application/json", "replaces_usage_dimension")
|
|
313
|
-
replacesUsageDimension: string;
|
|
314
|
-
|
|
315
|
-
@doc("Ordered override evidence when the source conditionally altered this subtype rate.")
|
|
316
|
-
@encodedName("application/json", "conditional_evidence")
|
|
317
|
-
conditionalEvidence?: ModelCatalogConditionalRateEvidence;
|
|
318
|
-
}
|
|
319
|
-
|
|
320
|
-
model ModelCatalogTokenConditionalOverrideRateComponent extends ModelCatalogTokenEstimateComponentBase {
|
|
321
|
-
@encodedName("application/json", "rate_relation")
|
|
322
|
-
rateRelation: "replaces_published_rate";
|
|
323
|
-
|
|
324
|
-
@doc("Published usage dimension whose prior base, surcharge, or subtype rate was replaced.")
|
|
325
|
-
@encodedName("application/json", "replaces_usage_dimension")
|
|
326
|
-
replacesUsageDimension: string;
|
|
327
|
-
|
|
328
|
-
@encodedName("application/json", "conditional_evidence")
|
|
329
|
-
conditionalEvidence: ModelCatalogConditionalRateEvidence;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
@doc("One evidenced token or request component contributing to a current-catalog estimate. The rate_relation literal selects the required evidence shape.")
|
|
333
|
-
@oneOf
|
|
334
|
-
union ModelCatalogTokenEstimateComponent {
|
|
335
|
-
baseRate: ModelCatalogTokenBaseRateComponent,
|
|
336
|
-
additiveSurcharge: ModelCatalogTokenAdditiveSurchargeComponent,
|
|
337
|
-
inclusiveReplacementRate: ModelCatalogTokenInclusiveReplacementRateComponent,
|
|
338
|
-
conditionalOverrideRate: ModelCatalogTokenConditionalOverrideRateComponent,
|
|
339
|
-
}
|
|
340
|
-
|
|
341
|
-
@doc("Why a catalog meter or conditional adjustment was not included in a token-and-request estimate.")
|
|
342
|
-
enum ModelCatalogTokenExclusionReason {
|
|
343
|
-
@doc("The optional usage subtype was not observed; inclusive base input or output tokens remain priced.")
|
|
344
|
-
usageNotObserved: "usage_not_observed",
|
|
345
|
-
|
|
346
|
-
@doc("A conditional adjustment was not applied because its activation condition was not proven.")
|
|
347
|
-
conditionalAdjustmentNotApplied: "conditional_adjustment_not_applied",
|
|
348
|
-
|
|
349
|
-
@doc("The adjustment matched, but a later matching source override replaced it for the same meter.")
|
|
350
|
-
supersededByLaterOverride: "superseded_by_later_override",
|
|
351
|
-
|
|
352
|
-
@doc("The meter is outside the token-and-request estimate boundary and telemetry did not prove that it applied.")
|
|
353
|
-
outsideTokenEstimateScope: "outside_token_estimate_scope",
|
|
354
|
-
|
|
355
|
-
@doc("Telemetry proved the meter applied, but qyl does not support its usage dimension.")
|
|
356
|
-
unsupportedUsageDimension: "unsupported_usage_dimension",
|
|
357
|
-
|
|
358
|
-
@doc("Telemetry proved the meter applied, but qyl does not support its billing mode.")
|
|
359
|
-
unsupportedBillingMode: "unsupported_billing_mode",
|
|
360
|
-
}
|
|
361
|
-
|
|
362
|
-
model ModelCatalogBaseRateEvidence {
|
|
363
|
-
@encodedName("application/json", "rate_relation")
|
|
364
|
-
rateRelation: "base_rate";
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
model ModelCatalogAdditiveSurchargeEvidence {
|
|
368
|
-
@encodedName("application/json", "rate_relation")
|
|
369
|
-
rateRelation: "additive_surcharge";
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
model ModelCatalogInclusiveReplacementEvidence {
|
|
373
|
-
@encodedName("application/json", "rate_relation")
|
|
374
|
-
rateRelation: "replaces_inclusive_base_rate";
|
|
375
|
-
|
|
376
|
-
@doc("Inclusive base usage dimension replaced by this subtype rate.")
|
|
377
|
-
@encodedName("application/json", "replaces_usage_dimension")
|
|
378
|
-
replacesUsageDimension: string;
|
|
379
|
-
|
|
380
|
-
@doc("Ordered evidence when a source override altered the selected subtype rate.")
|
|
381
|
-
@encodedName("application/json", "conditional_evidence")
|
|
382
|
-
conditionalEvidence?: ModelCatalogConditionalRateEvidence;
|
|
383
|
-
}
|
|
384
|
-
|
|
385
|
-
model ModelCatalogPublishedReplacementEvidence {
|
|
386
|
-
@encodedName("application/json", "rate_relation")
|
|
387
|
-
rateRelation: "replaces_published_rate";
|
|
388
|
-
|
|
389
|
-
@doc("Published usage dimension whose prior base, surcharge, or subtype rate was replaced.")
|
|
390
|
-
@encodedName("application/json", "replaces_usage_dimension")
|
|
391
|
-
replacesUsageDimension: string;
|
|
392
|
-
|
|
393
|
-
@encodedName("application/json", "conditional_evidence")
|
|
394
|
-
conditionalEvidence: ModelCatalogConditionalRateEvidence;
|
|
395
|
-
}
|
|
396
|
-
|
|
397
|
-
@doc("Relation-specific evidence for a catalog rate omitted from a token-and-request estimate. The rate_relation literal selects the required target and ordered evidence shape.")
|
|
398
|
-
@oneOf
|
|
399
|
-
union ModelCatalogExclusionRateEvidence {
|
|
400
|
-
baseRate: ModelCatalogBaseRateEvidence,
|
|
401
|
-
additiveSurcharge: ModelCatalogAdditiveSurchargeEvidence,
|
|
402
|
-
inclusiveReplacement: ModelCatalogInclusiveReplacementEvidence,
|
|
403
|
-
publishedReplacement: ModelCatalogPublishedReplacementEvidence,
|
|
404
|
-
}
|
|
405
|
-
|
|
406
|
-
@doc("Fields shared by every catalog meter or conditional adjustment excluded from a token-and-request estimate.")
|
|
407
|
-
model ModelCatalogTokenEstimateExclusionBase {
|
|
408
|
-
component: string;
|
|
409
|
-
|
|
410
|
-
@encodedName("application/json", "usage_dimension")
|
|
411
|
-
usageDimension: string;
|
|
412
|
-
|
|
413
|
-
unit: string;
|
|
414
|
-
|
|
415
|
-
@doc("Source-specific billing mode retained from the catalog or deterministically derived from the provider-defined meter, including unsupported modes.")
|
|
416
|
-
@encodedName("application/json", "source_billing_mode")
|
|
417
|
-
sourceBillingMode: string;
|
|
418
|
-
|
|
419
|
-
@doc("Relation, replacement target, and ordered override evidence for the omitted rate.")
|
|
420
|
-
@encodedName("application/json", "rate_evidence")
|
|
421
|
-
rateEvidence: ModelCatalogExclusionRateEvidence;
|
|
422
|
-
|
|
423
|
-
@doc("Catalog rate omitted from the estimate, when the source supplied one.")
|
|
424
|
-
@encodedName("application/json", "unit_price_usd")
|
|
425
|
-
unitPriceUsd?: CostUsd;
|
|
426
|
-
}
|
|
427
|
-
|
|
428
|
-
model ModelCatalogSupportedBillingExclusionBase extends ModelCatalogTokenEstimateExclusionBase {
|
|
429
|
-
@encodedName("application/json", "billing_mode")
|
|
430
|
-
billingMode: ModelCatalogBillingMode;
|
|
431
|
-
}
|
|
432
|
-
|
|
433
|
-
model ModelCatalogOptionallyNormalizedBillingExclusionBase extends ModelCatalogTokenEstimateExclusionBase {
|
|
434
|
-
@doc("Normalized billing mode when qyl recognizes the source meter; absent when the source meter has no supported normalization.")
|
|
435
|
-
@encodedName("application/json", "billing_mode")
|
|
436
|
-
billingMode?: ModelCatalogBillingMode;
|
|
437
|
-
}
|
|
438
|
-
|
|
439
|
-
model ModelCatalogUsageNotObservedExclusion extends ModelCatalogSupportedBillingExclusionBase {
|
|
440
|
-
reason: "usage_not_observed";
|
|
441
|
-
}
|
|
442
|
-
|
|
443
|
-
model ModelCatalogOutsideTokenScopeExclusion extends ModelCatalogOptionallyNormalizedBillingExclusionBase {
|
|
444
|
-
reason: "outside_token_estimate_scope";
|
|
445
|
-
}
|
|
446
|
-
|
|
447
|
-
model ModelCatalogUnsupportedUsageExclusion extends ModelCatalogOptionallyNormalizedBillingExclusionBase {
|
|
448
|
-
reason: "unsupported_usage_dimension";
|
|
449
|
-
}
|
|
450
|
-
|
|
451
|
-
model ModelCatalogUnsupportedBillingExclusion extends ModelCatalogTokenEstimateExclusionBase {
|
|
452
|
-
@doc("Normalized billing mode when the source mode has a partial known mapping; absent when no supported normalization exists.")
|
|
453
|
-
@encodedName("application/json", "billing_mode")
|
|
454
|
-
billingMode?: ModelCatalogBillingMode;
|
|
455
|
-
|
|
456
|
-
reason: "unsupported_billing_mode";
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
model ModelCatalogConditionalExclusionBase {
|
|
460
|
-
component: string;
|
|
461
|
-
|
|
462
|
-
@encodedName("application/json", "usage_dimension")
|
|
463
|
-
usageDimension: string;
|
|
464
|
-
|
|
465
|
-
unit: string;
|
|
466
|
-
|
|
467
|
-
@doc("Source-specific billing mode retained from the catalog or deterministically derived from the provider-defined meter.")
|
|
468
|
-
@encodedName("application/json", "source_billing_mode")
|
|
469
|
-
sourceBillingMode: string;
|
|
470
|
-
|
|
471
|
-
@doc("Normalized billing mode when qyl recognizes the conditional source meter; absent when the source meter has no supported normalization.")
|
|
472
|
-
@encodedName("application/json", "billing_mode")
|
|
473
|
-
billingMode?: ModelCatalogBillingMode;
|
|
474
|
-
|
|
475
|
-
@doc("The ordered source override that was not applied or was superseded.")
|
|
476
|
-
@encodedName("application/json", "rate_evidence")
|
|
477
|
-
rateEvidence: ModelCatalogPublishedReplacementEvidence;
|
|
478
|
-
|
|
479
|
-
@doc("Catalog rate omitted from the estimate, when the source supplied one.")
|
|
480
|
-
@encodedName("application/json", "unit_price_usd")
|
|
481
|
-
unitPriceUsd?: CostUsd;
|
|
482
|
-
}
|
|
483
|
-
|
|
484
|
-
model ModelCatalogConditionalAdjustmentNotAppliedExclusion extends ModelCatalogConditionalExclusionBase {
|
|
485
|
-
reason: "conditional_adjustment_not_applied";
|
|
486
|
-
}
|
|
487
|
-
|
|
488
|
-
model ModelCatalogSupersededOverrideExclusion extends ModelCatalogConditionalExclusionBase {
|
|
489
|
-
reason: "superseded_by_later_override";
|
|
490
|
-
}
|
|
491
|
-
|
|
492
|
-
@doc("Auditable catalog meter or conditional adjustment excluded from a token-and-request estimate. The reason literal selects the required evidence shape.")
|
|
493
|
-
@oneOf
|
|
494
|
-
union ModelCatalogTokenEstimateExclusion {
|
|
495
|
-
usageNotObserved: ModelCatalogUsageNotObservedExclusion,
|
|
496
|
-
conditionalAdjustmentNotApplied: ModelCatalogConditionalAdjustmentNotAppliedExclusion,
|
|
497
|
-
supersededByLaterOverride: ModelCatalogSupersededOverrideExclusion,
|
|
498
|
-
outsideTokenEstimateScope: ModelCatalogOutsideTokenScopeExclusion,
|
|
499
|
-
unsupportedUsageDimension: ModelCatalogUnsupportedUsageExclusion,
|
|
500
|
-
unsupportedBillingMode: ModelCatalogUnsupportedBillingExclusion,
|
|
501
|
-
}
|
|
502
|
-
|
|
503
|
-
@doc("Calculated all-or-nothing current-catalog token and request estimate for a complete workflow cluster.")
|
|
504
|
-
model GenAiEtlCatalogTokenCalculatedEstimate {
|
|
505
|
-
status: "calculated";
|
|
506
|
-
|
|
507
|
-
@doc("Estimated token and request cost for the reported cluster period using the current catalog snapshot; this is counterfactual for historical periods and is not an official billed total.")
|
|
508
|
-
@encodedName("application/json", "estimated_catalog_token_cost_usd")
|
|
509
|
-
estimatedCatalogTokenCostUsd: CostUsd;
|
|
510
|
-
|
|
511
|
-
@doc("Estimated token and request cost per observed cluster call; this is not an official billed total.")
|
|
512
|
-
@encodedName("application/json", "estimated_catalog_token_cost_per_call_usd")
|
|
513
|
-
estimatedCatalogTokenCostPerCallUsd: CostUsd;
|
|
514
|
-
|
|
515
|
-
@doc("Exact catalog snapshot and model-match evidence.")
|
|
516
|
-
provenance: ModelCatalogPriceProvenance;
|
|
517
|
-
|
|
518
|
-
@doc("Included token or request usage and rate contributions. Ordered source overrides carry conditional evidence; ordinary inclusive subtype replacements do not require it.")
|
|
519
|
-
@minItems(1)
|
|
520
|
-
components: ModelCatalogTokenEstimateComponent[];
|
|
521
|
-
|
|
522
|
-
@doc("Meters or conditional adjustments explicitly omitted from this calculated estimate.")
|
|
523
|
-
@minItems(1)
|
|
524
|
-
exclusions?: ModelCatalogTokenEstimateExclusion[];
|
|
525
|
-
}
|
|
526
|
-
|
|
527
|
-
model GenAiEtlCatalogTokenEstimateFailureBase {
|
|
528
|
-
@doc("Available meter or conditional evidence explaining why the cluster estimate failed closed.")
|
|
529
|
-
@minItems(1)
|
|
530
|
-
exclusions?: ModelCatalogTokenEstimateExclusion[];
|
|
531
|
-
}
|
|
532
|
-
|
|
533
|
-
model GenAiEtlCatalogTokenSourceUnavailableEstimate extends GenAiEtlCatalogTokenEstimateFailureBase {
|
|
534
|
-
status: "source_unavailable";
|
|
535
|
-
}
|
|
536
|
-
|
|
537
|
-
model GenAiEtlCatalogTokenStaleSourceEstimate extends GenAiEtlCatalogTokenEstimateFailureBase {
|
|
538
|
-
status: "stale_source";
|
|
539
|
-
}
|
|
540
|
-
|
|
541
|
-
model GenAiEtlCatalogTokenMissingModelIdentityEstimate extends GenAiEtlCatalogTokenEstimateFailureBase {
|
|
542
|
-
status: "missing_model_identity";
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
model GenAiEtlCatalogTokenModelNotFoundEstimate extends GenAiEtlCatalogTokenEstimateFailureBase {
|
|
546
|
-
status: "model_not_found";
|
|
547
|
-
}
|
|
548
|
-
|
|
549
|
-
model GenAiEtlCatalogTokenAmbiguousModelEstimate extends GenAiEtlCatalogTokenEstimateFailureBase {
|
|
550
|
-
status: "ambiguous_model";
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
model GenAiEtlCatalogTokenIncompleteUsageEstimate extends GenAiEtlCatalogTokenEstimateFailureBase {
|
|
554
|
-
status: "incomplete_usage";
|
|
555
|
-
}
|
|
556
|
-
|
|
557
|
-
model GenAiEtlCatalogTokenConditionalPricingUnresolvableEstimate extends GenAiEtlCatalogTokenEstimateFailureBase {
|
|
558
|
-
status: "conditional_pricing_unresolvable";
|
|
559
|
-
}
|
|
560
|
-
|
|
561
|
-
model GenAiEtlCatalogTokenUnsupportedPricingEstimate extends GenAiEtlCatalogTokenEstimateFailureBase {
|
|
562
|
-
status: "unsupported_pricing";
|
|
563
|
-
}
|
|
564
|
-
|
|
565
|
-
@doc("All-or-nothing current-catalog token and request estimate. The status literal selects the complete calculated or fail-closed response shape.")
|
|
566
|
-
@oneOf
|
|
567
|
-
union GenAiEtlCatalogTokenCostEstimate {
|
|
568
|
-
calculated: GenAiEtlCatalogTokenCalculatedEstimate,
|
|
569
|
-
sourceUnavailable: GenAiEtlCatalogTokenSourceUnavailableEstimate,
|
|
570
|
-
staleSource: GenAiEtlCatalogTokenStaleSourceEstimate,
|
|
571
|
-
missingModelIdentity: GenAiEtlCatalogTokenMissingModelIdentityEstimate,
|
|
572
|
-
modelNotFound: GenAiEtlCatalogTokenModelNotFoundEstimate,
|
|
573
|
-
ambiguousModel: GenAiEtlCatalogTokenAmbiguousModelEstimate,
|
|
574
|
-
incompleteUsage: GenAiEtlCatalogTokenIncompleteUsageEstimate,
|
|
575
|
-
conditionalPricingUnresolvable: GenAiEtlCatalogTokenConditionalPricingUnresolvableEstimate,
|
|
576
|
-
unsupportedPricing: GenAiEtlCatalogTokenUnsupportedPricingEstimate,
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
@doc("Task family inferred for a repeated GenAI workflow cluster.")
|
|
580
|
-
enum GenAiEtlTaskFamily {
|
|
581
|
-
openReasoningGeneration: "open_reasoning_generation",
|
|
582
|
-
classification: "classification",
|
|
583
|
-
sequenceLabeling: "sequence_labeling",
|
|
584
|
-
structuredExtraction: "structured_extraction",
|
|
585
|
-
retrievalEntityResolution: "retrieval_entity_resolution",
|
|
586
|
-
similarityClustering: "similarity_clustering",
|
|
587
|
-
normalizationTransformation: "normalization_transformation",
|
|
588
|
-
numericAnalytical: "numeric_analytical",
|
|
589
|
-
`unknown`: "unknown",
|
|
590
|
-
}
|
|
591
|
-
|
|
592
|
-
@doc("Machine-readable output contract inferred for a workflow cluster.")
|
|
593
|
-
enum GenAiEtlOutputContract {
|
|
594
|
-
prose: "prose",
|
|
595
|
-
label: "label",
|
|
596
|
-
spanList: "span_list",
|
|
597
|
-
record: "record",
|
|
598
|
-
vector: "vector",
|
|
599
|
-
catalogReference: "catalog_reference",
|
|
600
|
-
number: "number",
|
|
601
|
-
boolean: "boolean",
|
|
602
|
-
`unknown`: "unknown",
|
|
603
|
-
}
|
|
604
|
-
|
|
605
|
-
@doc("Lowest-risk implementation class suggested by currently available evidence.")
|
|
606
|
-
enum GenAiEtlCandidatePath {
|
|
607
|
-
exactCache: "exact_cache",
|
|
608
|
-
deterministicCode: "deterministic_code",
|
|
609
|
-
boundedRetrieval: "bounded_retrieval",
|
|
610
|
-
smallClassifierExtractor: "small_classifier_extractor",
|
|
611
|
-
smallerGenerativeModel: "smaller_generative_model",
|
|
612
|
-
frontierModel: "frontier_model",
|
|
613
|
-
insufficientEvidence: "insufficient_evidence",
|
|
614
|
-
}
|
|
615
|
-
|
|
616
|
-
@doc("Evidence status of the proposed replacement path.")
|
|
617
|
-
enum GenAiEtlCandidateStatus {
|
|
618
|
-
@doc("The path is a heuristic hypothesis that still requires the declared validation metrics and promotion gates.")
|
|
619
|
-
hypothesisOnly: "hypothesis_only",
|
|
620
|
-
|
|
621
|
-
@doc("Available evidence is insufficient to propose a replacement path.")
|
|
622
|
-
insufficientEvidence: "insufficient_evidence",
|
|
623
|
-
}
|
|
624
|
-
|
|
625
|
-
@doc("Task-specific metrics that can falsify a proposed replacement.")
|
|
626
|
-
enum GenAiEtlValidationMetric {
|
|
627
|
-
accuracy: "accuracy",
|
|
628
|
-
macroF1: "macro_f1",
|
|
629
|
-
calibrationError: "calibration_error",
|
|
630
|
-
spanPrecision: "span_precision",
|
|
631
|
-
spanRecall: "span_recall",
|
|
632
|
-
spanF1: "span_f1",
|
|
633
|
-
fieldExactMatch: "field_exact_match",
|
|
634
|
-
schemaValidity: "schema_validity",
|
|
635
|
-
matchAccuracy: "match_accuracy",
|
|
636
|
-
recallAtK: "recall_at_k",
|
|
637
|
-
meanReciprocalRank: "mean_reciprocal_rank",
|
|
638
|
-
exactMatch: "exact_match",
|
|
639
|
-
numericTolerance: "numeric_tolerance",
|
|
640
|
-
humanPreference: "human_preference",
|
|
641
|
-
taskSuccess: "task_success",
|
|
642
|
-
unavailable: "unavailable",
|
|
643
|
-
}
|
|
644
|
-
|
|
645
|
-
@doc("Fallback used for requests outside a promoted replacement's safe coverage.")
|
|
646
|
-
enum GenAiEtlResidualPath {
|
|
647
|
-
frontierModel: "frontier_model",
|
|
648
|
-
humanReview: "human_review",
|
|
649
|
-
retry: "retry",
|
|
650
|
-
degradedResponse: "degraded_response",
|
|
651
|
-
none: "none",
|
|
652
|
-
undetermined: "undetermined",
|
|
653
|
-
}
|
|
654
|
-
|
|
655
|
-
@doc("Observable evidence needed to promote an inferred replacement safely.")
|
|
656
|
-
enum GenAiEtlEvidenceSignal {
|
|
657
|
-
workflowIdentity: "workflow_identity",
|
|
658
|
-
outputContract: "output_contract",
|
|
659
|
-
providerModel: "provider_model",
|
|
660
|
-
tokenUsage: "token_usage",
|
|
661
|
-
@doc("A complete current-catalog token-and-request estimate with exact model and snapshot provenance.")
|
|
662
|
-
catalogTokenEstimate: "catalog_token_estimate",
|
|
663
|
-
recurringSchema: "recurring_schema",
|
|
664
|
-
boundedReference: "bounded_reference",
|
|
665
|
-
taskMetric: "task_metric",
|
|
666
|
-
acceptedOutputReplay: "accepted_output_replay",
|
|
667
|
-
downstreamFate: "downstream_fate",
|
|
668
|
-
calibratedConfidence: "calibrated_confidence",
|
|
669
|
-
shadowComparison: "shadow_comparison",
|
|
670
|
-
fallbackPolicy: "fallback_policy",
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
@doc("Promotion gate from replay through limited serving and rollback.")
|
|
674
|
-
enum GenAiEtlPromotionGateKind {
|
|
675
|
-
contractStability: "contract_stability",
|
|
676
|
-
offlineReplay: "offline_replay",
|
|
677
|
-
calibratedConfidence: "calibrated_confidence",
|
|
678
|
-
shadowTraffic: "shadow_traffic",
|
|
679
|
-
limitedServing: "limited_serving",
|
|
680
|
-
rollbackResidualPolicy: "rollback_residual_policy",
|
|
681
|
-
}
|
|
682
|
-
|
|
683
|
-
@doc("Evaluation state of a promotion gate.")
|
|
684
|
-
enum GenAiEtlPromotionGateState {
|
|
685
|
-
passed: "passed",
|
|
686
|
-
failed: "failed",
|
|
687
|
-
notEvaluated: "not_evaluated",
|
|
688
|
-
blockedMissingEvidence: "blocked_missing_evidence",
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
@doc("Promotion readiness for one gate.")
|
|
692
|
-
model GenAiEtlPromotionGate {
|
|
693
|
-
gate: GenAiEtlPromotionGateKind;
|
|
694
|
-
state: GenAiEtlPromotionGateState;
|
|
695
|
-
|
|
696
|
-
@doc("Stable evidence code explaining the current gate state.")
|
|
697
|
-
reason?: string;
|
|
698
|
-
}
|
|
699
|
-
|
|
700
|
-
@doc("Observed economics and evidence for one repeated GenAI workflow cluster.")
|
|
701
|
-
model GenAiEtlAuditCluster {
|
|
702
|
-
@doc("Stable identifier derived from the privacy-safe cluster dimensions.")
|
|
703
|
-
@encodedName("application/json", "cluster_id")
|
|
704
|
-
clusterId: string;
|
|
705
|
-
|
|
706
|
-
@doc("Privacy-safe derived grouping identity used to group repeated calls.")
|
|
707
|
-
@encodedName("application/json", "workflow_key")
|
|
708
|
-
workflowKey: string;
|
|
709
|
-
|
|
710
|
-
@encodedName("application/json", "service_name")
|
|
711
|
-
serviceName: string;
|
|
712
|
-
|
|
713
|
-
@doc("Present only when an upstream source proves or canonicalizes a low-cardinality, privacy-safe span name.")
|
|
714
|
-
@encodedName("application/json", "span_name")
|
|
715
|
-
spanName?: string;
|
|
716
|
-
|
|
717
|
-
@encodedName("application/json", "operation_name")
|
|
718
|
-
operationName?: string;
|
|
719
|
-
|
|
720
|
-
provider?: string;
|
|
721
|
-
|
|
722
|
-
@encodedName("application/json", "model")
|
|
723
|
-
modelName?: string;
|
|
724
|
-
|
|
725
|
-
@encodedName("application/json", "output_contract")
|
|
726
|
-
outputContract: GenAiEtlOutputContract;
|
|
727
|
-
|
|
728
|
-
@encodedName("application/json", "task_family")
|
|
729
|
-
taskFamily: GenAiEtlTaskFamily;
|
|
730
|
-
|
|
731
|
-
@encodedName("application/json", "call_count")
|
|
732
|
-
callCount: Count;
|
|
733
|
-
|
|
734
|
-
@encodedName("application/json", "input_tokens")
|
|
735
|
-
inputTokens: TokenCount;
|
|
736
|
-
|
|
737
|
-
@encodedName("application/json", "output_tokens")
|
|
738
|
-
outputTokens: TokenCount;
|
|
739
|
-
|
|
740
|
-
@encodedName("application/json", "cache_read_input_tokens")
|
|
741
|
-
cacheReadInputTokens: TokenCount;
|
|
742
|
-
|
|
743
|
-
@encodedName("application/json", "cache_creation_input_tokens")
|
|
744
|
-
cacheCreationInputTokens: TokenCount;
|
|
745
|
-
|
|
746
|
-
@encodedName("application/json", "reasoning_output_tokens")
|
|
747
|
-
reasoningOutputTokens: TokenCount;
|
|
748
|
-
|
|
749
|
-
@encodedName("application/json", "error_count")
|
|
750
|
-
errorCount: Count;
|
|
751
|
-
|
|
752
|
-
@encodedName("application/json", "error_rate")
|
|
753
|
-
errorRate: Ratio;
|
|
754
|
-
|
|
755
|
-
@encodedName("application/json", "average_latency_ms")
|
|
756
|
-
averageLatencyMs: DurationMs;
|
|
757
|
-
|
|
758
|
-
@encodedName("application/json", "p95_latency_ms")
|
|
759
|
-
p95LatencyMs: DurationMs;
|
|
760
|
-
|
|
761
|
-
@doc("Outcome and, when calculated, detailed current-catalog token-and-request estimate for this cluster. Aggregate provider billing is never attributed to a cluster.")
|
|
762
|
-
@encodedName("application/json", "catalog_token_estimate")
|
|
763
|
-
catalogTokenEstimate: GenAiEtlCatalogTokenCostEstimate;
|
|
764
|
-
|
|
765
|
-
@doc("Fraction of calls with a task-specific correctness signal.")
|
|
766
|
-
@encodedName("application/json", "measurable_coverage")
|
|
767
|
-
measurableCoverage?: Ratio;
|
|
768
|
-
|
|
769
|
-
@doc("Fraction of calls proven safe to route to a residual path.")
|
|
770
|
-
@encodedName("application/json", "safe_deferral_coverage")
|
|
771
|
-
safeDeferralCoverage?: Ratio;
|
|
772
|
-
|
|
773
|
-
@doc("Evidence status qualifying the proposed candidate path.")
|
|
774
|
-
@encodedName("application/json", "candidate_status")
|
|
775
|
-
candidateStatus: GenAiEtlCandidateStatus;
|
|
776
|
-
|
|
777
|
-
@encodedName("application/json", "candidate_path")
|
|
778
|
-
candidatePath: GenAiEtlCandidatePath;
|
|
779
|
-
|
|
780
|
-
@doc("Task-specific metrics required to falsify the proposed replacement.")
|
|
781
|
-
@encodedName("application/json", "validation_metrics")
|
|
782
|
-
@minItems(1)
|
|
783
|
-
validationMetrics: GenAiEtlValidationMetric[];
|
|
784
|
-
|
|
785
|
-
@encodedName("application/json", "residual_path")
|
|
786
|
-
residualPath: GenAiEtlResidualPath;
|
|
787
|
-
|
|
788
|
-
@encodedName("application/json", "evidence_signals")
|
|
789
|
-
evidenceSignals: GenAiEtlEvidenceSignal[];
|
|
790
|
-
|
|
791
|
-
@encodedName("application/json", "missing_evidence")
|
|
792
|
-
missingEvidence: GenAiEtlEvidenceSignal[];
|
|
793
|
-
|
|
794
|
-
@encodedName("application/json", "promotion_gates")
|
|
795
|
-
promotionGates: GenAiEtlPromotionGate[];
|
|
796
|
-
}
|
|
797
|
-
|
|
798
|
-
@doc("Aggregate trace-level economics for the requested audit period.")
|
|
799
|
-
model GenAiEtlAuditSummary {
|
|
800
|
-
@encodedName("application/json", "total_calls")
|
|
801
|
-
totalCalls: Count;
|
|
802
|
-
|
|
803
|
-
@encodedName("application/json", "total_input_tokens")
|
|
804
|
-
totalInputTokens: TokenCount;
|
|
805
|
-
|
|
806
|
-
@encodedName("application/json", "total_output_tokens")
|
|
807
|
-
totalOutputTokens: TokenCount;
|
|
808
|
-
|
|
809
|
-
@doc("Counterfactual token and request cost of the full observed audit population before the cluster response limit is applied, using the current live catalog snapshot; this is not an official billed total or a historical price claim.")
|
|
810
|
-
@encodedName("application/json", "estimated_catalog_token_cost_usd")
|
|
811
|
-
estimatedCatalogTokenCostUsd?: CostUsd;
|
|
812
|
-
|
|
813
|
-
@doc("Fraction of observed calls covered by all-or-nothing calculated token-and-request estimates; missing pricing is not treated as zero.")
|
|
814
|
-
@encodedName("application/json", "catalog_token_priced_call_coverage")
|
|
815
|
-
catalogTokenPricedCallCoverage: Ratio;
|
|
816
|
-
|
|
817
|
-
@doc("Returned top-cluster token-and-request estimate divided by estimated_catalog_token_cost_usd for the full observed audit population.")
|
|
818
|
-
@encodedName("application/json", "estimated_token_economic_concentration")
|
|
819
|
-
estimatedTokenEconomicConcentration?: Ratio;
|
|
820
|
-
|
|
821
|
-
@doc("Fraction of calls with a task-specific correctness signal.")
|
|
822
|
-
@encodedName("application/json", "measurable_coverage")
|
|
823
|
-
measurableCoverage?: Ratio;
|
|
824
|
-
|
|
825
|
-
@doc("Fraction of calls proven safe to defer to a residual path.")
|
|
826
|
-
@encodedName("application/json", "safe_deferral_coverage")
|
|
827
|
-
safeDeferralCoverage?: Ratio;
|
|
828
|
-
|
|
829
|
-
@doc("Fraction of estimated current-catalog token-and-request spend attached to ETL-shaped candidates.")
|
|
830
|
-
@encodedName("application/json", "candidate_etl_estimated_token_spend_share")
|
|
831
|
-
candidateEtlEstimatedTokenSpendShare?: Ratio;
|
|
832
|
-
}
|
|
833
|
-
|
|
834
|
-
@doc("Trace-level ETL audit for a bounded period.")
|
|
835
|
-
model GenAiEtlAuditReport {
|
|
836
|
-
@encodedName("application/json", "generated_at")
|
|
837
|
-
generatedAt: utcDateTime;
|
|
838
|
-
|
|
839
|
-
@encodedName("application/json", "period_start")
|
|
840
|
-
periodStart: utcDateTime;
|
|
841
|
-
|
|
842
|
-
@encodedName("application/json", "period_end")
|
|
843
|
-
periodEnd: utcDateTime;
|
|
844
|
-
|
|
845
|
-
summary: GenAiEtlAuditSummary;
|
|
846
|
-
|
|
847
|
-
@doc("Provider-owned aggregate billing sources. These totals are not attributed to clusters or used as evaluation baselines.")
|
|
848
|
-
@encodedName("application/json", "billing_sources")
|
|
849
|
-
billingSources: ProviderBillingSource[];
|
|
850
|
-
|
|
851
|
-
@doc("Configured live model catalog sources and their current synchronization state.")
|
|
852
|
-
@encodedName("application/json", "catalog_sources")
|
|
853
|
-
catalogSources: ModelCatalogSource[];
|
|
854
|
-
|
|
855
|
-
clusters: GenAiEtlAuditCluster[];
|
|
856
|
-
}
|
|
857
|
-
|
|
858
|
-
@doc("What-if assumptions for one workflow cluster over the requested period.")
|
|
859
|
-
model GenAiEtlClusterScenario {
|
|
860
|
-
@encodedName("application/json", "cluster_id")
|
|
861
|
-
clusterId: string;
|
|
862
|
-
|
|
863
|
-
@doc("Fraction of cluster calls the replacement is expected to serve safely.")
|
|
864
|
-
coverage: Ratio;
|
|
865
|
-
|
|
866
|
-
@doc("Explicit scenario baseline cost per call. It wins over a calculated catalog estimate; when both are absent, evaluation fails closed.")
|
|
867
|
-
@encodedName("application/json", "frontier_cost_per_call_usd")
|
|
868
|
-
frontierCostPerCallUsd?: CostUsd;
|
|
869
|
-
|
|
870
|
-
@encodedName("application/json", "alternative_cost_per_call_usd")
|
|
871
|
-
alternativeCostPerCallUsd: CostUsd;
|
|
872
|
-
|
|
873
|
-
@encodedName("application/json", "period_maintenance_cost_usd")
|
|
874
|
-
periodMaintenanceCostUsd: CostUsd;
|
|
875
|
-
|
|
876
|
-
@encodedName("application/json", "period_error_cost_usd")
|
|
877
|
-
periodErrorCostUsd: CostUsd;
|
|
878
|
-
}
|
|
879
|
-
|
|
880
|
-
@doc("Batch of cluster scenarios evaluated against one audit period.")
|
|
881
|
-
model GenAiEtlAuditEvaluationRequest {
|
|
882
|
-
@minItems(1)
|
|
883
|
-
@maxItems(100)
|
|
884
|
-
scenarios: GenAiEtlClusterScenario[];
|
|
885
|
-
}
|
|
886
|
-
|
|
887
|
-
@doc("Evidence basis for the frontier cost used in a replacement-value calculation.")
|
|
888
|
-
enum GenAiEtlFrontierCostBasis {
|
|
889
|
-
@doc("The request supplied an explicit what-if scenario cost, which takes precedence over a catalog estimate.")
|
|
890
|
-
scenario: "scenario",
|
|
891
|
-
|
|
892
|
-
@doc("A token-and-request live model catalog estimate was used; this is not an official billed total.")
|
|
893
|
-
catalogTokenEstimate: "catalog_token_estimate",
|
|
894
|
-
|
|
895
|
-
@doc("No defensible frontier cost was available.")
|
|
896
|
-
unavailable: "unavailable",
|
|
897
|
-
}
|
|
898
|
-
|
|
899
|
-
model GenAiEtlClusterEvaluationBase {
|
|
900
|
-
@encodedName("application/json", "cluster_id")
|
|
901
|
-
clusterId: string;
|
|
902
|
-
|
|
903
|
-
@encodedName("application/json", "call_count")
|
|
904
|
-
callCount: Count;
|
|
905
|
-
|
|
906
|
-
coverage: Ratio;
|
|
907
|
-
|
|
908
|
-
@encodedName("application/json", "served_call_count")
|
|
909
|
-
servedCallCount: float64;
|
|
910
|
-
|
|
911
|
-
@encodedName("application/json", "residual_call_count")
|
|
912
|
-
residualCallCount: float64;
|
|
913
|
-
|
|
914
|
-
@encodedName("application/json", "alternative_cost_per_call_usd")
|
|
915
|
-
alternativeCostPerCallUsd: CostUsd;
|
|
916
|
-
|
|
917
|
-
@encodedName("application/json", "period_maintenance_cost_usd")
|
|
918
|
-
periodMaintenanceCostUsd: CostUsd;
|
|
919
|
-
|
|
920
|
-
@encodedName("application/json", "period_error_cost_usd")
|
|
921
|
-
periodErrorCostUsd: CostUsd;
|
|
922
|
-
}
|
|
923
|
-
|
|
924
|
-
model GenAiEtlCalculatedClusterEvaluationBase extends GenAiEtlClusterEvaluationBase {
|
|
925
|
-
status: "calculated";
|
|
926
|
-
|
|
927
|
-
@encodedName("application/json", "frontier_cost_per_call_usd")
|
|
928
|
-
frontierCostPerCallUsd: CostUsd;
|
|
929
|
-
|
|
930
|
-
@encodedName("application/json", "current_period_cost_usd")
|
|
931
|
-
currentPeriodCostUsd: CostUsd;
|
|
932
|
-
|
|
933
|
-
@encodedName("application/json", "gross_replaceable_value_usd")
|
|
934
|
-
grossReplaceableValueUsd: float64;
|
|
935
|
-
|
|
936
|
-
@doc("Net period value; this may be negative when maintenance or error cost exceeds gross savings.")
|
|
937
|
-
@encodedName("application/json", "net_replaceable_value_usd")
|
|
938
|
-
netReplaceableValueUsd: float64;
|
|
939
|
-
}
|
|
940
|
-
|
|
941
|
-
model GenAiEtlScenarioClusterEvaluation extends GenAiEtlCalculatedClusterEvaluationBase {
|
|
942
|
-
@encodedName("application/json", "frontier_cost_basis")
|
|
943
|
-
frontierCostBasis: "scenario";
|
|
944
|
-
}
|
|
945
|
-
|
|
946
|
-
model GenAiEtlCatalogTokenClusterEvaluation extends GenAiEtlCalculatedClusterEvaluationBase {
|
|
947
|
-
@encodedName("application/json", "frontier_cost_basis")
|
|
948
|
-
frontierCostBasis: "catalog_token_estimate";
|
|
949
|
-
|
|
950
|
-
@doc("Exact live-catalog snapshot and model-match evidence used for the calculated frontier cost.")
|
|
951
|
-
@encodedName("application/json", "catalog_provenance")
|
|
952
|
-
catalogProvenance: ModelCatalogPriceProvenance;
|
|
953
|
-
}
|
|
954
|
-
|
|
955
|
-
model GenAiEtlUnavailableClusterEvaluation extends GenAiEtlClusterEvaluationBase {
|
|
956
|
-
status: "missing_frontier_cost";
|
|
957
|
-
|
|
958
|
-
@encodedName("application/json", "frontier_cost_basis")
|
|
959
|
-
frontierCostBasis: "unavailable";
|
|
960
|
-
}
|
|
961
|
-
|
|
962
|
-
@doc("Result of replaceable_value = calls * coverage * (frontier - alternative) - maintenance - error. The frontier_cost_basis literal selects a complete calculated result or a fail-closed unavailable result.")
|
|
963
|
-
@oneOf
|
|
964
|
-
union GenAiEtlClusterEvaluation {
|
|
965
|
-
scenario: GenAiEtlScenarioClusterEvaluation,
|
|
966
|
-
catalogTokenEstimate: GenAiEtlCatalogTokenClusterEvaluation,
|
|
967
|
-
unavailable: GenAiEtlUnavailableClusterEvaluation,
|
|
968
|
-
}
|
|
969
|
-
|
|
970
|
-
@doc("Batch result for ETL replacement scenarios.")
|
|
971
|
-
model GenAiEtlAuditEvaluationResponse {
|
|
972
|
-
@encodedName("application/json", "generated_at")
|
|
973
|
-
generatedAt: utcDateTime;
|
|
974
|
-
|
|
975
|
-
@encodedName("application/json", "period_start")
|
|
976
|
-
periodStart: utcDateTime;
|
|
977
|
-
|
|
978
|
-
@encodedName("application/json", "period_end")
|
|
979
|
-
periodEnd: utcDateTime;
|
|
980
|
-
|
|
981
|
-
results: GenAiEtlClusterEvaluation[];
|
|
982
|
-
}
|