@ancplua/qyl-api-schema 0.5.10 → 0.5.11
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 +28 -0
- package/generated/json-schema/qyl-api-schema.json +679 -0
- package/generated/openapi/qyl.openapi.json +1584 -609
- package/generated/ts-runtime/api.d.ts +221 -0
- package/generated/ts-runtime/api.js +104 -0
- package/index.tsp +1 -0
- package/models/cost-etl-audit.tsp +461 -0
- package/package.json +3 -2
|
@@ -289,6 +289,122 @@ export declare const FetchTelemetryViewValues: {
|
|
|
289
289
|
readonly mcpStats: "mcp_stats";
|
|
290
290
|
};
|
|
291
291
|
export type FetchTelemetryView = typeof FetchTelemetryViewValues[keyof typeof FetchTelemetryViewValues];
|
|
292
|
+
export declare const ProviderCostSourceKindValues: {
|
|
293
|
+
readonly actualBilledCost: "actual_billed_cost";
|
|
294
|
+
readonly officialPublicCatalog: "official_public_catalog";
|
|
295
|
+
};
|
|
296
|
+
export type ProviderCostSourceKind = typeof ProviderCostSourceKindValues[keyof typeof ProviderCostSourceKindValues];
|
|
297
|
+
export declare const ProviderCostSourceStatusValues: {
|
|
298
|
+
readonly unconfigured: "unconfigured";
|
|
299
|
+
readonly current: "current";
|
|
300
|
+
readonly stale: "stale";
|
|
301
|
+
readonly syncFailed: "sync_failed";
|
|
302
|
+
readonly notAttributable: "not_attributable";
|
|
303
|
+
};
|
|
304
|
+
export type ProviderCostSourceStatus = typeof ProviderCostSourceStatusValues[keyof typeof ProviderCostSourceStatusValues];
|
|
305
|
+
export declare const ProviderCostAttributionValues: {
|
|
306
|
+
readonly providerModelPeriod: "provider_model_period";
|
|
307
|
+
readonly providerPeriod: "provider_period";
|
|
308
|
+
readonly scenario: "scenario";
|
|
309
|
+
readonly unavailable: "unavailable";
|
|
310
|
+
};
|
|
311
|
+
export type ProviderCostAttribution = typeof ProviderCostAttributionValues[keyof typeof ProviderCostAttributionValues];
|
|
312
|
+
export declare const GenAiEtlPromotionGateKindValues: {
|
|
313
|
+
readonly contractStability: "contract_stability";
|
|
314
|
+
readonly offlineReplay: "offline_replay";
|
|
315
|
+
readonly calibratedConfidence: "calibrated_confidence";
|
|
316
|
+
readonly shadowTraffic: "shadow_traffic";
|
|
317
|
+
readonly limitedServing: "limited_serving";
|
|
318
|
+
readonly rollbackResidualPolicy: "rollback_residual_policy";
|
|
319
|
+
};
|
|
320
|
+
export type GenAiEtlPromotionGateKind = typeof GenAiEtlPromotionGateKindValues[keyof typeof GenAiEtlPromotionGateKindValues];
|
|
321
|
+
export declare const GenAiEtlPromotionGateStateValues: {
|
|
322
|
+
readonly passed: "passed";
|
|
323
|
+
readonly failed: "failed";
|
|
324
|
+
readonly notEvaluated: "not_evaluated";
|
|
325
|
+
readonly blockedMissingEvidence: "blocked_missing_evidence";
|
|
326
|
+
};
|
|
327
|
+
export type GenAiEtlPromotionGateState = typeof GenAiEtlPromotionGateStateValues[keyof typeof GenAiEtlPromotionGateStateValues];
|
|
328
|
+
export declare const GenAiEtlOutputContractValues: {
|
|
329
|
+
readonly prose: "prose";
|
|
330
|
+
readonly label: "label";
|
|
331
|
+
readonly spanList: "span_list";
|
|
332
|
+
readonly record: "record";
|
|
333
|
+
readonly vector: "vector";
|
|
334
|
+
readonly catalogReference: "catalog_reference";
|
|
335
|
+
readonly number: "number";
|
|
336
|
+
readonly boolean: "boolean";
|
|
337
|
+
readonly unknown: "unknown";
|
|
338
|
+
};
|
|
339
|
+
export type GenAiEtlOutputContract = typeof GenAiEtlOutputContractValues[keyof typeof GenAiEtlOutputContractValues];
|
|
340
|
+
export declare const GenAiEtlTaskFamilyValues: {
|
|
341
|
+
readonly openReasoningGeneration: "open_reasoning_generation";
|
|
342
|
+
readonly classification: "classification";
|
|
343
|
+
readonly sequenceLabeling: "sequence_labeling";
|
|
344
|
+
readonly structuredExtraction: "structured_extraction";
|
|
345
|
+
readonly retrievalEntityResolution: "retrieval_entity_resolution";
|
|
346
|
+
readonly similarityClustering: "similarity_clustering";
|
|
347
|
+
readonly normalizationTransformation: "normalization_transformation";
|
|
348
|
+
readonly numericAnalytical: "numeric_analytical";
|
|
349
|
+
readonly unknown: "unknown";
|
|
350
|
+
};
|
|
351
|
+
export type GenAiEtlTaskFamily = typeof GenAiEtlTaskFamilyValues[keyof typeof GenAiEtlTaskFamilyValues];
|
|
352
|
+
export declare const GenAiEtlCandidatePathValues: {
|
|
353
|
+
readonly exactCache: "exact_cache";
|
|
354
|
+
readonly deterministicCode: "deterministic_code";
|
|
355
|
+
readonly boundedRetrieval: "bounded_retrieval";
|
|
356
|
+
readonly smallClassifierExtractor: "small_classifier_extractor";
|
|
357
|
+
readonly smallerGenerativeModel: "smaller_generative_model";
|
|
358
|
+
readonly frontierModel: "frontier_model";
|
|
359
|
+
readonly insufficientEvidence: "insufficient_evidence";
|
|
360
|
+
};
|
|
361
|
+
export type GenAiEtlCandidatePath = typeof GenAiEtlCandidatePathValues[keyof typeof GenAiEtlCandidatePathValues];
|
|
362
|
+
export declare const GenAiEtlValidationMetricValues: {
|
|
363
|
+
readonly accuracy: "accuracy";
|
|
364
|
+
readonly macroF1: "macro_f1";
|
|
365
|
+
readonly spanF1: "span_f1";
|
|
366
|
+
readonly fieldExactMatch: "field_exact_match";
|
|
367
|
+
readonly schemaValidity: "schema_validity";
|
|
368
|
+
readonly matchAccuracy: "match_accuracy";
|
|
369
|
+
readonly recallAtK: "recall_at_k";
|
|
370
|
+
readonly meanReciprocalRank: "mean_reciprocal_rank";
|
|
371
|
+
readonly exactMatch: "exact_match";
|
|
372
|
+
readonly numericTolerance: "numeric_tolerance";
|
|
373
|
+
readonly humanPreference: "human_preference";
|
|
374
|
+
readonly taskSuccess: "task_success";
|
|
375
|
+
readonly unavailable: "unavailable";
|
|
376
|
+
};
|
|
377
|
+
export type GenAiEtlValidationMetric = typeof GenAiEtlValidationMetricValues[keyof typeof GenAiEtlValidationMetricValues];
|
|
378
|
+
export declare const GenAiEtlResidualPathValues: {
|
|
379
|
+
readonly frontierModel: "frontier_model";
|
|
380
|
+
readonly humanReview: "human_review";
|
|
381
|
+
readonly retry: "retry";
|
|
382
|
+
readonly degradedResponse: "degraded_response";
|
|
383
|
+
readonly none: "none";
|
|
384
|
+
readonly undetermined: "undetermined";
|
|
385
|
+
};
|
|
386
|
+
export type GenAiEtlResidualPath = typeof GenAiEtlResidualPathValues[keyof typeof GenAiEtlResidualPathValues];
|
|
387
|
+
export declare const GenAiEtlEvidenceSignalValues: {
|
|
388
|
+
readonly workflowIdentity: "workflow_identity";
|
|
389
|
+
readonly outputContract: "output_contract";
|
|
390
|
+
readonly providerModel: "provider_model";
|
|
391
|
+
readonly tokenUsage: "token_usage";
|
|
392
|
+
readonly providerCost: "provider_cost";
|
|
393
|
+
readonly recurringSchema: "recurring_schema";
|
|
394
|
+
readonly boundedReference: "bounded_reference";
|
|
395
|
+
readonly taskMetric: "task_metric";
|
|
396
|
+
readonly acceptedOutputReplay: "accepted_output_replay";
|
|
397
|
+
readonly downstreamFate: "downstream_fate";
|
|
398
|
+
readonly calibratedConfidence: "calibrated_confidence";
|
|
399
|
+
readonly shadowComparison: "shadow_comparison";
|
|
400
|
+
readonly fallbackPolicy: "fallback_policy";
|
|
401
|
+
};
|
|
402
|
+
export type GenAiEtlEvidenceSignal = typeof GenAiEtlEvidenceSignalValues[keyof typeof GenAiEtlEvidenceSignalValues];
|
|
403
|
+
export declare const GenAiEtlCalculationStatusValues: {
|
|
404
|
+
readonly calculated: "calculated";
|
|
405
|
+
readonly missingFrontierCost: "missing_frontier_cost";
|
|
406
|
+
};
|
|
407
|
+
export type GenAiEtlCalculationStatus = typeof GenAiEtlCalculationStatusValues[keyof typeof GenAiEtlCalculationStatusValues];
|
|
292
408
|
export type AttributeValue = string | boolean | number | AttributeBytesValue | AttributeValue[] | AttributeKeyValueListValue;
|
|
293
409
|
export type ApiError = NotFoundError | ValidationError | UnauthorizedError | ForbiddenError | ConflictError | RateLimitError | InternalServerError | BadGatewayError | ServiceUnavailableError;
|
|
294
410
|
export type LogBody = LogBodyString | LogBodyKvList | LogBodyArray | LogBodyBytes;
|
|
@@ -938,6 +1054,111 @@ export interface FetchTelemetryOutput {
|
|
|
938
1054
|
"stats"?: McpDashboardStats;
|
|
939
1055
|
"mode": McpDataMode;
|
|
940
1056
|
}
|
|
1057
|
+
export interface ProviderCostSource {
|
|
1058
|
+
"provider": string;
|
|
1059
|
+
"kind": ProviderCostSourceKind;
|
|
1060
|
+
"status": ProviderCostSourceStatus;
|
|
1061
|
+
"source_endpoint": string;
|
|
1062
|
+
"attribution": ProviderCostAttribution;
|
|
1063
|
+
"last_attempt_at"?: string;
|
|
1064
|
+
"last_success_at"?: string;
|
|
1065
|
+
"period_start"?: string;
|
|
1066
|
+
"period_end"?: string;
|
|
1067
|
+
"currency_code"?: string;
|
|
1068
|
+
"reported_cost_usd"?: number;
|
|
1069
|
+
"model"?: string;
|
|
1070
|
+
"failure_category"?: string;
|
|
1071
|
+
}
|
|
1072
|
+
export interface GenAiEtlPromotionGate {
|
|
1073
|
+
"gate": GenAiEtlPromotionGateKind;
|
|
1074
|
+
"state": GenAiEtlPromotionGateState;
|
|
1075
|
+
"reason"?: string;
|
|
1076
|
+
}
|
|
1077
|
+
export interface GenAiEtlAuditCluster {
|
|
1078
|
+
"cluster_id": string;
|
|
1079
|
+
"workflow_key": string;
|
|
1080
|
+
"service_name": string;
|
|
1081
|
+
"span_name": string;
|
|
1082
|
+
"operation_name"?: string;
|
|
1083
|
+
"provider"?: string;
|
|
1084
|
+
"model"?: string;
|
|
1085
|
+
"output_contract": GenAiEtlOutputContract;
|
|
1086
|
+
"task_family": GenAiEtlTaskFamily;
|
|
1087
|
+
"call_count": number;
|
|
1088
|
+
"input_tokens": number;
|
|
1089
|
+
"output_tokens": number;
|
|
1090
|
+
"cache_read_input_tokens": number;
|
|
1091
|
+
"cache_creation_input_tokens": number;
|
|
1092
|
+
"reasoning_output_tokens": number;
|
|
1093
|
+
"error_count": number;
|
|
1094
|
+
"error_rate": number;
|
|
1095
|
+
"average_latency_ms": number;
|
|
1096
|
+
"p95_latency_ms": number;
|
|
1097
|
+
"observed_cost_usd"?: number;
|
|
1098
|
+
"cost_per_call_usd"?: number;
|
|
1099
|
+
"cost_attribution": ProviderCostAttribution;
|
|
1100
|
+
"spend_share"?: number;
|
|
1101
|
+
"measurable_coverage"?: number;
|
|
1102
|
+
"safe_deferral_coverage"?: number;
|
|
1103
|
+
"candidate_path": GenAiEtlCandidatePath;
|
|
1104
|
+
"validation_metric": GenAiEtlValidationMetric;
|
|
1105
|
+
"residual_path": GenAiEtlResidualPath;
|
|
1106
|
+
"evidence_signals": GenAiEtlEvidenceSignal[];
|
|
1107
|
+
"missing_evidence": GenAiEtlEvidenceSignal[];
|
|
1108
|
+
"promotion_gates": GenAiEtlPromotionGate[];
|
|
1109
|
+
}
|
|
1110
|
+
export interface GenAiEtlAuditSummary {
|
|
1111
|
+
"total_calls": number;
|
|
1112
|
+
"total_input_tokens": number;
|
|
1113
|
+
"total_output_tokens": number;
|
|
1114
|
+
"attributed_cost_usd"?: number;
|
|
1115
|
+
"priced_call_coverage": number;
|
|
1116
|
+
"economic_concentration"?: number;
|
|
1117
|
+
"measurable_coverage"?: number;
|
|
1118
|
+
"safe_deferral_coverage"?: number;
|
|
1119
|
+
"candidate_etl_spend_share"?: number;
|
|
1120
|
+
}
|
|
1121
|
+
export interface GenAiEtlAuditReport {
|
|
1122
|
+
"generated_at": string;
|
|
1123
|
+
"period_start": string;
|
|
1124
|
+
"period_end": string;
|
|
1125
|
+
"summary": GenAiEtlAuditSummary;
|
|
1126
|
+
"cost_sources": ProviderCostSource[];
|
|
1127
|
+
"clusters": GenAiEtlAuditCluster[];
|
|
1128
|
+
}
|
|
1129
|
+
export interface GenAiEtlClusterScenario {
|
|
1130
|
+
"cluster_id": string;
|
|
1131
|
+
"coverage": number;
|
|
1132
|
+
"frontier_cost_per_call_usd"?: number;
|
|
1133
|
+
"alternative_cost_per_call_usd": number;
|
|
1134
|
+
"period_maintenance_cost_usd": number;
|
|
1135
|
+
"period_error_cost_usd": number;
|
|
1136
|
+
}
|
|
1137
|
+
export interface GenAiEtlAuditEvaluationRequest {
|
|
1138
|
+
"scenarios": GenAiEtlClusterScenario[];
|
|
1139
|
+
}
|
|
1140
|
+
export interface GenAiEtlClusterEvaluation {
|
|
1141
|
+
"cluster_id": string;
|
|
1142
|
+
"status": GenAiEtlCalculationStatus;
|
|
1143
|
+
"call_count": number;
|
|
1144
|
+
"coverage": number;
|
|
1145
|
+
"served_call_count": number;
|
|
1146
|
+
"residual_call_count": number;
|
|
1147
|
+
"frontier_cost_per_call_usd"?: number;
|
|
1148
|
+
"frontier_cost_basis": ProviderCostAttribution;
|
|
1149
|
+
"alternative_cost_per_call_usd": number;
|
|
1150
|
+
"current_period_cost_usd"?: number;
|
|
1151
|
+
"gross_replaceable_value_usd"?: number;
|
|
1152
|
+
"period_maintenance_cost_usd": number;
|
|
1153
|
+
"period_error_cost_usd": number;
|
|
1154
|
+
"net_replaceable_value_usd"?: number;
|
|
1155
|
+
}
|
|
1156
|
+
export interface GenAiEtlAuditEvaluationResponse {
|
|
1157
|
+
"generated_at": string;
|
|
1158
|
+
"period_start": string;
|
|
1159
|
+
"period_end": string;
|
|
1160
|
+
"results": GenAiEtlClusterEvaluation[];
|
|
1161
|
+
}
|
|
941
1162
|
export interface LogStreamEvent {
|
|
942
1163
|
"type": "log";
|
|
943
1164
|
"data": LogRecord;
|
|
@@ -248,3 +248,107 @@ export const FetchTelemetryViewValues = {
|
|
|
248
248
|
"logs": "logs",
|
|
249
249
|
"mcpStats": "mcp_stats",
|
|
250
250
|
};
|
|
251
|
+
export const ProviderCostSourceKindValues = {
|
|
252
|
+
"actualBilledCost": "actual_billed_cost",
|
|
253
|
+
"officialPublicCatalog": "official_public_catalog",
|
|
254
|
+
};
|
|
255
|
+
export const ProviderCostSourceStatusValues = {
|
|
256
|
+
"unconfigured": "unconfigured",
|
|
257
|
+
"current": "current",
|
|
258
|
+
"stale": "stale",
|
|
259
|
+
"syncFailed": "sync_failed",
|
|
260
|
+
"notAttributable": "not_attributable",
|
|
261
|
+
};
|
|
262
|
+
export const ProviderCostAttributionValues = {
|
|
263
|
+
"providerModelPeriod": "provider_model_period",
|
|
264
|
+
"providerPeriod": "provider_period",
|
|
265
|
+
"scenario": "scenario",
|
|
266
|
+
"unavailable": "unavailable",
|
|
267
|
+
};
|
|
268
|
+
export const GenAiEtlPromotionGateKindValues = {
|
|
269
|
+
"contractStability": "contract_stability",
|
|
270
|
+
"offlineReplay": "offline_replay",
|
|
271
|
+
"calibratedConfidence": "calibrated_confidence",
|
|
272
|
+
"shadowTraffic": "shadow_traffic",
|
|
273
|
+
"limitedServing": "limited_serving",
|
|
274
|
+
"rollbackResidualPolicy": "rollback_residual_policy",
|
|
275
|
+
};
|
|
276
|
+
export const GenAiEtlPromotionGateStateValues = {
|
|
277
|
+
"passed": "passed",
|
|
278
|
+
"failed": "failed",
|
|
279
|
+
"notEvaluated": "not_evaluated",
|
|
280
|
+
"blockedMissingEvidence": "blocked_missing_evidence",
|
|
281
|
+
};
|
|
282
|
+
export const GenAiEtlOutputContractValues = {
|
|
283
|
+
"prose": "prose",
|
|
284
|
+
"label": "label",
|
|
285
|
+
"spanList": "span_list",
|
|
286
|
+
"record": "record",
|
|
287
|
+
"vector": "vector",
|
|
288
|
+
"catalogReference": "catalog_reference",
|
|
289
|
+
"number": "number",
|
|
290
|
+
"boolean": "boolean",
|
|
291
|
+
"unknown": "unknown",
|
|
292
|
+
};
|
|
293
|
+
export const GenAiEtlTaskFamilyValues = {
|
|
294
|
+
"openReasoningGeneration": "open_reasoning_generation",
|
|
295
|
+
"classification": "classification",
|
|
296
|
+
"sequenceLabeling": "sequence_labeling",
|
|
297
|
+
"structuredExtraction": "structured_extraction",
|
|
298
|
+
"retrievalEntityResolution": "retrieval_entity_resolution",
|
|
299
|
+
"similarityClustering": "similarity_clustering",
|
|
300
|
+
"normalizationTransformation": "normalization_transformation",
|
|
301
|
+
"numericAnalytical": "numeric_analytical",
|
|
302
|
+
"unknown": "unknown",
|
|
303
|
+
};
|
|
304
|
+
export const GenAiEtlCandidatePathValues = {
|
|
305
|
+
"exactCache": "exact_cache",
|
|
306
|
+
"deterministicCode": "deterministic_code",
|
|
307
|
+
"boundedRetrieval": "bounded_retrieval",
|
|
308
|
+
"smallClassifierExtractor": "small_classifier_extractor",
|
|
309
|
+
"smallerGenerativeModel": "smaller_generative_model",
|
|
310
|
+
"frontierModel": "frontier_model",
|
|
311
|
+
"insufficientEvidence": "insufficient_evidence",
|
|
312
|
+
};
|
|
313
|
+
export const GenAiEtlValidationMetricValues = {
|
|
314
|
+
"accuracy": "accuracy",
|
|
315
|
+
"macroF1": "macro_f1",
|
|
316
|
+
"spanF1": "span_f1",
|
|
317
|
+
"fieldExactMatch": "field_exact_match",
|
|
318
|
+
"schemaValidity": "schema_validity",
|
|
319
|
+
"matchAccuracy": "match_accuracy",
|
|
320
|
+
"recallAtK": "recall_at_k",
|
|
321
|
+
"meanReciprocalRank": "mean_reciprocal_rank",
|
|
322
|
+
"exactMatch": "exact_match",
|
|
323
|
+
"numericTolerance": "numeric_tolerance",
|
|
324
|
+
"humanPreference": "human_preference",
|
|
325
|
+
"taskSuccess": "task_success",
|
|
326
|
+
"unavailable": "unavailable",
|
|
327
|
+
};
|
|
328
|
+
export const GenAiEtlResidualPathValues = {
|
|
329
|
+
"frontierModel": "frontier_model",
|
|
330
|
+
"humanReview": "human_review",
|
|
331
|
+
"retry": "retry",
|
|
332
|
+
"degradedResponse": "degraded_response",
|
|
333
|
+
"none": "none",
|
|
334
|
+
"undetermined": "undetermined",
|
|
335
|
+
};
|
|
336
|
+
export const GenAiEtlEvidenceSignalValues = {
|
|
337
|
+
"workflowIdentity": "workflow_identity",
|
|
338
|
+
"outputContract": "output_contract",
|
|
339
|
+
"providerModel": "provider_model",
|
|
340
|
+
"tokenUsage": "token_usage",
|
|
341
|
+
"providerCost": "provider_cost",
|
|
342
|
+
"recurringSchema": "recurring_schema",
|
|
343
|
+
"boundedReference": "bounded_reference",
|
|
344
|
+
"taskMetric": "task_metric",
|
|
345
|
+
"acceptedOutputReplay": "accepted_output_replay",
|
|
346
|
+
"downstreamFate": "downstream_fate",
|
|
347
|
+
"calibratedConfidence": "calibrated_confidence",
|
|
348
|
+
"shadowComparison": "shadow_comparison",
|
|
349
|
+
"fallbackPolicy": "fallback_policy",
|
|
350
|
+
};
|
|
351
|
+
export const GenAiEtlCalculationStatusValues = {
|
|
352
|
+
"calculated": "calculated",
|
|
353
|
+
"missingFrontierCost": "missing_frontier_cost",
|
|
354
|
+
};
|
package/index.tsp
CHANGED