@oxy.so/contracts 4.4.0 → 4.6.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.
- package/dist/cjs/.tsbuildinfo +1 -1
- package/dist/cjs/index.js +9 -6
- package/dist/cjs/inference/catalogue.js +51 -1
- package/dist/cjs/inference/money.js +13 -0
- package/dist/cjs/inference/routingPolicy.js +45 -1
- package/dist/cjs/inference/version.js +1 -1
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/index.js +2 -2
- package/dist/esm/inference/catalogue.js +50 -0
- package/dist/esm/inference/money.js +13 -0
- package/dist/esm/inference/routingPolicy.js +44 -1
- package/dist/esm/inference/version.js +1 -1
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/inference/catalogue.d.ts +57 -7
- package/dist/types/inference/money.d.ts +20 -8
- package/dist/types/inference/priceVersion.d.ts +12 -12
- package/dist/types/inference/realtime.d.ts +24 -24
- package/dist/types/inference/routingPolicy.d.ts +51 -17
- package/dist/types/inference/streamEvents.d.ts +10 -10
- package/dist/types/inference/usage.d.ts +28 -28
- package/dist/types/inference/version.d.ts +1 -1
- package/package.json +1 -1
package/dist/cjs/index.js
CHANGED
|
@@ -32,12 +32,12 @@ exports.deviceDirectorySyncSchema = exports.deviceActivateResponseSchema = expor
|
|
|
32
32
|
exports.updateListResponseSchema = exports.channelListResponseSchema = exports.channelSchema = exports.rollbackToEmbeddedEntrySchema = exports.createUpdateResponseSchema = exports.updateSchema = exports.createUpdateRequestSchema = exports.updateAssetRefSchema = exports.assetCompleteResponseSchema = exports.assetCompleteResultItemSchema = exports.assetCompleteRequestSchema = exports.assetInitResponseSchema = exports.assetUploadTicketSchema = exports.assetInitRequestSchema = exports.assetInitItemSchema = exports.rolloutPercentSchema = exports.runtimeVersionSchema = exports.channelNameSchema = exports.sha256HexSchema = exports.updateAssetStatusSchema = exports.updateStatusSchema = exports.updatePlatformSchema = exports.identityRootStatusSchema = exports.identityProofChallengeResponseSchema = exports.identityProofChallengeRequestSchema = exports.identityProofSchema = exports.buildIdentityProofMessage = exports.canonicalJson = exports.IDENTITY_ERROR_CODES = exports.IDENTITY_PROOF_ACTION_VALUES = exports.IDENTITY_PROOF_ACTIONS = exports.IDENTITY_PROOF_CHALLENGE_TTL_MS = exports.IDENTITY_PROOF_AUDIENCE = exports.IDENTITY_PROOF_DOMAIN = exports.IDENTITY_PROOF_VERSION = exports.backupStatusResponseSchema = exports.backupUploadRequestSchema = exports.encryptedBackupEnvelopeSchema = exports.backupLookupIdSchema = exports.rotateKeyCompleteResponseSchema = exports.rotateKeyCompleteRequestSchema = exports.rotateKeyChallengeResponseSchema = exports.loginResultSchema = exports.mcpOAuthConsentResponseSchema = exports.mcpOAuthClientInfoResponseSchema = exports.mcpOAuthConsentContextSchema = exports.mcpOAuthWriteActionSchema = exports.mcpOAuthClientApplicationSchema = exports.oauthAuthorizeCodeResponseSchema = exports.oauthConsentDecisionSchema = void 0;
|
|
33
33
|
exports.passwordSetRequestSchema = exports.reauthEmailStartRequestSchema = exports.REAUTH_ACTIONS = exports.emailReauthProofSchema = exports.reauthProofSchema = exports.isSecondFactorRequired = exports.signUpRequestSchema = exports.secondFactorRequiredSchema = exports.secondFactorSignInRequestSchema = exports.passwordSignInRequestSchema = exports.emailSignInPendingSchema = exports.emailSignInLinkResponseSchema = exports.emailSignInLinkRequestSchema = exports.emailSignInCollectRequestSchema = exports.EMAIL_SIGNIN_LONG_CODE_LENGTH = exports.EMAIL_SIGNIN_LONG_CODE_ALPHABET = exports.normalizeEmailSignInCode = exports.emailSignInCodeSchema = exports.emailSignInConfirmRequestSchema = exports.emailSignInStartResponseSchema = exports.emailSignInStartRequestSchema = exports.secondFactorCodeSchema = exports.newPasswordSchema = exports.passwordInputSchema = exports.signInIdentifierSchema = exports.SIGN_IN_ERROR_CODES = exports.TOTP_BACKUP_CODE_COUNT = exports.TOTP_PERIOD_SECONDS = exports.TOTP_DIGITS = exports.PASSWORD_MAX_LENGTH = exports.PASSWORD_MIN_LENGTH = exports.SIGNIN_SECOND_FACTOR_MAX_ATTEMPTS = exports.SIGNIN_SECOND_FACTOR_TTL_MS = exports.EMAIL_SIGNIN_LINK_TTL_MS = exports.emailVerificationConfirmResponseSchema = exports.emailVerificationConfirmRequestSchema = exports.emailVerificationStartResponseSchema = exports.emailVerificationStartRequestSchema = exports.emailTicketSchema = exports.emailAddressSchema = exports.EMAIL_VERIFICATION_ERROR_CODES = exports.EMAIL_TICKET_TTL_MS = exports.EMAIL_CODE_MAX_ATTEMPTS = exports.EMAIL_CODE_TTL_MS = exports.EMAIL_CODE_LENGTH = exports.EMAIL_VERIFICATION_PURPOSES = exports.updateRolloutPatchSchema = exports.promoteRequestSchema = exports.rollbackToEmbeddedRequestSchema = exports.rollbackRequestSchema = void 0;
|
|
34
34
|
exports.USAGE_SOURCES = exports.usageUnitSchema = exports.USAGE_UNITS = exports.moneySchema = exports.exactDecimalSchema = exports.INFERENCE_MONEY_SCALE = exports.currencyCodeSchema = exports.RESERVED_ALIA_PUBLISHER = exports.inferenceRegionSchema = exports.deploymentIdSchema = exports.inferenceProviderSlugSchema = exports.routingProfileSlugSchema = exports.routingProfileIdSchema = exports.modelReferenceSchema = exports.modelRevisionLabelSchema = exports.modelIdSchema = exports.modelSlugSchema = exports.publisherSlugSchema = exports.sha256DigestSchema = exports.inferenceHttpsUrlSchema = exports.inferenceDateSchema = exports.inferenceTimestampSchema = exports.inferenceEnvironmentSchema = exports.idempotencyKeySchema = exports.generationIdSchema = exports.requestIdSchema = exports.oxyCredentialIdSchema = exports.oxyApplicationIdSchema = exports.delegatedUserIdSchema = exports.oxyAccountIdSchema = exports.INFERENCE_CONTRACT_VERSION = exports.transparencyCheckpointListSchema = exports.transparencyInclusionProofSchema = exports.transparencyCheckpointSchema = exports.transparencyAnchorSchema = exports.transparencyCheckpointSignatureSchema = exports.identityLinkCompleteRequestSchema = exports.identityLinkProofRequestSchema = exports.identityLinkStateSchema = exports.identityLinkCreateResponseSchema = exports.parseIdentityLinkQrPayload = exports.buildIdentityLinkQrPayload = exports.identityLinkIdSchema = exports.IDENTITY_LINK_QR_PREFIX = exports.IDENTITY_LINK_STATUSES = exports.totpBackupCodesResponseSchema = exports.totpReauthRequestSchema = exports.totpConfirmRequestSchema = exports.totpEnrollResponseSchema = exports.signInMethodsSchema = void 0;
|
|
35
|
-
exports.
|
|
36
|
-
exports.
|
|
37
|
-
exports.
|
|
38
|
-
exports.
|
|
39
|
-
exports.
|
|
40
|
-
exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.inboxDailyBriefRequestSchema = exports.inboxComposeRequestSchema = exports.emailAgentContextSchema = exports.emailContextMessageSchema = exports.emailContextMailboxSchema = exports.emailContextAddressSchema = void 0;
|
|
35
|
+
exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.modelPowerClassSchema = exports.powerLevelSchema = exports.reasoningEffortSchema = exports.inferenceModalitySchema = exports.priceSnapshotSchema = exports.priceVersionSchema = exports.priceVersionStatusSchema = exports.embeddingResponseSchema = exports.embeddingFailureSchema = exports.embeddingSuccessSchema = exports.embeddingUsageSchema = exports.embeddingVectorSchema = exports.inferenceErrorSchema = exports.providerErrorPassthroughSchema = exports.safeErrorTextSchema = exports.upstreamErrorCategorySchema = exports.inferenceErrorCodeSchema = exports.NON_RETRYABLE_INFERENCE_ERROR_CODES = exports.INFERENCE_ERROR_CODES = exports.inferenceAttributionSchema = exports.authenticatedPrincipalSchema = exports.billingPrincipalSchema = exports.inferenceScopeSchema = exports.INFERENCE_SCOPES = exports.unitPriceSchema = exports.usageQuantitySchema = exports.usageSourceSchema = void 0;
|
|
36
|
+
exports.MAX_REALTIME_AUDIO_FRAME_BASE64_LENGTH = exports.inferenceStreamEventSchema = exports.inferenceStreamDoneEventSchema = exports.inferenceFinishReasonSchema = exports.inferenceStreamErrorEventSchema = exports.inferenceStreamRouteSwitchEventSchema = exports.inferenceRouteSwitchReasonSchema = exports.inferenceRouteSwitchDetailSchema = exports.inferenceStreamUsageEventSchema = exports.inferenceStreamToolCallEventSchema = exports.inferenceStreamAudioEventSchema = exports.MAX_INFERENCE_AUDIO_BYTES = exports.inferenceAudioMediaTypeSchema = exports.inferenceStreamDeltaEventSchema = exports.inferenceStreamStartEventSchema = exports.inferenceAudioOutputParametersSchema = exports.inferenceSpeechParametersSchema = exports.inferenceRequestSchema = exports.clientRequestMetadataSchema = exports.responseFormatSchema = exports.toolChoiceSchema = exports.toolDefinitionSchema = exports.inferenceReasoningSchema = exports.samplingParametersSchema = exports.inferenceInputSchema = exports.inferenceMessageSchema = exports.inferenceMessageRoleSchema = exports.inferenceToolCallSchema = exports.inferenceContentPartSchema = exports.inferenceContentSourceSchema = exports.modelDocumentationSchema = exports.modelReleaseIngestionResultSchema = exports.modelReleaseIngestionRequestSchema = exports.modelLineDeclarationSchema = exports.modelGpaiDocumentationSchema = exports.modelDownstreamDocumentationSchema = exports.SYSTEMIC_RISK_COMPUTE_THRESHOLD_FLOPS = exports.trainingComputeFlopsSchema = exports.modelSystemicRiskTierSchema = exports.modelDistributionMethodSchema = exports.aliaModelReleaseManifestSchema = exports.aliaReleaseSignatureSchema = exports.aliaReleaseArtifactSchema = exports.authorizedRouteSchema = exports.effectiveSameModelDeployment = exports.routingPolicyReferenceSchema = exports.routingPolicySchema = exports.routingFallbackPolicySchema = exports.routingPolicyScopeSchema = exports.routingTargetSchema = void 0;
|
|
37
|
+
exports.realtimeTextDeltaEventSchema = exports.realtimeTranscriptDoneEventSchema = exports.realtimeTranscriptDeltaEventSchema = exports.realtimeTranscriptSourceSchema = exports.realtimeOutputAudioDoneEventSchema = exports.realtimeOutputAudioDeltaEventSchema = exports.realtimeResponseCreatedEventSchema = exports.realtimeInputAudioClearedEventSchema = exports.realtimeInputAudioCommittedEventSchema = exports.realtimeSpeechStoppedEventSchema = exports.realtimeSpeechStartedEventSchema = exports.realtimeItemTruncatedEventSchema = exports.realtimeItemDeletedEventSchema = exports.realtimeItemDoneEventSchema = exports.realtimeItemAddedEventSchema = exports.realtimeCommandAcceptedEventSchema = exports.realtimeSessionResumedEventSchema = exports.realtimeSessionUpdatedEventSchema = exports.realtimeSessionCreatedEventSchema = exports.realtimeClientCommandSchema = exports.realtimeSessionCloseCommandSchema = exports.realtimeSessionResumeCommandSchema = exports.realtimeResponseCancelCommandSchema = exports.realtimeResponseCreateCommandSchema = exports.realtimeInputAudioClearCommandSchema = exports.realtimeInputAudioCommitCommandSchema = exports.realtimeInputAudioAppendCommandSchema = exports.realtimeItemTruncateCommandSchema = exports.realtimeItemDeleteCommandSchema = exports.realtimeItemCreateCommandSchema = exports.realtimeSessionUpdateCommandSchema = exports.realtimeResponseParametersSchema = exports.realtimeConversationItemSchema = exports.realtimeContentPartSchema = exports.realtimeSessionRequestSchema = exports.realtimeClientMetadataSchema = exports.realtimeSessionLimitsSchema = exports.realtimeSessionConfigUpdateSchema = exports.realtimeSessionConfigSchema = exports.realtimeTranslationSchema = exports.realtimeInputTranscriptionSchema = exports.realtimeTurnDetectionSchema = exports.realtimeOutputModalitySchema = exports.realtimeAudioFormatSchema = exports.realtimeResponseIdSchema = exports.realtimeItemIdSchema = exports.realtimeCommandIdSchema = exports.MAX_REALTIME_RESUME_WINDOW_MS = exports.MAX_REALTIME_SESSION_AUDIO_BYTES = exports.MAX_REALTIME_SESSION_DURATION_MS = void 0;
|
|
38
|
+
exports.BILLING_INVOICE_STATUSES = exports.accountBillingStateSchema = exports.billingProfileSchema = exports.autoRechargeSchema = exports.billingProfileStatusSchema = exports.BILLING_PROFILE_STATUSES = exports.billingModeSchema = exports.BILLING_MODES = exports.providerConnectionSchema = exports.providerConnectionStatusSchema = exports.providerConnectionValidationSchema = exports.providerCredentialCustodyStateSchema = exports.providerCredentialValidationDeploymentSchema = exports.providerCredentialValidationOperationSchema = exports.kaanaCredentialValidationOutcomeSchema = exports.kaanaCredentialValidationFailureCodeSchema = exports.kaanaCredentialValidationOutcomeStateSchema = exports.kaanaCredentialValidationTaskSchema = exports.kaanaCredentialOutcomeSchema = exports.kaanaCredentialConflictOutcomeSchema = exports.kaanaCredentialAppliedOutcomeSchema = exports.kaanaCredentialOutcomeRequestSchema = exports.kaanaCredentialRevokeOutcomeRequestSchema = exports.kaanaCredentialRotateOutcomeRequestSchema = exports.kaanaCredentialCreateOutcomeRequestSchema = exports.kaanaCredentialMutationSchema = exports.kaanaCredentialRevokeMutationSchema = exports.kaanaCredentialRotateMutationSchema = exports.kaanaCredentialCreateMutationSchema = exports.kaanaCredentialIdentitySchema = exports.kaanaCredentialOperationActionSchema = exports.kaanaCredentialOperationIdSchema = exports.kaanaCredentialHandleSchema = exports.providerConnectionScopeSchema = exports.usageRefundSchema = exports.usageRefundReasonSchema = exports.usageRefundSubjectSchema = exports.usageReceiptSchema = exports.normalizedUsageReportSchema = exports.inferenceRequestOutcomeSchema = exports.usageReservationSchema = exports.usageReservationStatusSchema = exports.usageReservationRequestSchema = exports.realtimeServerEventSchema = exports.realtimeSessionClosedEventSchema = exports.realtimeSessionCloseReasonSchema = exports.realtimeErrorEventSchema = exports.realtimeResponseDoneEventSchema = exports.realtimeResponseStatusSchema = exports.realtimeToolCallEventSchema = void 0;
|
|
39
|
+
exports.catalogEventSchema = exports.catalogToolSchema = exports.auditEventSchema = exports.auditResultSchema = exports.policyDecisionSchema = exports.capabilityTicketClaimsSchema = exports.automationDefinitionSchema = exports.automationDataFlowSchema = exports.automationActorSelectionSchema = exports.automationTriggerSchema = exports.delegationGrantSchema = exports.capabilityCoordinatorSchema = exports.executionAuthorizationRefSchema = exports.capabilityCatalogBindingSchema = exports.grantLimitSchema = exports.toolGrantOverrideSchema = exports.resourceRefSchema = exports.actorRefSchema = exports.capabilityPackageSchema = exports.autonomyLevelSchema = exports.CAPABILITY_PACKAGES = exports.AUTONOMY_LEVELS = exports.productEntitlementSchema = exports.costCenterSpendSchema = exports.costCenterSchema = exports.costCenterStatusSchema = exports.COST_CENTER_STATUSES = exports.payAsYouGoEntitlementSchema = exports.productPlanSchema = exports.planAllowanceSchema = exports.LIVE_PRODUCT_PLAN_STATUSES = exports.productPlanStatusSchema = exports.PRODUCT_PLAN_STATUSES = exports.reconciliationReportSchema = exports.reconciliationRunSchema = exports.reconciliationDiscrepancySchema = exports.reconciliationRunStatusSchema = exports.RECONCILIATION_RUN_STATUSES = exports.reconciliationDiscrepancyKindSchema = exports.RECONCILIATION_DISCREPANCY_KINDS = exports.autoRechargeAttemptSchema = exports.autoRechargeStatusSchema = exports.AUTO_RECHARGE_STATUSES = exports.externalPaymentSchema = exports.externalPaymentKindSchema = exports.EXTERNAL_PAYMENT_KINDS = exports.externalPaymentProviderSchema = exports.EXTERNAL_PAYMENT_PROVIDERS = exports.billingInvoiceSchema = exports.billingInvoiceStatusSchema = void 0;
|
|
40
|
+
exports.inboxInferenceStreamEventSchema = exports.inboxThreadSummaryResponseSchema = exports.inboxSmartRepliesResponseSchema = exports.inboxNaturalSearchResponseSchema = exports.inboxInferenceTextResponseSchema = exports.inboxMessageInferenceParamsSchema = exports.inboxNaturalSearchRequestSchema = exports.inboxDailyBriefRequestSchema = exports.inboxComposeRequestSchema = exports.emailAgentContextSchema = exports.emailContextMessageSchema = exports.emailContextMailboxSchema = exports.emailContextAddressSchema = exports.normalizedAppEventSchema = exports.catalogRegistrationSchema = exports.appCapabilityCatalogSchema = void 0;
|
|
41
41
|
var accountGraph_1 = require("./accountGraph");
|
|
42
42
|
Object.defineProperty(exports, "ACCOUNT_KINDS", { enumerable: true, get: function () { return accountGraph_1.ACCOUNT_KINDS; } });
|
|
43
43
|
Object.defineProperty(exports, "accountKindSchema", { enumerable: true, get: function () { return accountGraph_1.accountKindSchema; } });
|
|
@@ -497,6 +497,8 @@ var catalogue_1 = require("./inference/catalogue");
|
|
|
497
497
|
// The six distinct catalogue objects + the customer-safe projection.
|
|
498
498
|
Object.defineProperty(exports, "inferenceModalitySchema", { enumerable: true, get: function () { return catalogue_1.inferenceModalitySchema; } });
|
|
499
499
|
Object.defineProperty(exports, "reasoningEffortSchema", { enumerable: true, get: function () { return catalogue_1.reasoningEffortSchema; } });
|
|
500
|
+
Object.defineProperty(exports, "powerLevelSchema", { enumerable: true, get: function () { return catalogue_1.powerLevelSchema; } });
|
|
501
|
+
Object.defineProperty(exports, "modelPowerClassSchema", { enumerable: true, get: function () { return catalogue_1.modelPowerClassSchema; } });
|
|
500
502
|
Object.defineProperty(exports, "inferenceApiFormatSchema", { enumerable: true, get: function () { return catalogue_1.inferenceApiFormatSchema; } });
|
|
501
503
|
Object.defineProperty(exports, "realtimeSessionKindSchema", { enumerable: true, get: function () { return catalogue_1.realtimeSessionKindSchema; } });
|
|
502
504
|
Object.defineProperty(exports, "realtimeSessionTransportSchema", { enumerable: true, get: function () { return catalogue_1.realtimeSessionTransportSchema; } });
|
|
@@ -528,6 +530,7 @@ Object.defineProperty(exports, "routingPolicyScopeSchema", { enumerable: true, g
|
|
|
528
530
|
Object.defineProperty(exports, "routingFallbackPolicySchema", { enumerable: true, get: function () { return routingPolicy_1.routingFallbackPolicySchema; } });
|
|
529
531
|
Object.defineProperty(exports, "routingPolicySchema", { enumerable: true, get: function () { return routingPolicy_1.routingPolicySchema; } });
|
|
530
532
|
Object.defineProperty(exports, "routingPolicyReferenceSchema", { enumerable: true, get: function () { return routingPolicy_1.routingPolicyReferenceSchema; } });
|
|
533
|
+
Object.defineProperty(exports, "effectiveSameModelDeployment", { enumerable: true, get: function () { return routingPolicy_1.effectiveSameModelDeployment; } });
|
|
531
534
|
// What the data plane actually receives: the routes the policy authorized.
|
|
532
535
|
Object.defineProperty(exports, "authorizedRouteSchema", { enumerable: true, get: function () { return routingPolicy_1.authorizedRouteSchema; } });
|
|
533
536
|
var aliaModelRelease_1 = require("./inference/aliaModelRelease");
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
* Decided in: docs/adr/0008-catalogue-concept-separation.md.
|
|
29
29
|
*/
|
|
30
30
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
31
|
-
exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.reasoningEffortSchema = exports.inferenceModalitySchema = void 0;
|
|
31
|
+
exports.modelCatalogueEntrySchema = exports.catalogueServingProviderSummarySchema = exports.cataloguePublisherSummarySchema = exports.routingProfileSchema = exports.routingProfileCandidateSchema = exports.modelDeploymentSchema = exports.inferenceProviderSchema = exports.modelRevisionSchema = exports.catalogueModelSchema = exports.modelPublisherSchema = exports.modelSafetyMetadataSchema = exports.modelEvaluationResultSchema = exports.modelDeprecationSchema = exports.commercialPermissionSchema = exports.availabilityScopeSchema = exports.inferenceDataPolicySchema = exports.modelProvenanceSchema = exports.modelLicenseSchema = exports.modelCapabilitiesSchema = exports.modelRealtimeCapabilitiesSchema = exports.realtimeSessionTransportSchema = exports.realtimeSessionKindSchema = exports.inferenceApiFormatSchema = exports.modelPowerClassSchema = exports.powerLevelSchema = exports.reasoningEffortSchema = exports.inferenceModalitySchema = void 0;
|
|
32
32
|
const zod_1 = require("zod");
|
|
33
33
|
const identifiers_1 = require("./identifiers");
|
|
34
34
|
const priceVersion_1 = require("./priceVersion");
|
|
@@ -52,6 +52,38 @@ exports.inferenceModalitySchema = zod_1.z.enum([
|
|
|
52
52
|
* effort the resolved model does not advertise rather than dropping it.
|
|
53
53
|
*/
|
|
54
54
|
exports.reasoningEffortSchema = zod_1.z.enum(['low', 'medium', 'high']);
|
|
55
|
+
/**
|
|
56
|
+
* A POWER LEVEL: the public name of a product-preset routing profile that asks
|
|
57
|
+
* Oxy to choose a model by capability tier instead of naming one (contract set
|
|
58
|
+
* 3.4.0). Ordered cheapest first; `auto` asks Oxy to pick the cheapest level
|
|
59
|
+
* that suffices for the request.
|
|
60
|
+
*
|
|
61
|
+
* - `instant` — very cheap, fast small models; no reasoning effort requested
|
|
62
|
+
* - `medium` — mid-size models, low reasoning effort
|
|
63
|
+
* - `high` — strong models, medium reasoning effort
|
|
64
|
+
* - `xhigh` — strong models, high reasoning effort
|
|
65
|
+
* - `pro` — frontier models, high reasoning effort
|
|
66
|
+
* - `ultra` — the heaviest frontier models, maximum reasoning effort
|
|
67
|
+
*
|
|
68
|
+
* A power level is a routing profile, never a model: its slug has no `/`, and
|
|
69
|
+
* the response always reports the concrete model that ran.
|
|
70
|
+
*/
|
|
71
|
+
exports.powerLevelSchema = zod_1.z.enum([
|
|
72
|
+
'auto',
|
|
73
|
+
'instant',
|
|
74
|
+
'medium',
|
|
75
|
+
'high',
|
|
76
|
+
'xhigh',
|
|
77
|
+
'pro',
|
|
78
|
+
'ultra',
|
|
79
|
+
]);
|
|
80
|
+
/**
|
|
81
|
+
* The reviewed capability tier of one MODEL, which power levels choose from.
|
|
82
|
+
* `xhigh` and `auto` are not classes: `xhigh` runs `high`-class models at a
|
|
83
|
+
* higher effort, and `auto` chooses a level. Reviewed catalogue data with a
|
|
84
|
+
* cited public benchmark source — never inferred from a model's name.
|
|
85
|
+
*/
|
|
86
|
+
exports.modelPowerClassSchema = zod_1.z.enum(['instant', 'medium', 'high', 'pro', 'ultra']);
|
|
55
87
|
/**
|
|
56
88
|
* The public dialects a request can arrive in — `client.apiFormat` on the
|
|
57
89
|
* envelope, and the list a deployment declares it can execute.
|
|
@@ -542,6 +574,18 @@ exports.routingProfileSchema = zod_1.z.object({
|
|
|
542
574
|
candidates: zod_1.z.array(exports.routingProfileCandidateSchema).min(1),
|
|
543
575
|
/** A product preset (Alia's "fast" toggle) rather than a customer's own profile. */
|
|
544
576
|
isProductPreset: zod_1.z.boolean(),
|
|
577
|
+
/**
|
|
578
|
+
* Present when this profile IS a power level (contract set 3.4.0). Its
|
|
579
|
+
* `candidates` are then the currently servable models of the level's class,
|
|
580
|
+
* and may change between reads; cross-model failover among them is
|
|
581
|
+
* authorized by the profile and reported with a `route_switch` event.
|
|
582
|
+
*/
|
|
583
|
+
powerLevel: exports.powerLevelSchema.optional(),
|
|
584
|
+
/**
|
|
585
|
+
* The reasoning effort a power level asks for when the request names none,
|
|
586
|
+
* applied only on a model that advertises it. Absent: none is requested.
|
|
587
|
+
*/
|
|
588
|
+
reasoningEffort: exports.reasoningEffortSchema.optional(),
|
|
545
589
|
});
|
|
546
590
|
/* -------------------------------------------------------------------------- */
|
|
547
591
|
/* Customer-safe catalogue projection */
|
|
@@ -610,4 +654,10 @@ exports.modelCatalogueEntrySchema = zod_1.z.object({
|
|
|
610
654
|
evaluations: zod_1.z.array(exports.modelEvaluationResultSchema).default([]),
|
|
611
655
|
safety: exports.modelSafetyMetadataSchema.optional(),
|
|
612
656
|
modelCardUrl: identifiers_1.inferenceHttpsUrlSchema.optional(),
|
|
657
|
+
/**
|
|
658
|
+
* The reviewed power class this model serves in, when one has been reviewed
|
|
659
|
+
* (contract set 3.4.0). Absent means the model is callable by name only and
|
|
660
|
+
* no power level chooses it.
|
|
661
|
+
*/
|
|
662
|
+
powerClass: exports.modelPowerClassSchema.optional(),
|
|
613
663
|
});
|
|
@@ -135,6 +135,18 @@ exports.moneySchema = zod_1.z
|
|
|
135
135
|
* reported as tokens and as milliseconds is the double charge this rule exists
|
|
136
136
|
* to prevent.
|
|
137
137
|
*
|
|
138
|
+
* **`session_milliseconds` is session wall-clock time** (added in contract set
|
|
139
|
+
* 3.3.0): wall-clock milliseconds a realtime session was open with the upstream
|
|
140
|
+
* provider; reported only by a provider that bills session time, and never
|
|
141
|
+
* together with a per-audio reading of the same span. xAI's Voice Agent API
|
|
142
|
+
* bills a session using server-side voice activity detection for its whole
|
|
143
|
+
* duration, speech or silence, which is neither audio sent nor audio received:
|
|
144
|
+
* reporting that clock as `audio_input_milliseconds` would misdescribe the
|
|
145
|
+
* charge, and reporting both would bill the same span twice. It is measured by
|
|
146
|
+
* the data plane from the upstream session's open to its close, never
|
|
147
|
+
* estimated from the audio, and a provider billed by the audio it carries (or
|
|
148
|
+
* by tokens) never reports it.
|
|
149
|
+
*
|
|
138
150
|
* No refinement in this package can enforce it, and saying so is part of the
|
|
139
151
|
* rule: a nested report and a disjoint one are the same four non-negative
|
|
140
152
|
* integers, so no predicate over a single report can tell them apart. The two
|
|
@@ -171,6 +183,7 @@ exports.USAGE_UNITS = [
|
|
|
171
183
|
'audio_input_tokens',
|
|
172
184
|
'cached_audio_input_tokens',
|
|
173
185
|
'audio_output_tokens',
|
|
186
|
+
'session_milliseconds',
|
|
174
187
|
];
|
|
175
188
|
exports.usageUnitSchema = zod_1.z.enum(exports.USAGE_UNITS);
|
|
176
189
|
/**
|
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
*/
|
|
35
35
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
36
|
exports.authorizedRouteSchema = exports.routingPolicyReferenceSchema = exports.routingPolicySchema = exports.routingFallbackPolicySchema = exports.routingPolicyScopeSchema = exports.routingTargetSchema = void 0;
|
|
37
|
+
exports.effectiveSameModelDeployment = effectiveSameModelDeployment;
|
|
37
38
|
const zod_1 = require("zod");
|
|
38
39
|
const identifiers_1 = require("./identifiers");
|
|
39
40
|
const providerConnection_1 = require("./providerConnection");
|
|
@@ -88,10 +89,26 @@ exports.routingPolicyScopeSchema = zod_1.z.discriminatedUnion("kind", [
|
|
|
88
89
|
exports.routingFallbackPolicySchema = zod_1.z
|
|
89
90
|
.object({
|
|
90
91
|
disabled: zod_1.z.boolean(),
|
|
91
|
-
|
|
92
|
+
/**
|
|
93
|
+
* Same-model deployment failover. OPTIONAL since contract set 3.4.0, and
|
|
94
|
+
* absent means ON unless `disabled` is set: serving the same weights from
|
|
95
|
+
* another deployment of the same revision is an availability decision, not
|
|
96
|
+
* a substitution. A policy opts out with an explicit `false` (or
|
|
97
|
+
* `disabled: true`). See `effectiveSameModelDeployment`.
|
|
98
|
+
*/
|
|
99
|
+
sameModelDeployment: zod_1.z.boolean().optional(),
|
|
92
100
|
authorizedCrossModel: zod_1.z.array(identifiers_1.modelReferenceSchema).default([]),
|
|
93
101
|
})
|
|
94
102
|
.strict();
|
|
103
|
+
/**
|
|
104
|
+
* Whether a fallback block authorizes same-model deployment failover: an
|
|
105
|
+
* explicit `sameModelDeployment` wins; absent means on unless `disabled`.
|
|
106
|
+
*/
|
|
107
|
+
function effectiveSameModelDeployment(fallback) {
|
|
108
|
+
if (fallback.disabled)
|
|
109
|
+
return false;
|
|
110
|
+
return fallback.sameModelDeployment ?? true;
|
|
111
|
+
}
|
|
95
112
|
/**
|
|
96
113
|
* A versioned routing policy.
|
|
97
114
|
*
|
|
@@ -131,6 +148,14 @@ exports.routingPolicySchema = zod_1.z
|
|
|
131
148
|
allowedLicenseIds: zod_1.z.array(zod_1.z.string().min(1).max(128)).default([]),
|
|
132
149
|
requireCommercialUseRights: zod_1.z.boolean(),
|
|
133
150
|
fallback: exports.routingFallbackPolicySchema,
|
|
151
|
+
/**
|
|
152
|
+
* The routing profiles (power levels) this scope may target, by exact id
|
|
153
|
+
* (contract set 3.4.0). Empty means no restriction. A request naming a
|
|
154
|
+
* profile outside a non-empty list is refused with `policy_violation`, and
|
|
155
|
+
* `auto` only climbs to levels on the list. Concrete model targets are
|
|
156
|
+
* governed by the other controls, not by this list.
|
|
157
|
+
*/
|
|
158
|
+
allowedRoutingProfileIds: zod_1.z.array(identifiers_1.routingProfileIdSchema).default([]),
|
|
134
159
|
/** Whether the customer's own provider credentials may or must be used. */
|
|
135
160
|
byokPreference: zod_1.z.enum(["disabled", "prefer", "require"]),
|
|
136
161
|
/** Enterprise reserved capacity rather than shared endpoints. */
|
|
@@ -210,6 +235,25 @@ exports.routingPolicySchema = zod_1.z
|
|
|
210
235
|
}
|
|
211
236
|
}
|
|
212
237
|
}
|
|
238
|
+
const allowedProfiles = policy.allowedRoutingProfileIds;
|
|
239
|
+
if (new Set(allowedProfiles).size !== allowedProfiles.length) {
|
|
240
|
+
ctx.addIssue({
|
|
241
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
242
|
+
path: ["allowedRoutingProfileIds"],
|
|
243
|
+
message: "each routing profile is allowed at most once",
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
// A default the policy itself forbids would refuse every request that
|
|
247
|
+
// names no model — a policy that cannot serve its own default.
|
|
248
|
+
if (allowedProfiles.length > 0 &&
|
|
249
|
+
policy.defaultTarget?.kind === "routing_profile_id" &&
|
|
250
|
+
!allowedProfiles.includes(policy.defaultTarget.routingProfileId)) {
|
|
251
|
+
ctx.addIssue({
|
|
252
|
+
code: zod_1.z.ZodIssueCode.custom,
|
|
253
|
+
path: ["defaultTarget", "routingProfileId"],
|
|
254
|
+
message: "the default routing profile must be one of allowedRoutingProfileIds",
|
|
255
|
+
});
|
|
256
|
+
}
|
|
213
257
|
});
|
|
214
258
|
/**
|
|
215
259
|
* The reference a request records: which policy, at which of the customer's own
|
|
@@ -102,4 +102,4 @@ exports.INFERENCE_CONTRACT_VERSION = void 0;
|
|
|
102
102
|
* change to, say, the catalogue reject every in-flight inference request; the
|
|
103
103
|
* per-shape `schemaVersion` is what a message is validated against.
|
|
104
104
|
*/
|
|
105
|
-
exports.INFERENCE_CONTRACT_VERSION = '3.
|
|
105
|
+
exports.INFERENCE_CONTRACT_VERSION = '3.4.0';
|