@oxy.so/contracts 4.7.0 → 4.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/cjs/.tsbuildinfo +1 -1
  2. package/dist/cjs/accountGraph.js +13 -5
  3. package/dist/cjs/accountSubject.js +189 -0
  4. package/dist/cjs/agency.js +56 -4
  5. package/dist/cjs/agentKeys.js +67 -0
  6. package/dist/cjs/capabilityBindings.js +72 -0
  7. package/dist/cjs/index.js +68 -13
  8. package/dist/cjs/inference/catalogue.js +5 -2
  9. package/dist/cjs/inference/economics.js +135 -0
  10. package/dist/cjs/inference/request.js +33 -1
  11. package/dist/cjs/inference/scopedExecution.js +87 -0
  12. package/dist/cjs/products/access.js +60 -0
  13. package/dist/cjs/products/billing.js +32 -0
  14. package/dist/cjs/signIn.js +1 -1
  15. package/dist/esm/.tsbuildinfo +1 -1
  16. package/dist/esm/accountGraph.js +13 -5
  17. package/dist/esm/accountSubject.js +182 -0
  18. package/dist/esm/agency.js +55 -3
  19. package/dist/esm/agentKeys.js +63 -0
  20. package/dist/esm/capabilityBindings.js +67 -0
  21. package/dist/esm/index.js +12 -1
  22. package/dist/esm/inference/catalogue.js +3 -0
  23. package/dist/esm/inference/economics.js +132 -0
  24. package/dist/esm/inference/request.js +32 -0
  25. package/dist/esm/inference/scopedExecution.js +83 -0
  26. package/dist/esm/products/access.js +57 -0
  27. package/dist/esm/products/billing.js +29 -0
  28. package/dist/esm/signIn.js +1 -1
  29. package/dist/types/.tsbuildinfo +1 -1
  30. package/dist/types/accountGraph.d.ts +23 -8
  31. package/dist/types/accountSubject.d.ts +210 -0
  32. package/dist/types/agency.d.ts +956 -190
  33. package/dist/types/agentKeys.d.ts +525 -0
  34. package/dist/types/capabilityBindings.d.ts +6 -0
  35. package/dist/types/deviceDirectory.d.ts +50 -50
  36. package/dist/types/deviceSession.d.ts +14 -14
  37. package/dist/types/externalIdentity.d.ts +4 -4
  38. package/dist/types/identity.d.ts +2 -2
  39. package/dist/types/index.d.ts +16 -2
  40. package/dist/types/inference/accountBilling.d.ts +30 -30
  41. package/dist/types/inference/aliaModelRelease.d.ts +4 -4
  42. package/dist/types/inference/catalogue.d.ts +200 -10
  43. package/dist/types/inference/economics.d.ts +376 -0
  44. package/dist/types/inference/entitlement.d.ts +47 -47
  45. package/dist/types/inference/inbox.d.ts +12 -12
  46. package/dist/types/inference/modelDocumentation.d.ts +8 -8
  47. package/dist/types/inference/priceVersion.d.ts +4 -4
  48. package/dist/types/inference/providerConnection.d.ts +38 -38
  49. package/dist/types/inference/realtime.d.ts +32 -32
  50. package/dist/types/inference/request.d.ts +2289 -16
  51. package/dist/types/inference/routingPolicy.d.ts +20 -20
  52. package/dist/types/inference/scopedExecution.d.ts +202 -0
  53. package/dist/types/inference/streamEvents.d.ts +4 -4
  54. package/dist/types/inference/usage.d.ts +12 -12
  55. package/dist/types/keyRotation.d.ts +2 -2
  56. package/dist/types/notifications.d.ts +4 -4
  57. package/dist/types/oauth.d.ts +30 -30
  58. package/dist/types/products/access.d.ts +487 -0
  59. package/dist/types/products/billing.d.ts +563 -0
  60. package/dist/types/recommendations.d.ts +2 -2
  61. package/dist/types/sessionStatus.d.ts +10 -10
  62. package/dist/types/signIn.d.ts +6 -6
  63. package/dist/types/transparency.d.ts +2 -2
  64. package/package.json +1 -1
@@ -1533,6 +1533,106 @@ export type InferenceAudioOutputParameters = z.infer<typeof inferenceAudioOutput
1533
1533
  export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
1534
1534
  /** See `version.ts`: this is the Oxy→data-plane request envelope. */
1535
1535
  schemaVersion: z.ZodLiteral<2>;
1536
+ /** Recognized so v2 refuses rather than silently stripping a restriction. */
1537
+ scopedExecution: z.ZodOptional<z.ZodObject<{
1538
+ permitId: z.ZodString;
1539
+ idempotencyKey: z.ZodString;
1540
+ fixtureSha256: z.ZodString;
1541
+ expiresAt: z.ZodString;
1542
+ principal: z.ZodObject<{
1543
+ accountId: z.ZodString;
1544
+ applicationId: z.ZodString;
1545
+ credentialId: z.ZodString;
1546
+ environment: z.ZodEnum<["development", "staging", "production"]>;
1547
+ }, "strict", z.ZodTypeAny, {
1548
+ environment: "development" | "staging" | "production";
1549
+ accountId: string;
1550
+ applicationId: string;
1551
+ credentialId: string;
1552
+ }, {
1553
+ environment: "development" | "staging" | "production";
1554
+ accountId: string;
1555
+ applicationId: string;
1556
+ credentialId: string;
1557
+ }>;
1558
+ policy: z.ZodObject<{
1559
+ routingPolicyId: z.ZodString;
1560
+ policyVersion: z.ZodNumber;
1561
+ }, "strict", z.ZodTypeAny, {
1562
+ routingPolicyId: string;
1563
+ policyVersion: number;
1564
+ }, {
1565
+ routingPolicyId: string;
1566
+ policyVersion: number;
1567
+ }>;
1568
+ deploymentId: z.ZodString;
1569
+ provider: z.ZodString;
1570
+ keyId: z.ZodString;
1571
+ modelReference: z.ZodEffects<z.ZodString, string, string>;
1572
+ upstreamModelId: z.ZodString;
1573
+ priceVersionId: z.ZodString;
1574
+ providerRateCardVersionId: z.ZodString;
1575
+ providerSourceVersion: z.ZodString;
1576
+ maxCostUsd: z.ZodEffects<z.ZodBranded<z.ZodString, "ExactDecimal">, string & z.BRAND<"ExactDecimal">, string>;
1577
+ } & {
1578
+ requestId: z.ZodString;
1579
+ snapshotId: z.ZodString;
1580
+ catalogueEvidenceHash: z.ZodString;
1581
+ }, "strict", z.ZodTypeAny, {
1582
+ expiresAt: string;
1583
+ requestId: string;
1584
+ keyId: string;
1585
+ idempotencyKey: string;
1586
+ principal: {
1587
+ environment: "development" | "staging" | "production";
1588
+ accountId: string;
1589
+ applicationId: string;
1590
+ credentialId: string;
1591
+ };
1592
+ provider: string;
1593
+ priceVersionId: string;
1594
+ modelReference: string;
1595
+ permitId: string;
1596
+ fixtureSha256: string;
1597
+ policy: {
1598
+ routingPolicyId: string;
1599
+ policyVersion: number;
1600
+ };
1601
+ deploymentId: string;
1602
+ upstreamModelId: string;
1603
+ providerRateCardVersionId: string;
1604
+ providerSourceVersion: string;
1605
+ maxCostUsd: string & z.BRAND<"ExactDecimal">;
1606
+ snapshotId: string;
1607
+ catalogueEvidenceHash: string;
1608
+ }, {
1609
+ expiresAt: string;
1610
+ requestId: string;
1611
+ keyId: string;
1612
+ idempotencyKey: string;
1613
+ principal: {
1614
+ environment: "development" | "staging" | "production";
1615
+ accountId: string;
1616
+ applicationId: string;
1617
+ credentialId: string;
1618
+ };
1619
+ provider: string;
1620
+ priceVersionId: string;
1621
+ modelReference: string;
1622
+ permitId: string;
1623
+ fixtureSha256: string;
1624
+ policy: {
1625
+ routingPolicyId: string;
1626
+ policyVersion: number;
1627
+ };
1628
+ deploymentId: string;
1629
+ upstreamModelId: string;
1630
+ providerRateCardVersionId: string;
1631
+ providerSourceVersion: string;
1632
+ maxCostUsd: string;
1633
+ snapshotId: string;
1634
+ catalogueEvidenceHash: string;
1635
+ }>>;
1536
1636
  attribution: z.ZodObject<{
1537
1637
  principal: z.ZodObject<{
1538
1638
  billing: z.ZodObject<{
@@ -2516,8 +2616,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2516
2616
  }, "strict", z.ZodTypeAny, {
2517
2617
  provider: string;
2518
2618
  modelReference: string;
2519
- regions: string[];
2520
2619
  deploymentId: string;
2620
+ regions: string[];
2521
2621
  substitution: "same_model";
2522
2622
  customerProviderCredential?: {
2523
2623
  environment: "development" | "staging" | "production";
@@ -2529,8 +2629,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2529
2629
  }, {
2530
2630
  provider: string;
2531
2631
  modelReference: string;
2532
- regions: string[];
2533
2632
  deploymentId: string;
2633
+ regions: string[];
2534
2634
  substitution: "same_model";
2535
2635
  customerProviderCredential?: {
2536
2636
  environment: "development" | "staging" | "production";
@@ -2568,8 +2668,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2568
2668
  }, "strict", z.ZodTypeAny, {
2569
2669
  provider: string;
2570
2670
  modelReference: string;
2571
- regions: string[];
2572
2671
  deploymentId: string;
2672
+ regions: string[];
2573
2673
  substitution: "cross_model";
2574
2674
  authorizedByPolicy: true;
2575
2675
  customerProviderCredential?: {
@@ -2582,8 +2682,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2582
2682
  }, {
2583
2683
  provider: string;
2584
2684
  modelReference: string;
2585
- regions: string[];
2586
2685
  deploymentId: string;
2686
+ regions: string[];
2587
2687
  substitution: "cross_model";
2588
2688
  authorizedByPolicy: true;
2589
2689
  customerProviderCredential?: {
@@ -2596,8 +2696,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2596
2696
  }>]>, {
2597
2697
  provider: string;
2598
2698
  modelReference: string;
2599
- regions: string[];
2600
2699
  deploymentId: string;
2700
+ regions: string[];
2601
2701
  substitution: "same_model";
2602
2702
  customerProviderCredential?: {
2603
2703
  environment: "development" | "staging" | "production";
@@ -2609,8 +2709,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2609
2709
  } | {
2610
2710
  provider: string;
2611
2711
  modelReference: string;
2612
- regions: string[];
2613
2712
  deploymentId: string;
2713
+ regions: string[];
2614
2714
  substitution: "cross_model";
2615
2715
  authorizedByPolicy: true;
2616
2716
  customerProviderCredential?: {
@@ -2623,8 +2723,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2623
2723
  }, {
2624
2724
  provider: string;
2625
2725
  modelReference: string;
2626
- regions: string[];
2627
2726
  deploymentId: string;
2727
+ regions: string[];
2628
2728
  substitution: "same_model";
2629
2729
  customerProviderCredential?: {
2630
2730
  environment: "development" | "staging" | "production";
@@ -2636,8 +2736,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2636
2736
  } | {
2637
2737
  provider: string;
2638
2738
  modelReference: string;
2639
- regions: string[];
2640
2739
  deploymentId: string;
2740
+ regions: string[];
2641
2741
  substitution: "cross_model";
2642
2742
  authorizedByPolicy: true;
2643
2743
  customerProviderCredential?: {
@@ -2788,6 +2888,34 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2788
2888
  effort: "low" | "medium" | "high";
2789
2889
  } | undefined;
2790
2890
  maxOutputTokens?: number | undefined;
2891
+ scopedExecution?: {
2892
+ expiresAt: string;
2893
+ requestId: string;
2894
+ keyId: string;
2895
+ idempotencyKey: string;
2896
+ principal: {
2897
+ environment: "development" | "staging" | "production";
2898
+ accountId: string;
2899
+ applicationId: string;
2900
+ credentialId: string;
2901
+ };
2902
+ provider: string;
2903
+ priceVersionId: string;
2904
+ modelReference: string;
2905
+ permitId: string;
2906
+ fixtureSha256: string;
2907
+ policy: {
2908
+ routingPolicyId: string;
2909
+ policyVersion: number;
2910
+ };
2911
+ deploymentId: string;
2912
+ upstreamModelId: string;
2913
+ providerRateCardVersionId: string;
2914
+ providerSourceVersion: string;
2915
+ maxCostUsd: string & z.BRAND<"ExactDecimal">;
2916
+ snapshotId: string;
2917
+ catalogueEvidenceHash: string;
2918
+ } | undefined;
2791
2919
  responseFormat?: {
2792
2920
  type: "text";
2793
2921
  } | {
@@ -2814,8 +2942,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2814
2942
  authorizedRoutes?: ({
2815
2943
  provider: string;
2816
2944
  modelReference: string;
2817
- regions: string[];
2818
2945
  deploymentId: string;
2946
+ regions: string[];
2819
2947
  substitution: "same_model";
2820
2948
  customerProviderCredential?: {
2821
2949
  environment: "development" | "staging" | "production";
@@ -2827,8 +2955,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2827
2955
  } | {
2828
2956
  provider: string;
2829
2957
  modelReference: string;
2830
- regions: string[];
2831
2958
  deploymentId: string;
2959
+ regions: string[];
2832
2960
  substitution: "cross_model";
2833
2961
  authorizedByPolicy: true;
2834
2962
  customerProviderCredential?: {
@@ -2979,6 +3107,34 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
2979
3107
  effort: "low" | "medium" | "high";
2980
3108
  } | undefined;
2981
3109
  maxOutputTokens?: number | undefined;
3110
+ scopedExecution?: {
3111
+ expiresAt: string;
3112
+ requestId: string;
3113
+ keyId: string;
3114
+ idempotencyKey: string;
3115
+ principal: {
3116
+ environment: "development" | "staging" | "production";
3117
+ accountId: string;
3118
+ applicationId: string;
3119
+ credentialId: string;
3120
+ };
3121
+ provider: string;
3122
+ priceVersionId: string;
3123
+ modelReference: string;
3124
+ permitId: string;
3125
+ fixtureSha256: string;
3126
+ policy: {
3127
+ routingPolicyId: string;
3128
+ policyVersion: number;
3129
+ };
3130
+ deploymentId: string;
3131
+ upstreamModelId: string;
3132
+ providerRateCardVersionId: string;
3133
+ providerSourceVersion: string;
3134
+ maxCostUsd: string;
3135
+ snapshotId: string;
3136
+ catalogueEvidenceHash: string;
3137
+ } | undefined;
2982
3138
  responseFormat?: {
2983
3139
  type: "text";
2984
3140
  } | {
@@ -3005,8 +3161,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
3005
3161
  authorizedRoutes?: ({
3006
3162
  provider: string;
3007
3163
  modelReference: string;
3008
- regions: string[];
3009
3164
  deploymentId: string;
3165
+ regions: string[];
3010
3166
  substitution: "same_model";
3011
3167
  customerProviderCredential?: {
3012
3168
  environment: "development" | "staging" | "production";
@@ -3018,8 +3174,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
3018
3174
  } | {
3019
3175
  provider: string;
3020
3176
  modelReference: string;
3021
- regions: string[];
3022
3177
  deploymentId: string;
3178
+ regions: string[];
3023
3179
  substitution: "cross_model";
3024
3180
  authorizedByPolicy: true;
3025
3181
  customerProviderCredential?: {
@@ -3170,6 +3326,34 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
3170
3326
  effort: "low" | "medium" | "high";
3171
3327
  } | undefined;
3172
3328
  maxOutputTokens?: number | undefined;
3329
+ scopedExecution?: {
3330
+ expiresAt: string;
3331
+ requestId: string;
3332
+ keyId: string;
3333
+ idempotencyKey: string;
3334
+ principal: {
3335
+ environment: "development" | "staging" | "production";
3336
+ accountId: string;
3337
+ applicationId: string;
3338
+ credentialId: string;
3339
+ };
3340
+ provider: string;
3341
+ priceVersionId: string;
3342
+ modelReference: string;
3343
+ permitId: string;
3344
+ fixtureSha256: string;
3345
+ policy: {
3346
+ routingPolicyId: string;
3347
+ policyVersion: number;
3348
+ };
3349
+ deploymentId: string;
3350
+ upstreamModelId: string;
3351
+ providerRateCardVersionId: string;
3352
+ providerSourceVersion: string;
3353
+ maxCostUsd: string & z.BRAND<"ExactDecimal">;
3354
+ snapshotId: string;
3355
+ catalogueEvidenceHash: string;
3356
+ } | undefined;
3173
3357
  responseFormat?: {
3174
3358
  type: "text";
3175
3359
  } | {
@@ -3196,8 +3380,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
3196
3380
  authorizedRoutes?: ({
3197
3381
  provider: string;
3198
3382
  modelReference: string;
3199
- regions: string[];
3200
3383
  deploymentId: string;
3384
+ regions: string[];
3201
3385
  substitution: "same_model";
3202
3386
  customerProviderCredential?: {
3203
3387
  environment: "development" | "staging" | "production";
@@ -3209,8 +3393,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
3209
3393
  } | {
3210
3394
  provider: string;
3211
3395
  modelReference: string;
3212
- regions: string[];
3213
3396
  deploymentId: string;
3397
+ regions: string[];
3214
3398
  substitution: "cross_model";
3215
3399
  authorizedByPolicy: true;
3216
3400
  customerProviderCredential?: {
@@ -3361,6 +3545,34 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
3361
3545
  effort: "low" | "medium" | "high";
3362
3546
  } | undefined;
3363
3547
  maxOutputTokens?: number | undefined;
3548
+ scopedExecution?: {
3549
+ expiresAt: string;
3550
+ requestId: string;
3551
+ keyId: string;
3552
+ idempotencyKey: string;
3553
+ principal: {
3554
+ environment: "development" | "staging" | "production";
3555
+ accountId: string;
3556
+ applicationId: string;
3557
+ credentialId: string;
3558
+ };
3559
+ provider: string;
3560
+ priceVersionId: string;
3561
+ modelReference: string;
3562
+ permitId: string;
3563
+ fixtureSha256: string;
3564
+ policy: {
3565
+ routingPolicyId: string;
3566
+ policyVersion: number;
3567
+ };
3568
+ deploymentId: string;
3569
+ upstreamModelId: string;
3570
+ providerRateCardVersionId: string;
3571
+ providerSourceVersion: string;
3572
+ maxCostUsd: string;
3573
+ snapshotId: string;
3574
+ catalogueEvidenceHash: string;
3575
+ } | undefined;
3364
3576
  responseFormat?: {
3365
3577
  type: "text";
3366
3578
  } | {
@@ -3387,8 +3599,8 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
3387
3599
  authorizedRoutes?: ({
3388
3600
  provider: string;
3389
3601
  modelReference: string;
3390
- regions: string[];
3391
3602
  deploymentId: string;
3603
+ regions: string[];
3392
3604
  substitution: "same_model";
3393
3605
  customerProviderCredential?: {
3394
3606
  environment: "development" | "staging" | "production";
@@ -3400,8 +3612,2068 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
3400
3612
  } | {
3401
3613
  provider: string;
3402
3614
  modelReference: string;
3403
- regions: string[];
3404
3615
  deploymentId: string;
3616
+ regions: string[];
3617
+ substitution: "cross_model";
3618
+ authorizedByPolicy: true;
3619
+ customerProviderCredential?: {
3620
+ environment: "development" | "staging" | "production";
3621
+ ownerAccountId: string;
3622
+ connectionId: string;
3623
+ credentialHandle: string;
3624
+ credentialRevision: number;
3625
+ } | undefined;
3626
+ })[] | undefined;
3627
+ }>;
3628
+ /** Explicit restrictive generation: old v2 receivers reject this version whole. */
3629
+ export declare const scopedInferenceRequestSchema: z.ZodEffects<z.ZodObject<{
3630
+ attribution: z.ZodObject<{
3631
+ principal: z.ZodObject<{
3632
+ billing: z.ZodObject<{
3633
+ accountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
3634
+ }, "strict", z.ZodTypeAny, {
3635
+ accountId: string & z.BRAND<"OxyAccountId">;
3636
+ }, {
3637
+ accountId: string;
3638
+ }>;
3639
+ applicationId: z.ZodString;
3640
+ credentialId: z.ZodString;
3641
+ environment: z.ZodEnum<["development", "staging", "production"]>;
3642
+ inferenceScopes: z.ZodArray<z.ZodEnum<["inference:invoke", "inference:models:read", "inference:usage:read", "inference:routing:read", "inference:routing:write", "inference:providers:read", "inference:providers:write"]>, "many">;
3643
+ }, "strip", z.ZodTypeAny, {
3644
+ environment: "development" | "staging" | "production";
3645
+ applicationId: string;
3646
+ credentialId: string;
3647
+ billing: {
3648
+ accountId: string & z.BRAND<"OxyAccountId">;
3649
+ };
3650
+ inferenceScopes: ("inference:invoke" | "inference:models:read" | "inference:usage:read" | "inference:routing:read" | "inference:routing:write" | "inference:providers:read" | "inference:providers:write")[];
3651
+ }, {
3652
+ environment: "development" | "staging" | "production";
3653
+ applicationId: string;
3654
+ credentialId: string;
3655
+ billing: {
3656
+ accountId: string;
3657
+ };
3658
+ inferenceScopes: ("inference:invoke" | "inference:models:read" | "inference:usage:read" | "inference:routing:read" | "inference:routing:write" | "inference:providers:read" | "inference:providers:write")[];
3659
+ }>;
3660
+ userId: z.ZodOptional<z.ZodBranded<z.ZodString, "DelegatedUserId">>;
3661
+ requestId: z.ZodString;
3662
+ generationId: z.ZodOptional<z.ZodString>;
3663
+ }, "strip", z.ZodTypeAny, {
3664
+ requestId: string;
3665
+ principal: {
3666
+ environment: "development" | "staging" | "production";
3667
+ applicationId: string;
3668
+ credentialId: string;
3669
+ billing: {
3670
+ accountId: string & z.BRAND<"OxyAccountId">;
3671
+ };
3672
+ inferenceScopes: ("inference:invoke" | "inference:models:read" | "inference:usage:read" | "inference:routing:read" | "inference:routing:write" | "inference:providers:read" | "inference:providers:write")[];
3673
+ };
3674
+ userId?: (string & z.BRAND<"DelegatedUserId">) | undefined;
3675
+ generationId?: string | undefined;
3676
+ }, {
3677
+ requestId: string;
3678
+ principal: {
3679
+ environment: "development" | "staging" | "production";
3680
+ applicationId: string;
3681
+ credentialId: string;
3682
+ billing: {
3683
+ accountId: string;
3684
+ };
3685
+ inferenceScopes: ("inference:invoke" | "inference:models:read" | "inference:usage:read" | "inference:routing:read" | "inference:routing:write" | "inference:providers:read" | "inference:providers:write")[];
3686
+ };
3687
+ userId?: string | undefined;
3688
+ generationId?: string | undefined;
3689
+ }>;
3690
+ target: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3691
+ kind: z.ZodLiteral<"model">;
3692
+ modelReference: z.ZodString;
3693
+ }, "strict", z.ZodTypeAny, {
3694
+ kind: "model";
3695
+ modelReference: string;
3696
+ }, {
3697
+ kind: "model";
3698
+ modelReference: string;
3699
+ }>, z.ZodObject<{
3700
+ kind: z.ZodLiteral<"routing_profile_id">;
3701
+ routingProfileId: z.ZodString;
3702
+ }, "strict", z.ZodTypeAny, {
3703
+ kind: "routing_profile_id";
3704
+ routingProfileId: string;
3705
+ }, {
3706
+ kind: "routing_profile_id";
3707
+ routingProfileId: string;
3708
+ }>]>;
3709
+ modality: z.ZodEnum<["text", "image", "audio", "video", "embedding"]>;
3710
+ input: z.ZodDiscriminatedUnion<"format", [z.ZodObject<{
3711
+ format: z.ZodLiteral<"decisions">;
3712
+ decisions: z.ZodEffects<z.ZodObject<{
3713
+ state: z.ZodString;
3714
+ instructions: z.ZodOptional<z.ZodString>;
3715
+ questions: z.ZodArray<z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3716
+ kind: z.ZodLiteral<"choice">;
3717
+ options: z.ZodArray<z.ZodString, "many">;
3718
+ id: z.ZodString;
3719
+ question: z.ZodString;
3720
+ criteria: z.ZodOptional<z.ZodString>;
3721
+ }, "strict", z.ZodTypeAny, {
3722
+ options: string[];
3723
+ kind: "choice";
3724
+ id: string;
3725
+ question: string;
3726
+ criteria?: string | undefined;
3727
+ }, {
3728
+ options: string[];
3729
+ kind: "choice";
3730
+ id: string;
3731
+ question: string;
3732
+ criteria?: string | undefined;
3733
+ }>, z.ZodObject<{
3734
+ kind: z.ZodLiteral<"score">;
3735
+ levels: z.ZodArray<z.ZodString, "many">;
3736
+ id: z.ZodString;
3737
+ question: z.ZodString;
3738
+ criteria: z.ZodOptional<z.ZodString>;
3739
+ }, "strict", z.ZodTypeAny, {
3740
+ kind: "score";
3741
+ id: string;
3742
+ question: string;
3743
+ levels: string[];
3744
+ criteria?: string | undefined;
3745
+ }, {
3746
+ kind: "score";
3747
+ id: string;
3748
+ question: string;
3749
+ levels: string[];
3750
+ criteria?: string | undefined;
3751
+ }>, z.ZodObject<{
3752
+ kind: z.ZodLiteral<"noul">;
3753
+ id: z.ZodString;
3754
+ question: z.ZodString;
3755
+ criteria: z.ZodOptional<z.ZodString>;
3756
+ }, "strict", z.ZodTypeAny, {
3757
+ kind: "noul";
3758
+ id: string;
3759
+ question: string;
3760
+ criteria?: string | undefined;
3761
+ }, {
3762
+ kind: "noul";
3763
+ id: string;
3764
+ question: string;
3765
+ criteria?: string | undefined;
3766
+ }>]>, "many">;
3767
+ effort: z.ZodOptional<z.ZodEnum<["instant", "low", "medium", "high", "xhigh"]>>;
3768
+ }, "strict", z.ZodTypeAny, {
3769
+ state: string;
3770
+ questions: ({
3771
+ options: string[];
3772
+ kind: "choice";
3773
+ id: string;
3774
+ question: string;
3775
+ criteria?: string | undefined;
3776
+ } | {
3777
+ kind: "score";
3778
+ id: string;
3779
+ question: string;
3780
+ levels: string[];
3781
+ criteria?: string | undefined;
3782
+ } | {
3783
+ kind: "noul";
3784
+ id: string;
3785
+ question: string;
3786
+ criteria?: string | undefined;
3787
+ })[];
3788
+ instructions?: string | undefined;
3789
+ effort?: "low" | "medium" | "high" | "instant" | "xhigh" | undefined;
3790
+ }, {
3791
+ state: string;
3792
+ questions: ({
3793
+ options: string[];
3794
+ kind: "choice";
3795
+ id: string;
3796
+ question: string;
3797
+ criteria?: string | undefined;
3798
+ } | {
3799
+ kind: "score";
3800
+ id: string;
3801
+ question: string;
3802
+ levels: string[];
3803
+ criteria?: string | undefined;
3804
+ } | {
3805
+ kind: "noul";
3806
+ id: string;
3807
+ question: string;
3808
+ criteria?: string | undefined;
3809
+ })[];
3810
+ instructions?: string | undefined;
3811
+ effort?: "low" | "medium" | "high" | "instant" | "xhigh" | undefined;
3812
+ }>, {
3813
+ state: string;
3814
+ questions: ({
3815
+ options: string[];
3816
+ kind: "choice";
3817
+ id: string;
3818
+ question: string;
3819
+ criteria?: string | undefined;
3820
+ } | {
3821
+ kind: "score";
3822
+ id: string;
3823
+ question: string;
3824
+ levels: string[];
3825
+ criteria?: string | undefined;
3826
+ } | {
3827
+ kind: "noul";
3828
+ id: string;
3829
+ question: string;
3830
+ criteria?: string | undefined;
3831
+ })[];
3832
+ instructions?: string | undefined;
3833
+ effort?: "low" | "medium" | "high" | "instant" | "xhigh" | undefined;
3834
+ }, {
3835
+ state: string;
3836
+ questions: ({
3837
+ options: string[];
3838
+ kind: "choice";
3839
+ id: string;
3840
+ question: string;
3841
+ criteria?: string | undefined;
3842
+ } | {
3843
+ kind: "score";
3844
+ id: string;
3845
+ question: string;
3846
+ levels: string[];
3847
+ criteria?: string | undefined;
3848
+ } | {
3849
+ kind: "noul";
3850
+ id: string;
3851
+ question: string;
3852
+ criteria?: string | undefined;
3853
+ })[];
3854
+ instructions?: string | undefined;
3855
+ effort?: "low" | "medium" | "high" | "instant" | "xhigh" | undefined;
3856
+ }>;
3857
+ }, "strict", z.ZodTypeAny, {
3858
+ decisions: {
3859
+ state: string;
3860
+ questions: ({
3861
+ options: string[];
3862
+ kind: "choice";
3863
+ id: string;
3864
+ question: string;
3865
+ criteria?: string | undefined;
3866
+ } | {
3867
+ kind: "score";
3868
+ id: string;
3869
+ question: string;
3870
+ levels: string[];
3871
+ criteria?: string | undefined;
3872
+ } | {
3873
+ kind: "noul";
3874
+ id: string;
3875
+ question: string;
3876
+ criteria?: string | undefined;
3877
+ })[];
3878
+ instructions?: string | undefined;
3879
+ effort?: "low" | "medium" | "high" | "instant" | "xhigh" | undefined;
3880
+ };
3881
+ format: "decisions";
3882
+ }, {
3883
+ decisions: {
3884
+ state: string;
3885
+ questions: ({
3886
+ options: string[];
3887
+ kind: "choice";
3888
+ id: string;
3889
+ question: string;
3890
+ criteria?: string | undefined;
3891
+ } | {
3892
+ kind: "score";
3893
+ id: string;
3894
+ question: string;
3895
+ levels: string[];
3896
+ criteria?: string | undefined;
3897
+ } | {
3898
+ kind: "noul";
3899
+ id: string;
3900
+ question: string;
3901
+ criteria?: string | undefined;
3902
+ })[];
3903
+ instructions?: string | undefined;
3904
+ effort?: "low" | "medium" | "high" | "instant" | "xhigh" | undefined;
3905
+ };
3906
+ format: "decisions";
3907
+ }>, z.ZodObject<{
3908
+ format: z.ZodLiteral<"messages">;
3909
+ messages: z.ZodArray<z.ZodEffects<z.ZodObject<{
3910
+ role: z.ZodEnum<["system", "developer", "user", "assistant", "tool"]>;
3911
+ content: z.ZodArray<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
3912
+ type: z.ZodLiteral<"text">;
3913
+ text: z.ZodString;
3914
+ }, "strict", z.ZodTypeAny, {
3915
+ type: "text";
3916
+ text: string;
3917
+ }, {
3918
+ type: "text";
3919
+ text: string;
3920
+ }>, z.ZodObject<{
3921
+ type: z.ZodLiteral<"image">;
3922
+ source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3923
+ kind: z.ZodLiteral<"url">;
3924
+ url: z.ZodString;
3925
+ }, "strict", z.ZodTypeAny, {
3926
+ kind: "url";
3927
+ url: string;
3928
+ }, {
3929
+ kind: "url";
3930
+ url: string;
3931
+ }>, z.ZodObject<{
3932
+ kind: z.ZodLiteral<"inline">;
3933
+ mediaType: z.ZodString;
3934
+ data: z.ZodString;
3935
+ }, "strict", z.ZodTypeAny, {
3936
+ kind: "inline";
3937
+ data: string;
3938
+ mediaType: string;
3939
+ }, {
3940
+ kind: "inline";
3941
+ data: string;
3942
+ mediaType: string;
3943
+ }>]>;
3944
+ /** Provider-independent hint; providers that ignore it are unaffected. */
3945
+ detail: z.ZodOptional<z.ZodEnum<["auto", "low", "high"]>>;
3946
+ }, "strict", z.ZodTypeAny, {
3947
+ type: "image";
3948
+ source: {
3949
+ kind: "url";
3950
+ url: string;
3951
+ } | {
3952
+ kind: "inline";
3953
+ data: string;
3954
+ mediaType: string;
3955
+ };
3956
+ detail?: "low" | "high" | "auto" | undefined;
3957
+ }, {
3958
+ type: "image";
3959
+ source: {
3960
+ kind: "url";
3961
+ url: string;
3962
+ } | {
3963
+ kind: "inline";
3964
+ data: string;
3965
+ mediaType: string;
3966
+ };
3967
+ detail?: "low" | "high" | "auto" | undefined;
3968
+ }>, z.ZodObject<{
3969
+ type: z.ZodLiteral<"audio">;
3970
+ source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
3971
+ kind: z.ZodLiteral<"url">;
3972
+ url: z.ZodString;
3973
+ }, "strict", z.ZodTypeAny, {
3974
+ kind: "url";
3975
+ url: string;
3976
+ }, {
3977
+ kind: "url";
3978
+ url: string;
3979
+ }>, z.ZodObject<{
3980
+ kind: z.ZodLiteral<"inline">;
3981
+ mediaType: z.ZodString;
3982
+ data: z.ZodString;
3983
+ }, "strict", z.ZodTypeAny, {
3984
+ kind: "inline";
3985
+ data: string;
3986
+ mediaType: string;
3987
+ }, {
3988
+ kind: "inline";
3989
+ data: string;
3990
+ mediaType: string;
3991
+ }>]>;
3992
+ }, "strict", z.ZodTypeAny, {
3993
+ type: "audio";
3994
+ source: {
3995
+ kind: "url";
3996
+ url: string;
3997
+ } | {
3998
+ kind: "inline";
3999
+ data: string;
4000
+ mediaType: string;
4001
+ };
4002
+ }, {
4003
+ type: "audio";
4004
+ source: {
4005
+ kind: "url";
4006
+ url: string;
4007
+ } | {
4008
+ kind: "inline";
4009
+ data: string;
4010
+ mediaType: string;
4011
+ };
4012
+ }>, z.ZodObject<{
4013
+ type: z.ZodLiteral<"file">;
4014
+ source: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
4015
+ kind: z.ZodLiteral<"url">;
4016
+ url: z.ZodString;
4017
+ }, "strict", z.ZodTypeAny, {
4018
+ kind: "url";
4019
+ url: string;
4020
+ }, {
4021
+ kind: "url";
4022
+ url: string;
4023
+ }>, z.ZodObject<{
4024
+ kind: z.ZodLiteral<"inline">;
4025
+ mediaType: z.ZodString;
4026
+ data: z.ZodString;
4027
+ }, "strict", z.ZodTypeAny, {
4028
+ kind: "inline";
4029
+ data: string;
4030
+ mediaType: string;
4031
+ }, {
4032
+ kind: "inline";
4033
+ data: string;
4034
+ mediaType: string;
4035
+ }>]>;
4036
+ filename: z.ZodOptional<z.ZodString>;
4037
+ }, "strict", z.ZodTypeAny, {
4038
+ type: "file";
4039
+ source: {
4040
+ kind: "url";
4041
+ url: string;
4042
+ } | {
4043
+ kind: "inline";
4044
+ data: string;
4045
+ mediaType: string;
4046
+ };
4047
+ filename?: string | undefined;
4048
+ }, {
4049
+ type: "file";
4050
+ source: {
4051
+ kind: "url";
4052
+ url: string;
4053
+ } | {
4054
+ kind: "inline";
4055
+ data: string;
4056
+ mediaType: string;
4057
+ };
4058
+ filename?: string | undefined;
4059
+ }>, z.ZodObject<{
4060
+ type: z.ZodLiteral<"refusal">;
4061
+ text: z.ZodString;
4062
+ }, "strict", z.ZodTypeAny, {
4063
+ type: "refusal";
4064
+ text: string;
4065
+ }, {
4066
+ type: "refusal";
4067
+ text: string;
4068
+ }>]>, "many">;
4069
+ /** Participant name, where the dialect supports naming participants. */
4070
+ name: z.ZodOptional<z.ZodString>;
4071
+ /** The tool call this message answers. Required on, and only on, `tool`. */
4072
+ toolCallId: z.ZodOptional<z.ZodString>;
4073
+ /** Tool calls the assistant made. Only on `assistant`. */
4074
+ toolCalls: z.ZodOptional<z.ZodArray<z.ZodObject<{
4075
+ id: z.ZodString;
4076
+ name: z.ZodString;
4077
+ arguments: z.ZodString;
4078
+ }, "strict", z.ZodTypeAny, {
4079
+ name: string;
4080
+ id: string;
4081
+ arguments: string;
4082
+ }, {
4083
+ name: string;
4084
+ id: string;
4085
+ arguments: string;
4086
+ }>, "many">>;
4087
+ }, "strict", z.ZodTypeAny, {
4088
+ content: ({
4089
+ type: "text";
4090
+ text: string;
4091
+ } | {
4092
+ type: "image";
4093
+ source: {
4094
+ kind: "url";
4095
+ url: string;
4096
+ } | {
4097
+ kind: "inline";
4098
+ data: string;
4099
+ mediaType: string;
4100
+ };
4101
+ detail?: "low" | "high" | "auto" | undefined;
4102
+ } | {
4103
+ type: "audio";
4104
+ source: {
4105
+ kind: "url";
4106
+ url: string;
4107
+ } | {
4108
+ kind: "inline";
4109
+ data: string;
4110
+ mediaType: string;
4111
+ };
4112
+ } | {
4113
+ type: "file";
4114
+ source: {
4115
+ kind: "url";
4116
+ url: string;
4117
+ } | {
4118
+ kind: "inline";
4119
+ data: string;
4120
+ mediaType: string;
4121
+ };
4122
+ filename?: string | undefined;
4123
+ } | {
4124
+ type: "refusal";
4125
+ text: string;
4126
+ })[];
4127
+ role: "system" | "tool" | "user" | "developer" | "assistant";
4128
+ name?: string | undefined;
4129
+ toolCallId?: string | undefined;
4130
+ toolCalls?: {
4131
+ name: string;
4132
+ id: string;
4133
+ arguments: string;
4134
+ }[] | undefined;
4135
+ }, {
4136
+ content: ({
4137
+ type: "text";
4138
+ text: string;
4139
+ } | {
4140
+ type: "image";
4141
+ source: {
4142
+ kind: "url";
4143
+ url: string;
4144
+ } | {
4145
+ kind: "inline";
4146
+ data: string;
4147
+ mediaType: string;
4148
+ };
4149
+ detail?: "low" | "high" | "auto" | undefined;
4150
+ } | {
4151
+ type: "audio";
4152
+ source: {
4153
+ kind: "url";
4154
+ url: string;
4155
+ } | {
4156
+ kind: "inline";
4157
+ data: string;
4158
+ mediaType: string;
4159
+ };
4160
+ } | {
4161
+ type: "file";
4162
+ source: {
4163
+ kind: "url";
4164
+ url: string;
4165
+ } | {
4166
+ kind: "inline";
4167
+ data: string;
4168
+ mediaType: string;
4169
+ };
4170
+ filename?: string | undefined;
4171
+ } | {
4172
+ type: "refusal";
4173
+ text: string;
4174
+ })[];
4175
+ role: "system" | "tool" | "user" | "developer" | "assistant";
4176
+ name?: string | undefined;
4177
+ toolCallId?: string | undefined;
4178
+ toolCalls?: {
4179
+ name: string;
4180
+ id: string;
4181
+ arguments: string;
4182
+ }[] | undefined;
4183
+ }>, {
4184
+ content: ({
4185
+ type: "text";
4186
+ text: string;
4187
+ } | {
4188
+ type: "image";
4189
+ source: {
4190
+ kind: "url";
4191
+ url: string;
4192
+ } | {
4193
+ kind: "inline";
4194
+ data: string;
4195
+ mediaType: string;
4196
+ };
4197
+ detail?: "low" | "high" | "auto" | undefined;
4198
+ } | {
4199
+ type: "audio";
4200
+ source: {
4201
+ kind: "url";
4202
+ url: string;
4203
+ } | {
4204
+ kind: "inline";
4205
+ data: string;
4206
+ mediaType: string;
4207
+ };
4208
+ } | {
4209
+ type: "file";
4210
+ source: {
4211
+ kind: "url";
4212
+ url: string;
4213
+ } | {
4214
+ kind: "inline";
4215
+ data: string;
4216
+ mediaType: string;
4217
+ };
4218
+ filename?: string | undefined;
4219
+ } | {
4220
+ type: "refusal";
4221
+ text: string;
4222
+ })[];
4223
+ role: "system" | "tool" | "user" | "developer" | "assistant";
4224
+ name?: string | undefined;
4225
+ toolCallId?: string | undefined;
4226
+ toolCalls?: {
4227
+ name: string;
4228
+ id: string;
4229
+ arguments: string;
4230
+ }[] | undefined;
4231
+ }, {
4232
+ content: ({
4233
+ type: "text";
4234
+ text: string;
4235
+ } | {
4236
+ type: "image";
4237
+ source: {
4238
+ kind: "url";
4239
+ url: string;
4240
+ } | {
4241
+ kind: "inline";
4242
+ data: string;
4243
+ mediaType: string;
4244
+ };
4245
+ detail?: "low" | "high" | "auto" | undefined;
4246
+ } | {
4247
+ type: "audio";
4248
+ source: {
4249
+ kind: "url";
4250
+ url: string;
4251
+ } | {
4252
+ kind: "inline";
4253
+ data: string;
4254
+ mediaType: string;
4255
+ };
4256
+ } | {
4257
+ type: "file";
4258
+ source: {
4259
+ kind: "url";
4260
+ url: string;
4261
+ } | {
4262
+ kind: "inline";
4263
+ data: string;
4264
+ mediaType: string;
4265
+ };
4266
+ filename?: string | undefined;
4267
+ } | {
4268
+ type: "refusal";
4269
+ text: string;
4270
+ })[];
4271
+ role: "system" | "tool" | "user" | "developer" | "assistant";
4272
+ name?: string | undefined;
4273
+ toolCallId?: string | undefined;
4274
+ toolCalls?: {
4275
+ name: string;
4276
+ id: string;
4277
+ arguments: string;
4278
+ }[] | undefined;
4279
+ }>, "many">;
4280
+ }, "strict", z.ZodTypeAny, {
4281
+ format: "messages";
4282
+ messages: {
4283
+ content: ({
4284
+ type: "text";
4285
+ text: string;
4286
+ } | {
4287
+ type: "image";
4288
+ source: {
4289
+ kind: "url";
4290
+ url: string;
4291
+ } | {
4292
+ kind: "inline";
4293
+ data: string;
4294
+ mediaType: string;
4295
+ };
4296
+ detail?: "low" | "high" | "auto" | undefined;
4297
+ } | {
4298
+ type: "audio";
4299
+ source: {
4300
+ kind: "url";
4301
+ url: string;
4302
+ } | {
4303
+ kind: "inline";
4304
+ data: string;
4305
+ mediaType: string;
4306
+ };
4307
+ } | {
4308
+ type: "file";
4309
+ source: {
4310
+ kind: "url";
4311
+ url: string;
4312
+ } | {
4313
+ kind: "inline";
4314
+ data: string;
4315
+ mediaType: string;
4316
+ };
4317
+ filename?: string | undefined;
4318
+ } | {
4319
+ type: "refusal";
4320
+ text: string;
4321
+ })[];
4322
+ role: "system" | "tool" | "user" | "developer" | "assistant";
4323
+ name?: string | undefined;
4324
+ toolCallId?: string | undefined;
4325
+ toolCalls?: {
4326
+ name: string;
4327
+ id: string;
4328
+ arguments: string;
4329
+ }[] | undefined;
4330
+ }[];
4331
+ }, {
4332
+ format: "messages";
4333
+ messages: {
4334
+ content: ({
4335
+ type: "text";
4336
+ text: string;
4337
+ } | {
4338
+ type: "image";
4339
+ source: {
4340
+ kind: "url";
4341
+ url: string;
4342
+ } | {
4343
+ kind: "inline";
4344
+ data: string;
4345
+ mediaType: string;
4346
+ };
4347
+ detail?: "low" | "high" | "auto" | undefined;
4348
+ } | {
4349
+ type: "audio";
4350
+ source: {
4351
+ kind: "url";
4352
+ url: string;
4353
+ } | {
4354
+ kind: "inline";
4355
+ data: string;
4356
+ mediaType: string;
4357
+ };
4358
+ } | {
4359
+ type: "file";
4360
+ source: {
4361
+ kind: "url";
4362
+ url: string;
4363
+ } | {
4364
+ kind: "inline";
4365
+ data: string;
4366
+ mediaType: string;
4367
+ };
4368
+ filename?: string | undefined;
4369
+ } | {
4370
+ type: "refusal";
4371
+ text: string;
4372
+ })[];
4373
+ role: "system" | "tool" | "user" | "developer" | "assistant";
4374
+ name?: string | undefined;
4375
+ toolCallId?: string | undefined;
4376
+ toolCalls?: {
4377
+ name: string;
4378
+ id: string;
4379
+ arguments: string;
4380
+ }[] | undefined;
4381
+ }[];
4382
+ }>, z.ZodObject<{
4383
+ format: z.ZodLiteral<"text">;
4384
+ text: z.ZodString;
4385
+ }, "strict", z.ZodTypeAny, {
4386
+ text: string;
4387
+ format: "text";
4388
+ }, {
4389
+ text: string;
4390
+ format: "text";
4391
+ }>, z.ZodObject<{
4392
+ format: z.ZodLiteral<"text_batch">;
4393
+ texts: z.ZodArray<z.ZodString, "many">;
4394
+ }, "strict", z.ZodTypeAny, {
4395
+ format: "text_batch";
4396
+ texts: string[];
4397
+ }, {
4398
+ format: "text_batch";
4399
+ texts: string[];
4400
+ }>]>;
4401
+ stream: z.ZodBoolean;
4402
+ maxOutputTokens: z.ZodOptional<z.ZodNumber>;
4403
+ sampling: z.ZodObject<{
4404
+ temperature: z.ZodOptional<z.ZodNumber>;
4405
+ topP: z.ZodOptional<z.ZodNumber>;
4406
+ topK: z.ZodOptional<z.ZodNumber>;
4407
+ frequencyPenalty: z.ZodOptional<z.ZodNumber>;
4408
+ presencePenalty: z.ZodOptional<z.ZodNumber>;
4409
+ /** A seed makes a request reproducible on providers that honour one. */
4410
+ seed: z.ZodOptional<z.ZodNumber>;
4411
+ stopSequences: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
4412
+ }, "strict", z.ZodTypeAny, {
4413
+ seed?: number | undefined;
4414
+ temperature?: number | undefined;
4415
+ topP?: number | undefined;
4416
+ topK?: number | undefined;
4417
+ frequencyPenalty?: number | undefined;
4418
+ presencePenalty?: number | undefined;
4419
+ stopSequences?: string[] | undefined;
4420
+ }, {
4421
+ seed?: number | undefined;
4422
+ temperature?: number | undefined;
4423
+ topP?: number | undefined;
4424
+ topK?: number | undefined;
4425
+ frequencyPenalty?: number | undefined;
4426
+ presencePenalty?: number | undefined;
4427
+ stopSequences?: string[] | undefined;
4428
+ }>;
4429
+ reasoning: z.ZodOptional<z.ZodObject<{
4430
+ effort: z.ZodEnum<["low", "medium", "high"]>;
4431
+ }, "strict", z.ZodTypeAny, {
4432
+ effort: "low" | "medium" | "high";
4433
+ }, {
4434
+ effort: "low" | "medium" | "high";
4435
+ }>>;
4436
+ speech: z.ZodOptional<z.ZodObject<{
4437
+ voice: z.ZodString;
4438
+ responseFormat: z.ZodEnum<["mp3", "opus", "aac", "flac", "wav", "pcm"]>;
4439
+ speed: z.ZodOptional<z.ZodNumber>;
4440
+ }, "strict", z.ZodTypeAny, {
4441
+ voice: string;
4442
+ responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
4443
+ speed?: number | undefined;
4444
+ }, {
4445
+ voice: string;
4446
+ responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
4447
+ speed?: number | undefined;
4448
+ }>>;
4449
+ audioOutput: z.ZodOptional<z.ZodObject<{
4450
+ voice: z.ZodString;
4451
+ format: z.ZodEnum<["wav", "mp3", "flac", "opus", "pcm"]>;
4452
+ }, "strict", z.ZodTypeAny, {
4453
+ format: "mp3" | "opus" | "flac" | "wav" | "pcm";
4454
+ voice: string;
4455
+ }, {
4456
+ format: "mp3" | "opus" | "flac" | "wav" | "pcm";
4457
+ voice: string;
4458
+ }>>;
4459
+ tools: z.ZodDefault<z.ZodArray<z.ZodObject<{
4460
+ type: z.ZodLiteral<"function">;
4461
+ name: z.ZodString;
4462
+ description: z.ZodOptional<z.ZodString>;
4463
+ parameters: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4464
+ /** Ask the provider to enforce the schema, where it supports enforcement. */
4465
+ strict: z.ZodOptional<z.ZodBoolean>;
4466
+ }, "strict", z.ZodTypeAny, {
4467
+ type: "function";
4468
+ name: string;
4469
+ parameters: Record<string, unknown>;
4470
+ strict?: boolean | undefined;
4471
+ description?: string | undefined;
4472
+ }, {
4473
+ type: "function";
4474
+ name: string;
4475
+ parameters: Record<string, unknown>;
4476
+ strict?: boolean | undefined;
4477
+ description?: string | undefined;
4478
+ }>, "many">>;
4479
+ toolChoice: z.ZodOptional<z.ZodUnion<[z.ZodEnum<["auto", "none", "required"]>, z.ZodObject<{
4480
+ type: z.ZodLiteral<"function">;
4481
+ name: z.ZodString;
4482
+ }, "strict", z.ZodTypeAny, {
4483
+ type: "function";
4484
+ name: string;
4485
+ }, {
4486
+ type: "function";
4487
+ name: string;
4488
+ }>]>>;
4489
+ responseFormat: z.ZodOptional<z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
4490
+ type: z.ZodLiteral<"text">;
4491
+ }, "strict", z.ZodTypeAny, {
4492
+ type: "text";
4493
+ }, {
4494
+ type: "text";
4495
+ }>, z.ZodObject<{
4496
+ type: z.ZodLiteral<"json_object">;
4497
+ }, "strict", z.ZodTypeAny, {
4498
+ type: "json_object";
4499
+ }, {
4500
+ type: "json_object";
4501
+ }>, z.ZodObject<{
4502
+ type: z.ZodLiteral<"json_schema">;
4503
+ name: z.ZodString;
4504
+ schema: z.ZodRecord<z.ZodString, z.ZodUnknown>;
4505
+ strict: z.ZodBoolean;
4506
+ }, "strict", z.ZodTypeAny, {
4507
+ type: "json_schema";
4508
+ strict: boolean;
4509
+ schema: Record<string, unknown>;
4510
+ name: string;
4511
+ }, {
4512
+ type: "json_schema";
4513
+ strict: boolean;
4514
+ schema: Record<string, unknown>;
4515
+ name: string;
4516
+ }>]>>;
4517
+ client: z.ZodObject<{
4518
+ /** The public dialect the customer called. The response is rendered in it. */
4519
+ apiFormat: z.ZodEnum<["responses", "chat_completions", "embeddings", "decisions", "images_generations", "audio_transcriptions", "audio_speech", "rerank", "batches"]>;
4520
+ /** The public path, e.g. `/v1/responses`. */
4521
+ endpoint: z.ZodString;
4522
+ /** The customer's own correlation id, when they sent one. */
4523
+ clientRequestId: z.ZodOptional<z.ZodString>;
4524
+ receivedAt: z.ZodString;
4525
+ labels: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodString>>;
4526
+ }, "strict", z.ZodTypeAny, {
4527
+ receivedAt: string;
4528
+ apiFormat: "embeddings" | "responses" | "chat_completions" | "decisions" | "images_generations" | "audio_transcriptions" | "audio_speech" | "rerank" | "batches";
4529
+ endpoint: string;
4530
+ clientRequestId?: string | undefined;
4531
+ labels?: Record<string, string> | undefined;
4532
+ }, {
4533
+ receivedAt: string;
4534
+ apiFormat: "embeddings" | "responses" | "chat_completions" | "decisions" | "images_generations" | "audio_transcriptions" | "audio_speech" | "rerank" | "batches";
4535
+ endpoint: string;
4536
+ clientRequestId?: string | undefined;
4537
+ labels?: Record<string, string> | undefined;
4538
+ }>;
4539
+ idempotencyKey: z.ZodOptional<z.ZodString>;
4540
+ routingPolicy: z.ZodObject<{
4541
+ routingPolicyId: z.ZodString;
4542
+ policyVersion: z.ZodNumber;
4543
+ }, "strict", z.ZodTypeAny, {
4544
+ routingPolicyId: string;
4545
+ policyVersion: number;
4546
+ }, {
4547
+ routingPolicyId: string;
4548
+ policyVersion: number;
4549
+ }>;
4550
+ authorizedRoutes: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"substitution", [z.ZodObject<{
4551
+ deploymentId: z.ZodString;
4552
+ modelReference: z.ZodString;
4553
+ provider: z.ZodString;
4554
+ regions: z.ZodArray<z.ZodString, "many">;
4555
+ customerProviderCredential: z.ZodOptional<z.ZodObject<{
4556
+ credentialHandle: z.ZodString;
4557
+ credentialRevision: z.ZodNumber;
4558
+ ownerAccountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
4559
+ connectionId: z.ZodString;
4560
+ environment: z.ZodEnum<["development", "staging", "production"]>;
4561
+ }, "strict", z.ZodTypeAny, {
4562
+ environment: "development" | "staging" | "production";
4563
+ ownerAccountId: string & z.BRAND<"OxyAccountId">;
4564
+ connectionId: string;
4565
+ credentialHandle: string;
4566
+ credentialRevision: number;
4567
+ }, {
4568
+ environment: "development" | "staging" | "production";
4569
+ ownerAccountId: string;
4570
+ connectionId: string;
4571
+ credentialHandle: string;
4572
+ credentialRevision: number;
4573
+ }>>;
4574
+ substitution: z.ZodLiteral<"same_model">;
4575
+ }, "strict", z.ZodTypeAny, {
4576
+ provider: string;
4577
+ modelReference: string;
4578
+ deploymentId: string;
4579
+ regions: string[];
4580
+ substitution: "same_model";
4581
+ customerProviderCredential?: {
4582
+ environment: "development" | "staging" | "production";
4583
+ ownerAccountId: string & z.BRAND<"OxyAccountId">;
4584
+ connectionId: string;
4585
+ credentialHandle: string;
4586
+ credentialRevision: number;
4587
+ } | undefined;
4588
+ }, {
4589
+ provider: string;
4590
+ modelReference: string;
4591
+ deploymentId: string;
4592
+ regions: string[];
4593
+ substitution: "same_model";
4594
+ customerProviderCredential?: {
4595
+ environment: "development" | "staging" | "production";
4596
+ ownerAccountId: string;
4597
+ connectionId: string;
4598
+ credentialHandle: string;
4599
+ credentialRevision: number;
4600
+ } | undefined;
4601
+ }>, z.ZodObject<{
4602
+ authorizedByPolicy: z.ZodLiteral<true>;
4603
+ deploymentId: z.ZodString;
4604
+ modelReference: z.ZodString;
4605
+ provider: z.ZodString;
4606
+ regions: z.ZodArray<z.ZodString, "many">;
4607
+ customerProviderCredential: z.ZodOptional<z.ZodObject<{
4608
+ credentialHandle: z.ZodString;
4609
+ credentialRevision: z.ZodNumber;
4610
+ ownerAccountId: z.ZodBranded<z.ZodString, "OxyAccountId">;
4611
+ connectionId: z.ZodString;
4612
+ environment: z.ZodEnum<["development", "staging", "production"]>;
4613
+ }, "strict", z.ZodTypeAny, {
4614
+ environment: "development" | "staging" | "production";
4615
+ ownerAccountId: string & z.BRAND<"OxyAccountId">;
4616
+ connectionId: string;
4617
+ credentialHandle: string;
4618
+ credentialRevision: number;
4619
+ }, {
4620
+ environment: "development" | "staging" | "production";
4621
+ ownerAccountId: string;
4622
+ connectionId: string;
4623
+ credentialHandle: string;
4624
+ credentialRevision: number;
4625
+ }>>;
4626
+ substitution: z.ZodLiteral<"cross_model">;
4627
+ }, "strict", z.ZodTypeAny, {
4628
+ provider: string;
4629
+ modelReference: string;
4630
+ deploymentId: string;
4631
+ regions: string[];
4632
+ substitution: "cross_model";
4633
+ authorizedByPolicy: true;
4634
+ customerProviderCredential?: {
4635
+ environment: "development" | "staging" | "production";
4636
+ ownerAccountId: string & z.BRAND<"OxyAccountId">;
4637
+ connectionId: string;
4638
+ credentialHandle: string;
4639
+ credentialRevision: number;
4640
+ } | undefined;
4641
+ }, {
4642
+ provider: string;
4643
+ modelReference: string;
4644
+ deploymentId: string;
4645
+ regions: string[];
4646
+ substitution: "cross_model";
4647
+ authorizedByPolicy: true;
4648
+ customerProviderCredential?: {
4649
+ environment: "development" | "staging" | "production";
4650
+ ownerAccountId: string;
4651
+ connectionId: string;
4652
+ credentialHandle: string;
4653
+ credentialRevision: number;
4654
+ } | undefined;
4655
+ }>]>, {
4656
+ provider: string;
4657
+ modelReference: string;
4658
+ deploymentId: string;
4659
+ regions: string[];
4660
+ substitution: "same_model";
4661
+ customerProviderCredential?: {
4662
+ environment: "development" | "staging" | "production";
4663
+ ownerAccountId: string & z.BRAND<"OxyAccountId">;
4664
+ connectionId: string;
4665
+ credentialHandle: string;
4666
+ credentialRevision: number;
4667
+ } | undefined;
4668
+ } | {
4669
+ provider: string;
4670
+ modelReference: string;
4671
+ deploymentId: string;
4672
+ regions: string[];
4673
+ substitution: "cross_model";
4674
+ authorizedByPolicy: true;
4675
+ customerProviderCredential?: {
4676
+ environment: "development" | "staging" | "production";
4677
+ ownerAccountId: string & z.BRAND<"OxyAccountId">;
4678
+ connectionId: string;
4679
+ credentialHandle: string;
4680
+ credentialRevision: number;
4681
+ } | undefined;
4682
+ }, {
4683
+ provider: string;
4684
+ modelReference: string;
4685
+ deploymentId: string;
4686
+ regions: string[];
4687
+ substitution: "same_model";
4688
+ customerProviderCredential?: {
4689
+ environment: "development" | "staging" | "production";
4690
+ ownerAccountId: string;
4691
+ connectionId: string;
4692
+ credentialHandle: string;
4693
+ credentialRevision: number;
4694
+ } | undefined;
4695
+ } | {
4696
+ provider: string;
4697
+ modelReference: string;
4698
+ deploymentId: string;
4699
+ regions: string[];
4700
+ substitution: "cross_model";
4701
+ authorizedByPolicy: true;
4702
+ customerProviderCredential?: {
4703
+ environment: "development" | "staging" | "production";
4704
+ ownerAccountId: string;
4705
+ connectionId: string;
4706
+ credentialHandle: string;
4707
+ credentialRevision: number;
4708
+ } | undefined;
4709
+ }>, "many">>;
4710
+ } & {
4711
+ schemaVersion: z.ZodLiteral<3>;
4712
+ scopedExecution: z.ZodObject<{
4713
+ permitId: z.ZodString;
4714
+ idempotencyKey: z.ZodString;
4715
+ fixtureSha256: z.ZodString;
4716
+ expiresAt: z.ZodString;
4717
+ principal: z.ZodObject<{
4718
+ accountId: z.ZodString;
4719
+ applicationId: z.ZodString;
4720
+ credentialId: z.ZodString;
4721
+ environment: z.ZodEnum<["development", "staging", "production"]>;
4722
+ }, "strict", z.ZodTypeAny, {
4723
+ environment: "development" | "staging" | "production";
4724
+ accountId: string;
4725
+ applicationId: string;
4726
+ credentialId: string;
4727
+ }, {
4728
+ environment: "development" | "staging" | "production";
4729
+ accountId: string;
4730
+ applicationId: string;
4731
+ credentialId: string;
4732
+ }>;
4733
+ policy: z.ZodObject<{
4734
+ routingPolicyId: z.ZodString;
4735
+ policyVersion: z.ZodNumber;
4736
+ }, "strict", z.ZodTypeAny, {
4737
+ routingPolicyId: string;
4738
+ policyVersion: number;
4739
+ }, {
4740
+ routingPolicyId: string;
4741
+ policyVersion: number;
4742
+ }>;
4743
+ deploymentId: z.ZodString;
4744
+ provider: z.ZodString;
4745
+ keyId: z.ZodString;
4746
+ modelReference: z.ZodEffects<z.ZodString, string, string>;
4747
+ upstreamModelId: z.ZodString;
4748
+ priceVersionId: z.ZodString;
4749
+ providerRateCardVersionId: z.ZodString;
4750
+ providerSourceVersion: z.ZodString;
4751
+ maxCostUsd: z.ZodEffects<z.ZodBranded<z.ZodString, "ExactDecimal">, string & z.BRAND<"ExactDecimal">, string>;
4752
+ } & {
4753
+ requestId: z.ZodString;
4754
+ snapshotId: z.ZodString;
4755
+ catalogueEvidenceHash: z.ZodString;
4756
+ }, "strict", z.ZodTypeAny, {
4757
+ expiresAt: string;
4758
+ requestId: string;
4759
+ keyId: string;
4760
+ idempotencyKey: string;
4761
+ principal: {
4762
+ environment: "development" | "staging" | "production";
4763
+ accountId: string;
4764
+ applicationId: string;
4765
+ credentialId: string;
4766
+ };
4767
+ provider: string;
4768
+ priceVersionId: string;
4769
+ modelReference: string;
4770
+ permitId: string;
4771
+ fixtureSha256: string;
4772
+ policy: {
4773
+ routingPolicyId: string;
4774
+ policyVersion: number;
4775
+ };
4776
+ deploymentId: string;
4777
+ upstreamModelId: string;
4778
+ providerRateCardVersionId: string;
4779
+ providerSourceVersion: string;
4780
+ maxCostUsd: string & z.BRAND<"ExactDecimal">;
4781
+ snapshotId: string;
4782
+ catalogueEvidenceHash: string;
4783
+ }, {
4784
+ expiresAt: string;
4785
+ requestId: string;
4786
+ keyId: string;
4787
+ idempotencyKey: string;
4788
+ principal: {
4789
+ environment: "development" | "staging" | "production";
4790
+ accountId: string;
4791
+ applicationId: string;
4792
+ credentialId: string;
4793
+ };
4794
+ provider: string;
4795
+ priceVersionId: string;
4796
+ modelReference: string;
4797
+ permitId: string;
4798
+ fixtureSha256: string;
4799
+ policy: {
4800
+ routingPolicyId: string;
4801
+ policyVersion: number;
4802
+ };
4803
+ deploymentId: string;
4804
+ upstreamModelId: string;
4805
+ providerRateCardVersionId: string;
4806
+ providerSourceVersion: string;
4807
+ maxCostUsd: string;
4808
+ snapshotId: string;
4809
+ catalogueEvidenceHash: string;
4810
+ }>;
4811
+ }, "strip", z.ZodTypeAny, {
4812
+ schemaVersion: 3;
4813
+ tools: {
4814
+ type: "function";
4815
+ name: string;
4816
+ parameters: Record<string, unknown>;
4817
+ strict?: boolean | undefined;
4818
+ description?: string | undefined;
4819
+ }[];
4820
+ attribution: {
4821
+ requestId: string;
4822
+ principal: {
4823
+ environment: "development" | "staging" | "production";
4824
+ applicationId: string;
4825
+ credentialId: string;
4826
+ billing: {
4827
+ accountId: string & z.BRAND<"OxyAccountId">;
4828
+ };
4829
+ inferenceScopes: ("inference:invoke" | "inference:models:read" | "inference:usage:read" | "inference:routing:read" | "inference:routing:write" | "inference:providers:read" | "inference:providers:write")[];
4830
+ };
4831
+ userId?: (string & z.BRAND<"DelegatedUserId">) | undefined;
4832
+ generationId?: string | undefined;
4833
+ };
4834
+ client: {
4835
+ receivedAt: string;
4836
+ apiFormat: "embeddings" | "responses" | "chat_completions" | "decisions" | "images_generations" | "audio_transcriptions" | "audio_speech" | "rerank" | "batches";
4837
+ endpoint: string;
4838
+ clientRequestId?: string | undefined;
4839
+ labels?: Record<string, string> | undefined;
4840
+ };
4841
+ scopedExecution: {
4842
+ expiresAt: string;
4843
+ requestId: string;
4844
+ keyId: string;
4845
+ idempotencyKey: string;
4846
+ principal: {
4847
+ environment: "development" | "staging" | "production";
4848
+ accountId: string;
4849
+ applicationId: string;
4850
+ credentialId: string;
4851
+ };
4852
+ provider: string;
4853
+ priceVersionId: string;
4854
+ modelReference: string;
4855
+ permitId: string;
4856
+ fixtureSha256: string;
4857
+ policy: {
4858
+ routingPolicyId: string;
4859
+ policyVersion: number;
4860
+ };
4861
+ deploymentId: string;
4862
+ upstreamModelId: string;
4863
+ providerRateCardVersionId: string;
4864
+ providerSourceVersion: string;
4865
+ maxCostUsd: string & z.BRAND<"ExactDecimal">;
4866
+ snapshotId: string;
4867
+ catalogueEvidenceHash: string;
4868
+ };
4869
+ routingPolicy: {
4870
+ routingPolicyId: string;
4871
+ policyVersion: number;
4872
+ };
4873
+ target: {
4874
+ kind: "model";
4875
+ modelReference: string;
4876
+ } | {
4877
+ kind: "routing_profile_id";
4878
+ routingProfileId: string;
4879
+ };
4880
+ modality: "image" | "embedding" | "text" | "audio" | "video";
4881
+ input: {
4882
+ decisions: {
4883
+ state: string;
4884
+ questions: ({
4885
+ options: string[];
4886
+ kind: "choice";
4887
+ id: string;
4888
+ question: string;
4889
+ criteria?: string | undefined;
4890
+ } | {
4891
+ kind: "score";
4892
+ id: string;
4893
+ question: string;
4894
+ levels: string[];
4895
+ criteria?: string | undefined;
4896
+ } | {
4897
+ kind: "noul";
4898
+ id: string;
4899
+ question: string;
4900
+ criteria?: string | undefined;
4901
+ })[];
4902
+ instructions?: string | undefined;
4903
+ effort?: "low" | "medium" | "high" | "instant" | "xhigh" | undefined;
4904
+ };
4905
+ format: "decisions";
4906
+ } | {
4907
+ format: "messages";
4908
+ messages: {
4909
+ content: ({
4910
+ type: "text";
4911
+ text: string;
4912
+ } | {
4913
+ type: "image";
4914
+ source: {
4915
+ kind: "url";
4916
+ url: string;
4917
+ } | {
4918
+ kind: "inline";
4919
+ data: string;
4920
+ mediaType: string;
4921
+ };
4922
+ detail?: "low" | "high" | "auto" | undefined;
4923
+ } | {
4924
+ type: "audio";
4925
+ source: {
4926
+ kind: "url";
4927
+ url: string;
4928
+ } | {
4929
+ kind: "inline";
4930
+ data: string;
4931
+ mediaType: string;
4932
+ };
4933
+ } | {
4934
+ type: "file";
4935
+ source: {
4936
+ kind: "url";
4937
+ url: string;
4938
+ } | {
4939
+ kind: "inline";
4940
+ data: string;
4941
+ mediaType: string;
4942
+ };
4943
+ filename?: string | undefined;
4944
+ } | {
4945
+ type: "refusal";
4946
+ text: string;
4947
+ })[];
4948
+ role: "system" | "tool" | "user" | "developer" | "assistant";
4949
+ name?: string | undefined;
4950
+ toolCallId?: string | undefined;
4951
+ toolCalls?: {
4952
+ name: string;
4953
+ id: string;
4954
+ arguments: string;
4955
+ }[] | undefined;
4956
+ }[];
4957
+ } | {
4958
+ text: string;
4959
+ format: "text";
4960
+ } | {
4961
+ format: "text_batch";
4962
+ texts: string[];
4963
+ };
4964
+ stream: boolean;
4965
+ sampling: {
4966
+ seed?: number | undefined;
4967
+ temperature?: number | undefined;
4968
+ topP?: number | undefined;
4969
+ topK?: number | undefined;
4970
+ frequencyPenalty?: number | undefined;
4971
+ presencePenalty?: number | undefined;
4972
+ stopSequences?: string[] | undefined;
4973
+ };
4974
+ idempotencyKey?: string | undefined;
4975
+ reasoning?: {
4976
+ effort: "low" | "medium" | "high";
4977
+ } | undefined;
4978
+ maxOutputTokens?: number | undefined;
4979
+ responseFormat?: {
4980
+ type: "text";
4981
+ } | {
4982
+ type: "json_object";
4983
+ } | {
4984
+ type: "json_schema";
4985
+ strict: boolean;
4986
+ schema: Record<string, unknown>;
4987
+ name: string;
4988
+ } | undefined;
4989
+ speech?: {
4990
+ voice: string;
4991
+ responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
4992
+ speed?: number | undefined;
4993
+ } | undefined;
4994
+ audioOutput?: {
4995
+ format: "mp3" | "opus" | "flac" | "wav" | "pcm";
4996
+ voice: string;
4997
+ } | undefined;
4998
+ toolChoice?: "none" | "required" | "auto" | {
4999
+ type: "function";
5000
+ name: string;
5001
+ } | undefined;
5002
+ authorizedRoutes?: ({
5003
+ provider: string;
5004
+ modelReference: string;
5005
+ deploymentId: string;
5006
+ regions: string[];
5007
+ substitution: "same_model";
5008
+ customerProviderCredential?: {
5009
+ environment: "development" | "staging" | "production";
5010
+ ownerAccountId: string & z.BRAND<"OxyAccountId">;
5011
+ connectionId: string;
5012
+ credentialHandle: string;
5013
+ credentialRevision: number;
5014
+ } | undefined;
5015
+ } | {
5016
+ provider: string;
5017
+ modelReference: string;
5018
+ deploymentId: string;
5019
+ regions: string[];
5020
+ substitution: "cross_model";
5021
+ authorizedByPolicy: true;
5022
+ customerProviderCredential?: {
5023
+ environment: "development" | "staging" | "production";
5024
+ ownerAccountId: string & z.BRAND<"OxyAccountId">;
5025
+ connectionId: string;
5026
+ credentialHandle: string;
5027
+ credentialRevision: number;
5028
+ } | undefined;
5029
+ })[] | undefined;
5030
+ }, {
5031
+ schemaVersion: 3;
5032
+ attribution: {
5033
+ requestId: string;
5034
+ principal: {
5035
+ environment: "development" | "staging" | "production";
5036
+ applicationId: string;
5037
+ credentialId: string;
5038
+ billing: {
5039
+ accountId: string;
5040
+ };
5041
+ inferenceScopes: ("inference:invoke" | "inference:models:read" | "inference:usage:read" | "inference:routing:read" | "inference:routing:write" | "inference:providers:read" | "inference:providers:write")[];
5042
+ };
5043
+ userId?: string | undefined;
5044
+ generationId?: string | undefined;
5045
+ };
5046
+ client: {
5047
+ receivedAt: string;
5048
+ apiFormat: "embeddings" | "responses" | "chat_completions" | "decisions" | "images_generations" | "audio_transcriptions" | "audio_speech" | "rerank" | "batches";
5049
+ endpoint: string;
5050
+ clientRequestId?: string | undefined;
5051
+ labels?: Record<string, string> | undefined;
5052
+ };
5053
+ scopedExecution: {
5054
+ expiresAt: string;
5055
+ requestId: string;
5056
+ keyId: string;
5057
+ idempotencyKey: string;
5058
+ principal: {
5059
+ environment: "development" | "staging" | "production";
5060
+ accountId: string;
5061
+ applicationId: string;
5062
+ credentialId: string;
5063
+ };
5064
+ provider: string;
5065
+ priceVersionId: string;
5066
+ modelReference: string;
5067
+ permitId: string;
5068
+ fixtureSha256: string;
5069
+ policy: {
5070
+ routingPolicyId: string;
5071
+ policyVersion: number;
5072
+ };
5073
+ deploymentId: string;
5074
+ upstreamModelId: string;
5075
+ providerRateCardVersionId: string;
5076
+ providerSourceVersion: string;
5077
+ maxCostUsd: string;
5078
+ snapshotId: string;
5079
+ catalogueEvidenceHash: string;
5080
+ };
5081
+ routingPolicy: {
5082
+ routingPolicyId: string;
5083
+ policyVersion: number;
5084
+ };
5085
+ target: {
5086
+ kind: "model";
5087
+ modelReference: string;
5088
+ } | {
5089
+ kind: "routing_profile_id";
5090
+ routingProfileId: string;
5091
+ };
5092
+ modality: "image" | "embedding" | "text" | "audio" | "video";
5093
+ input: {
5094
+ decisions: {
5095
+ state: string;
5096
+ questions: ({
5097
+ options: string[];
5098
+ kind: "choice";
5099
+ id: string;
5100
+ question: string;
5101
+ criteria?: string | undefined;
5102
+ } | {
5103
+ kind: "score";
5104
+ id: string;
5105
+ question: string;
5106
+ levels: string[];
5107
+ criteria?: string | undefined;
5108
+ } | {
5109
+ kind: "noul";
5110
+ id: string;
5111
+ question: string;
5112
+ criteria?: string | undefined;
5113
+ })[];
5114
+ instructions?: string | undefined;
5115
+ effort?: "low" | "medium" | "high" | "instant" | "xhigh" | undefined;
5116
+ };
5117
+ format: "decisions";
5118
+ } | {
5119
+ format: "messages";
5120
+ messages: {
5121
+ content: ({
5122
+ type: "text";
5123
+ text: string;
5124
+ } | {
5125
+ type: "image";
5126
+ source: {
5127
+ kind: "url";
5128
+ url: string;
5129
+ } | {
5130
+ kind: "inline";
5131
+ data: string;
5132
+ mediaType: string;
5133
+ };
5134
+ detail?: "low" | "high" | "auto" | undefined;
5135
+ } | {
5136
+ type: "audio";
5137
+ source: {
5138
+ kind: "url";
5139
+ url: string;
5140
+ } | {
5141
+ kind: "inline";
5142
+ data: string;
5143
+ mediaType: string;
5144
+ };
5145
+ } | {
5146
+ type: "file";
5147
+ source: {
5148
+ kind: "url";
5149
+ url: string;
5150
+ } | {
5151
+ kind: "inline";
5152
+ data: string;
5153
+ mediaType: string;
5154
+ };
5155
+ filename?: string | undefined;
5156
+ } | {
5157
+ type: "refusal";
5158
+ text: string;
5159
+ })[];
5160
+ role: "system" | "tool" | "user" | "developer" | "assistant";
5161
+ name?: string | undefined;
5162
+ toolCallId?: string | undefined;
5163
+ toolCalls?: {
5164
+ name: string;
5165
+ id: string;
5166
+ arguments: string;
5167
+ }[] | undefined;
5168
+ }[];
5169
+ } | {
5170
+ text: string;
5171
+ format: "text";
5172
+ } | {
5173
+ format: "text_batch";
5174
+ texts: string[];
5175
+ };
5176
+ stream: boolean;
5177
+ sampling: {
5178
+ seed?: number | undefined;
5179
+ temperature?: number | undefined;
5180
+ topP?: number | undefined;
5181
+ topK?: number | undefined;
5182
+ frequencyPenalty?: number | undefined;
5183
+ presencePenalty?: number | undefined;
5184
+ stopSequences?: string[] | undefined;
5185
+ };
5186
+ tools?: {
5187
+ type: "function";
5188
+ name: string;
5189
+ parameters: Record<string, unknown>;
5190
+ strict?: boolean | undefined;
5191
+ description?: string | undefined;
5192
+ }[] | undefined;
5193
+ idempotencyKey?: string | undefined;
5194
+ reasoning?: {
5195
+ effort: "low" | "medium" | "high";
5196
+ } | undefined;
5197
+ maxOutputTokens?: number | undefined;
5198
+ responseFormat?: {
5199
+ type: "text";
5200
+ } | {
5201
+ type: "json_object";
5202
+ } | {
5203
+ type: "json_schema";
5204
+ strict: boolean;
5205
+ schema: Record<string, unknown>;
5206
+ name: string;
5207
+ } | undefined;
5208
+ speech?: {
5209
+ voice: string;
5210
+ responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
5211
+ speed?: number | undefined;
5212
+ } | undefined;
5213
+ audioOutput?: {
5214
+ format: "mp3" | "opus" | "flac" | "wav" | "pcm";
5215
+ voice: string;
5216
+ } | undefined;
5217
+ toolChoice?: "none" | "required" | "auto" | {
5218
+ type: "function";
5219
+ name: string;
5220
+ } | undefined;
5221
+ authorizedRoutes?: ({
5222
+ provider: string;
5223
+ modelReference: string;
5224
+ deploymentId: string;
5225
+ regions: string[];
5226
+ substitution: "same_model";
5227
+ customerProviderCredential?: {
5228
+ environment: "development" | "staging" | "production";
5229
+ ownerAccountId: string;
5230
+ connectionId: string;
5231
+ credentialHandle: string;
5232
+ credentialRevision: number;
5233
+ } | undefined;
5234
+ } | {
5235
+ provider: string;
5236
+ modelReference: string;
5237
+ deploymentId: string;
5238
+ regions: string[];
5239
+ substitution: "cross_model";
5240
+ authorizedByPolicy: true;
5241
+ customerProviderCredential?: {
5242
+ environment: "development" | "staging" | "production";
5243
+ ownerAccountId: string;
5244
+ connectionId: string;
5245
+ credentialHandle: string;
5246
+ credentialRevision: number;
5247
+ } | undefined;
5248
+ })[] | undefined;
5249
+ }>, {
5250
+ schemaVersion: 3;
5251
+ tools: {
5252
+ type: "function";
5253
+ name: string;
5254
+ parameters: Record<string, unknown>;
5255
+ strict?: boolean | undefined;
5256
+ description?: string | undefined;
5257
+ }[];
5258
+ attribution: {
5259
+ requestId: string;
5260
+ principal: {
5261
+ environment: "development" | "staging" | "production";
5262
+ applicationId: string;
5263
+ credentialId: string;
5264
+ billing: {
5265
+ accountId: string & z.BRAND<"OxyAccountId">;
5266
+ };
5267
+ inferenceScopes: ("inference:invoke" | "inference:models:read" | "inference:usage:read" | "inference:routing:read" | "inference:routing:write" | "inference:providers:read" | "inference:providers:write")[];
5268
+ };
5269
+ userId?: (string & z.BRAND<"DelegatedUserId">) | undefined;
5270
+ generationId?: string | undefined;
5271
+ };
5272
+ client: {
5273
+ receivedAt: string;
5274
+ apiFormat: "embeddings" | "responses" | "chat_completions" | "decisions" | "images_generations" | "audio_transcriptions" | "audio_speech" | "rerank" | "batches";
5275
+ endpoint: string;
5276
+ clientRequestId?: string | undefined;
5277
+ labels?: Record<string, string> | undefined;
5278
+ };
5279
+ scopedExecution: {
5280
+ expiresAt: string;
5281
+ requestId: string;
5282
+ keyId: string;
5283
+ idempotencyKey: string;
5284
+ principal: {
5285
+ environment: "development" | "staging" | "production";
5286
+ accountId: string;
5287
+ applicationId: string;
5288
+ credentialId: string;
5289
+ };
5290
+ provider: string;
5291
+ priceVersionId: string;
5292
+ modelReference: string;
5293
+ permitId: string;
5294
+ fixtureSha256: string;
5295
+ policy: {
5296
+ routingPolicyId: string;
5297
+ policyVersion: number;
5298
+ };
5299
+ deploymentId: string;
5300
+ upstreamModelId: string;
5301
+ providerRateCardVersionId: string;
5302
+ providerSourceVersion: string;
5303
+ maxCostUsd: string & z.BRAND<"ExactDecimal">;
5304
+ snapshotId: string;
5305
+ catalogueEvidenceHash: string;
5306
+ };
5307
+ routingPolicy: {
5308
+ routingPolicyId: string;
5309
+ policyVersion: number;
5310
+ };
5311
+ target: {
5312
+ kind: "model";
5313
+ modelReference: string;
5314
+ } | {
5315
+ kind: "routing_profile_id";
5316
+ routingProfileId: string;
5317
+ };
5318
+ modality: "image" | "embedding" | "text" | "audio" | "video";
5319
+ input: {
5320
+ decisions: {
5321
+ state: string;
5322
+ questions: ({
5323
+ options: string[];
5324
+ kind: "choice";
5325
+ id: string;
5326
+ question: string;
5327
+ criteria?: string | undefined;
5328
+ } | {
5329
+ kind: "score";
5330
+ id: string;
5331
+ question: string;
5332
+ levels: string[];
5333
+ criteria?: string | undefined;
5334
+ } | {
5335
+ kind: "noul";
5336
+ id: string;
5337
+ question: string;
5338
+ criteria?: string | undefined;
5339
+ })[];
5340
+ instructions?: string | undefined;
5341
+ effort?: "low" | "medium" | "high" | "instant" | "xhigh" | undefined;
5342
+ };
5343
+ format: "decisions";
5344
+ } | {
5345
+ format: "messages";
5346
+ messages: {
5347
+ content: ({
5348
+ type: "text";
5349
+ text: string;
5350
+ } | {
5351
+ type: "image";
5352
+ source: {
5353
+ kind: "url";
5354
+ url: string;
5355
+ } | {
5356
+ kind: "inline";
5357
+ data: string;
5358
+ mediaType: string;
5359
+ };
5360
+ detail?: "low" | "high" | "auto" | undefined;
5361
+ } | {
5362
+ type: "audio";
5363
+ source: {
5364
+ kind: "url";
5365
+ url: string;
5366
+ } | {
5367
+ kind: "inline";
5368
+ data: string;
5369
+ mediaType: string;
5370
+ };
5371
+ } | {
5372
+ type: "file";
5373
+ source: {
5374
+ kind: "url";
5375
+ url: string;
5376
+ } | {
5377
+ kind: "inline";
5378
+ data: string;
5379
+ mediaType: string;
5380
+ };
5381
+ filename?: string | undefined;
5382
+ } | {
5383
+ type: "refusal";
5384
+ text: string;
5385
+ })[];
5386
+ role: "system" | "tool" | "user" | "developer" | "assistant";
5387
+ name?: string | undefined;
5388
+ toolCallId?: string | undefined;
5389
+ toolCalls?: {
5390
+ name: string;
5391
+ id: string;
5392
+ arguments: string;
5393
+ }[] | undefined;
5394
+ }[];
5395
+ } | {
5396
+ text: string;
5397
+ format: "text";
5398
+ } | {
5399
+ format: "text_batch";
5400
+ texts: string[];
5401
+ };
5402
+ stream: boolean;
5403
+ sampling: {
5404
+ seed?: number | undefined;
5405
+ temperature?: number | undefined;
5406
+ topP?: number | undefined;
5407
+ topK?: number | undefined;
5408
+ frequencyPenalty?: number | undefined;
5409
+ presencePenalty?: number | undefined;
5410
+ stopSequences?: string[] | undefined;
5411
+ };
5412
+ idempotencyKey?: string | undefined;
5413
+ reasoning?: {
5414
+ effort: "low" | "medium" | "high";
5415
+ } | undefined;
5416
+ maxOutputTokens?: number | undefined;
5417
+ responseFormat?: {
5418
+ type: "text";
5419
+ } | {
5420
+ type: "json_object";
5421
+ } | {
5422
+ type: "json_schema";
5423
+ strict: boolean;
5424
+ schema: Record<string, unknown>;
5425
+ name: string;
5426
+ } | undefined;
5427
+ speech?: {
5428
+ voice: string;
5429
+ responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
5430
+ speed?: number | undefined;
5431
+ } | undefined;
5432
+ audioOutput?: {
5433
+ format: "mp3" | "opus" | "flac" | "wav" | "pcm";
5434
+ voice: string;
5435
+ } | undefined;
5436
+ toolChoice?: "none" | "required" | "auto" | {
5437
+ type: "function";
5438
+ name: string;
5439
+ } | undefined;
5440
+ authorizedRoutes?: ({
5441
+ provider: string;
5442
+ modelReference: string;
5443
+ deploymentId: string;
5444
+ regions: string[];
5445
+ substitution: "same_model";
5446
+ customerProviderCredential?: {
5447
+ environment: "development" | "staging" | "production";
5448
+ ownerAccountId: string & z.BRAND<"OxyAccountId">;
5449
+ connectionId: string;
5450
+ credentialHandle: string;
5451
+ credentialRevision: number;
5452
+ } | undefined;
5453
+ } | {
5454
+ provider: string;
5455
+ modelReference: string;
5456
+ deploymentId: string;
5457
+ regions: string[];
5458
+ substitution: "cross_model";
5459
+ authorizedByPolicy: true;
5460
+ customerProviderCredential?: {
5461
+ environment: "development" | "staging" | "production";
5462
+ ownerAccountId: string & z.BRAND<"OxyAccountId">;
5463
+ connectionId: string;
5464
+ credentialHandle: string;
5465
+ credentialRevision: number;
5466
+ } | undefined;
5467
+ })[] | undefined;
5468
+ }, {
5469
+ schemaVersion: 3;
5470
+ attribution: {
5471
+ requestId: string;
5472
+ principal: {
5473
+ environment: "development" | "staging" | "production";
5474
+ applicationId: string;
5475
+ credentialId: string;
5476
+ billing: {
5477
+ accountId: string;
5478
+ };
5479
+ inferenceScopes: ("inference:invoke" | "inference:models:read" | "inference:usage:read" | "inference:routing:read" | "inference:routing:write" | "inference:providers:read" | "inference:providers:write")[];
5480
+ };
5481
+ userId?: string | undefined;
5482
+ generationId?: string | undefined;
5483
+ };
5484
+ client: {
5485
+ receivedAt: string;
5486
+ apiFormat: "embeddings" | "responses" | "chat_completions" | "decisions" | "images_generations" | "audio_transcriptions" | "audio_speech" | "rerank" | "batches";
5487
+ endpoint: string;
5488
+ clientRequestId?: string | undefined;
5489
+ labels?: Record<string, string> | undefined;
5490
+ };
5491
+ scopedExecution: {
5492
+ expiresAt: string;
5493
+ requestId: string;
5494
+ keyId: string;
5495
+ idempotencyKey: string;
5496
+ principal: {
5497
+ environment: "development" | "staging" | "production";
5498
+ accountId: string;
5499
+ applicationId: string;
5500
+ credentialId: string;
5501
+ };
5502
+ provider: string;
5503
+ priceVersionId: string;
5504
+ modelReference: string;
5505
+ permitId: string;
5506
+ fixtureSha256: string;
5507
+ policy: {
5508
+ routingPolicyId: string;
5509
+ policyVersion: number;
5510
+ };
5511
+ deploymentId: string;
5512
+ upstreamModelId: string;
5513
+ providerRateCardVersionId: string;
5514
+ providerSourceVersion: string;
5515
+ maxCostUsd: string;
5516
+ snapshotId: string;
5517
+ catalogueEvidenceHash: string;
5518
+ };
5519
+ routingPolicy: {
5520
+ routingPolicyId: string;
5521
+ policyVersion: number;
5522
+ };
5523
+ target: {
5524
+ kind: "model";
5525
+ modelReference: string;
5526
+ } | {
5527
+ kind: "routing_profile_id";
5528
+ routingProfileId: string;
5529
+ };
5530
+ modality: "image" | "embedding" | "text" | "audio" | "video";
5531
+ input: {
5532
+ decisions: {
5533
+ state: string;
5534
+ questions: ({
5535
+ options: string[];
5536
+ kind: "choice";
5537
+ id: string;
5538
+ question: string;
5539
+ criteria?: string | undefined;
5540
+ } | {
5541
+ kind: "score";
5542
+ id: string;
5543
+ question: string;
5544
+ levels: string[];
5545
+ criteria?: string | undefined;
5546
+ } | {
5547
+ kind: "noul";
5548
+ id: string;
5549
+ question: string;
5550
+ criteria?: string | undefined;
5551
+ })[];
5552
+ instructions?: string | undefined;
5553
+ effort?: "low" | "medium" | "high" | "instant" | "xhigh" | undefined;
5554
+ };
5555
+ format: "decisions";
5556
+ } | {
5557
+ format: "messages";
5558
+ messages: {
5559
+ content: ({
5560
+ type: "text";
5561
+ text: string;
5562
+ } | {
5563
+ type: "image";
5564
+ source: {
5565
+ kind: "url";
5566
+ url: string;
5567
+ } | {
5568
+ kind: "inline";
5569
+ data: string;
5570
+ mediaType: string;
5571
+ };
5572
+ detail?: "low" | "high" | "auto" | undefined;
5573
+ } | {
5574
+ type: "audio";
5575
+ source: {
5576
+ kind: "url";
5577
+ url: string;
5578
+ } | {
5579
+ kind: "inline";
5580
+ data: string;
5581
+ mediaType: string;
5582
+ };
5583
+ } | {
5584
+ type: "file";
5585
+ source: {
5586
+ kind: "url";
5587
+ url: string;
5588
+ } | {
5589
+ kind: "inline";
5590
+ data: string;
5591
+ mediaType: string;
5592
+ };
5593
+ filename?: string | undefined;
5594
+ } | {
5595
+ type: "refusal";
5596
+ text: string;
5597
+ })[];
5598
+ role: "system" | "tool" | "user" | "developer" | "assistant";
5599
+ name?: string | undefined;
5600
+ toolCallId?: string | undefined;
5601
+ toolCalls?: {
5602
+ name: string;
5603
+ id: string;
5604
+ arguments: string;
5605
+ }[] | undefined;
5606
+ }[];
5607
+ } | {
5608
+ text: string;
5609
+ format: "text";
5610
+ } | {
5611
+ format: "text_batch";
5612
+ texts: string[];
5613
+ };
5614
+ stream: boolean;
5615
+ sampling: {
5616
+ seed?: number | undefined;
5617
+ temperature?: number | undefined;
5618
+ topP?: number | undefined;
5619
+ topK?: number | undefined;
5620
+ frequencyPenalty?: number | undefined;
5621
+ presencePenalty?: number | undefined;
5622
+ stopSequences?: string[] | undefined;
5623
+ };
5624
+ tools?: {
5625
+ type: "function";
5626
+ name: string;
5627
+ parameters: Record<string, unknown>;
5628
+ strict?: boolean | undefined;
5629
+ description?: string | undefined;
5630
+ }[] | undefined;
5631
+ idempotencyKey?: string | undefined;
5632
+ reasoning?: {
5633
+ effort: "low" | "medium" | "high";
5634
+ } | undefined;
5635
+ maxOutputTokens?: number | undefined;
5636
+ responseFormat?: {
5637
+ type: "text";
5638
+ } | {
5639
+ type: "json_object";
5640
+ } | {
5641
+ type: "json_schema";
5642
+ strict: boolean;
5643
+ schema: Record<string, unknown>;
5644
+ name: string;
5645
+ } | undefined;
5646
+ speech?: {
5647
+ voice: string;
5648
+ responseFormat: "mp3" | "opus" | "aac" | "flac" | "wav" | "pcm";
5649
+ speed?: number | undefined;
5650
+ } | undefined;
5651
+ audioOutput?: {
5652
+ format: "mp3" | "opus" | "flac" | "wav" | "pcm";
5653
+ voice: string;
5654
+ } | undefined;
5655
+ toolChoice?: "none" | "required" | "auto" | {
5656
+ type: "function";
5657
+ name: string;
5658
+ } | undefined;
5659
+ authorizedRoutes?: ({
5660
+ provider: string;
5661
+ modelReference: string;
5662
+ deploymentId: string;
5663
+ regions: string[];
5664
+ substitution: "same_model";
5665
+ customerProviderCredential?: {
5666
+ environment: "development" | "staging" | "production";
5667
+ ownerAccountId: string;
5668
+ connectionId: string;
5669
+ credentialHandle: string;
5670
+ credentialRevision: number;
5671
+ } | undefined;
5672
+ } | {
5673
+ provider: string;
5674
+ modelReference: string;
5675
+ deploymentId: string;
5676
+ regions: string[];
3405
5677
  substitution: "cross_model";
3406
5678
  authorizedByPolicy: true;
3407
5679
  customerProviderCredential?: {
@@ -3413,6 +5685,7 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
3413
5685
  } | undefined;
3414
5686
  })[] | undefined;
3415
5687
  }>;
5688
+ export type ScopedInferenceRequest = z.infer<typeof scopedInferenceRequestSchema>;
3416
5689
  export type InferenceContentSource = z.infer<typeof inferenceContentSourceSchema>;
3417
5690
  export type InferenceContentPart = z.infer<typeof inferenceContentPartSchema>;
3418
5691
  export type InferenceToolCall = z.infer<typeof inferenceToolCallSchema>;