@oxyhq/contracts 0.29.0 → 0.30.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/identity.js +33 -1
- package/dist/cjs/index.js +20 -7
- package/dist/cjs/inference/aliaModelRelease.js +250 -0
- package/dist/cjs/inference/catalogue.js +1 -4
- package/dist/cjs/inference/identifiers.js +23 -3
- package/dist/cjs/inference/request.js +188 -5
- package/dist/cjs/inference/routingPolicy.js +81 -2
- package/dist/cjs/inference/streamEvents.js +27 -0
- package/dist/cjs/inference/usage.js +32 -1
- package/dist/cjs/inference/version.js +15 -2
- package/dist/esm/.tsbuildinfo +1 -1
- package/dist/esm/identity.js +32 -0
- package/dist/esm/index.js +8 -3
- package/dist/esm/inference/aliaModelRelease.js +247 -0
- package/dist/esm/inference/catalogue.js +2 -5
- package/dist/esm/inference/identifiers.js +22 -2
- package/dist/esm/inference/request.js +189 -6
- package/dist/esm/inference/routingPolicy.js +81 -2
- package/dist/esm/inference/streamEvents.js +27 -0
- package/dist/esm/inference/usage.js +32 -1
- package/dist/esm/inference/version.js +15 -2
- package/dist/types/.tsbuildinfo +1 -1
- package/dist/types/identity.d.ts +59 -1
- package/dist/types/index.d.ts +7 -5
- package/dist/types/inference/accountBilling.d.ts +26 -26
- package/dist/types/inference/aliaModelRelease.d.ts +597 -0
- package/dist/types/inference/catalogue.d.ts +6 -6
- package/dist/types/inference/entitlement.d.ts +4 -4
- package/dist/types/inference/identifiers.d.ts +20 -2
- package/dist/types/inference/money.d.ts +4 -4
- package/dist/types/inference/priceVersion.d.ts +14 -14
- package/dist/types/inference/providerConnection.d.ts +4 -4
- package/dist/types/inference/request.d.ts +291 -5
- package/dist/types/inference/routingPolicy.d.ts +109 -13
- package/dist/types/inference/streamEvents.d.ts +53 -26
- package/dist/types/inference/usage.d.ts +103 -79
- package/dist/types/inference/version.d.ts +15 -2
- package/dist/types/keyRecovery.d.ts +4 -4
- package/package.json +1 -1
|
@@ -11,11 +11,17 @@
|
|
|
11
11
|
*
|
|
12
12
|
* What the envelope carries that a provider request does not: the resolved
|
|
13
13
|
* attribution block (who pays, which application, which credential, which
|
|
14
|
-
* delegated user), the exact routing policy reference
|
|
15
|
-
*
|
|
16
|
-
*
|
|
14
|
+
* delegated user), the exact routing policy reference, the routes that policy
|
|
15
|
+
* has already authorized, and the customer's idempotency key. Those are the
|
|
16
|
+
* fields that make a request billable and explainable, and they are resolved
|
|
17
|
+
* BEFORE the request enters the data plane.
|
|
17
18
|
*
|
|
18
|
-
*
|
|
19
|
+
* The policy VALUES never travel. `routingPolicy` is a reference — provenance
|
|
20
|
+
* for the receipt — and `authorizedRoutes` is the result of applying the policy,
|
|
21
|
+
* in preference order, so the data plane needs no policy semantics to fail over.
|
|
22
|
+
*
|
|
23
|
+
* Decided in: docs/adr/0010-public-api-compatibility.md,
|
|
24
|
+
* docs/adr/0017-authorized-routes-in-the-envelope.md.
|
|
19
25
|
*/
|
|
20
26
|
import { z } from 'zod';
|
|
21
27
|
/**
|
|
@@ -47,7 +53,38 @@ export declare const inferenceContentSourceSchema: z.ZodDiscriminatedUnion<"kind
|
|
|
47
53
|
data: string;
|
|
48
54
|
mediaType: string;
|
|
49
55
|
}>]>;
|
|
50
|
-
/**
|
|
56
|
+
/**
|
|
57
|
+
* One part of a message's content. A message is always a list of parts.
|
|
58
|
+
*
|
|
59
|
+
* ## `refusal` is a member and `reasoning` is not, and the asymmetry is the point
|
|
60
|
+
*
|
|
61
|
+
* A model that DECLINES says why, and those words are meant for the customer:
|
|
62
|
+
* they are the difference between "rephrase this" and "stop asking". Before this
|
|
63
|
+
* member existed there was nowhere in an {@link InferenceMessage} to put them, so
|
|
64
|
+
* a non-streaming fold kept `finishReason: 'refusal'` and dropped the sentence —
|
|
65
|
+
* the customer learned they were refused and not why, while a streaming caller of
|
|
66
|
+
* the same request got the whole explanation on the `refusal` delta channel.
|
|
67
|
+
*
|
|
68
|
+
* Reasoning is the opposite case and stays absent. It is the model's private
|
|
69
|
+
* working, and a `text` part is where somebody would put it — which renders
|
|
70
|
+
* private reasoning to the customer AS the answer, the product bug the delta
|
|
71
|
+
* channels exist to prevent. An opaque per-block reasoning blob crossing this
|
|
72
|
+
* boundary needs a home nobody has chosen yet, and inventing one here would
|
|
73
|
+
* choose it by accident.
|
|
74
|
+
*
|
|
75
|
+
* Both public dialects can carry a refusal, which is what separates the two
|
|
76
|
+
* cases at the boundary as well as in principle: `refusal` is OpenAI's OWN field
|
|
77
|
+
* in both of its shapes (`delta.refusal` streaming, `message.refusal`
|
|
78
|
+
* non-streaming), while reasoning has no OpenAI field at all — the
|
|
79
|
+
* `reasoning_content`/`reasoning` spellings an OpenAI-compatible provider emits
|
|
80
|
+
* are provider extensions. So carrying the refusal costs no dialect its
|
|
81
|
+
* standard-client parseability, and carrying reasoning would.
|
|
82
|
+
*
|
|
83
|
+
* The part is a MEMBER rather than a field because a refusal need not have text:
|
|
84
|
+
* an Anthropic `stop_reason: "refusal"` maps to the finish reason and separates
|
|
85
|
+
* no words from the answer, while an OpenAI-compatible `refusal` does. A required
|
|
86
|
+
* field would force the first provider to invent a sentence.
|
|
87
|
+
*/
|
|
51
88
|
export declare const inferenceContentPartSchema: z.ZodDiscriminatedUnion<"type", [z.ZodObject<{
|
|
52
89
|
type: z.ZodLiteral<"text">;
|
|
53
90
|
text: z.ZodString;
|
|
@@ -196,6 +233,15 @@ export declare const inferenceContentPartSchema: z.ZodDiscriminatedUnion<"type",
|
|
|
196
233
|
mediaType: string;
|
|
197
234
|
};
|
|
198
235
|
filename?: string | undefined;
|
|
236
|
+
}>, z.ZodObject<{
|
|
237
|
+
type: z.ZodLiteral<"refusal">;
|
|
238
|
+
text: z.ZodString;
|
|
239
|
+
}, "strict", z.ZodTypeAny, {
|
|
240
|
+
type: "refusal";
|
|
241
|
+
text: string;
|
|
242
|
+
}, {
|
|
243
|
+
type: "refusal";
|
|
244
|
+
text: string;
|
|
199
245
|
}>]>;
|
|
200
246
|
/**
|
|
201
247
|
* A tool call an assistant made, in the normalized form.
|
|
@@ -376,6 +422,15 @@ export declare const inferenceMessageSchema: z.ZodEffects<z.ZodObject<{
|
|
|
376
422
|
mediaType: string;
|
|
377
423
|
};
|
|
378
424
|
filename?: string | undefined;
|
|
425
|
+
}>, z.ZodObject<{
|
|
426
|
+
type: z.ZodLiteral<"refusal">;
|
|
427
|
+
text: z.ZodString;
|
|
428
|
+
}, "strict", z.ZodTypeAny, {
|
|
429
|
+
type: "refusal";
|
|
430
|
+
text: string;
|
|
431
|
+
}, {
|
|
432
|
+
type: "refusal";
|
|
433
|
+
text: string;
|
|
379
434
|
}>]>, "many">;
|
|
380
435
|
/** Participant name, where the dialect supports naming participants. */
|
|
381
436
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -431,6 +486,9 @@ export declare const inferenceMessageSchema: z.ZodEffects<z.ZodObject<{
|
|
|
431
486
|
mediaType: string;
|
|
432
487
|
};
|
|
433
488
|
filename?: string | undefined;
|
|
489
|
+
} | {
|
|
490
|
+
type: "refusal";
|
|
491
|
+
text: string;
|
|
434
492
|
})[];
|
|
435
493
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
436
494
|
name?: string | undefined;
|
|
@@ -476,6 +534,9 @@ export declare const inferenceMessageSchema: z.ZodEffects<z.ZodObject<{
|
|
|
476
534
|
mediaType: string;
|
|
477
535
|
};
|
|
478
536
|
filename?: string | undefined;
|
|
537
|
+
} | {
|
|
538
|
+
type: "refusal";
|
|
539
|
+
text: string;
|
|
479
540
|
})[];
|
|
480
541
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
481
542
|
name?: string | undefined;
|
|
@@ -521,6 +582,9 @@ export declare const inferenceMessageSchema: z.ZodEffects<z.ZodObject<{
|
|
|
521
582
|
mediaType: string;
|
|
522
583
|
};
|
|
523
584
|
filename?: string | undefined;
|
|
585
|
+
} | {
|
|
586
|
+
type: "refusal";
|
|
587
|
+
text: string;
|
|
524
588
|
})[];
|
|
525
589
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
526
590
|
name?: string | undefined;
|
|
@@ -566,6 +630,9 @@ export declare const inferenceMessageSchema: z.ZodEffects<z.ZodObject<{
|
|
|
566
630
|
mediaType: string;
|
|
567
631
|
};
|
|
568
632
|
filename?: string | undefined;
|
|
633
|
+
} | {
|
|
634
|
+
type: "refusal";
|
|
635
|
+
text: string;
|
|
569
636
|
})[];
|
|
570
637
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
571
638
|
name?: string | undefined;
|
|
@@ -736,6 +803,15 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
736
803
|
mediaType: string;
|
|
737
804
|
};
|
|
738
805
|
filename?: string | undefined;
|
|
806
|
+
}>, z.ZodObject<{
|
|
807
|
+
type: z.ZodLiteral<"refusal">;
|
|
808
|
+
text: z.ZodString;
|
|
809
|
+
}, "strict", z.ZodTypeAny, {
|
|
810
|
+
type: "refusal";
|
|
811
|
+
text: string;
|
|
812
|
+
}, {
|
|
813
|
+
type: "refusal";
|
|
814
|
+
text: string;
|
|
739
815
|
}>]>, "many">;
|
|
740
816
|
/** Participant name, where the dialect supports naming participants. */
|
|
741
817
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -791,6 +867,9 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
791
867
|
mediaType: string;
|
|
792
868
|
};
|
|
793
869
|
filename?: string | undefined;
|
|
870
|
+
} | {
|
|
871
|
+
type: "refusal";
|
|
872
|
+
text: string;
|
|
794
873
|
})[];
|
|
795
874
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
796
875
|
name?: string | undefined;
|
|
@@ -836,6 +915,9 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
836
915
|
mediaType: string;
|
|
837
916
|
};
|
|
838
917
|
filename?: string | undefined;
|
|
918
|
+
} | {
|
|
919
|
+
type: "refusal";
|
|
920
|
+
text: string;
|
|
839
921
|
})[];
|
|
840
922
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
841
923
|
name?: string | undefined;
|
|
@@ -881,6 +963,9 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
881
963
|
mediaType: string;
|
|
882
964
|
};
|
|
883
965
|
filename?: string | undefined;
|
|
966
|
+
} | {
|
|
967
|
+
type: "refusal";
|
|
968
|
+
text: string;
|
|
884
969
|
})[];
|
|
885
970
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
886
971
|
name?: string | undefined;
|
|
@@ -926,6 +1011,9 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
926
1011
|
mediaType: string;
|
|
927
1012
|
};
|
|
928
1013
|
filename?: string | undefined;
|
|
1014
|
+
} | {
|
|
1015
|
+
type: "refusal";
|
|
1016
|
+
text: string;
|
|
929
1017
|
})[];
|
|
930
1018
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
931
1019
|
name?: string | undefined;
|
|
@@ -974,6 +1062,9 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
974
1062
|
mediaType: string;
|
|
975
1063
|
};
|
|
976
1064
|
filename?: string | undefined;
|
|
1065
|
+
} | {
|
|
1066
|
+
type: "refusal";
|
|
1067
|
+
text: string;
|
|
977
1068
|
})[];
|
|
978
1069
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
979
1070
|
name?: string | undefined;
|
|
@@ -1022,6 +1113,9 @@ export declare const inferenceInputSchema: z.ZodDiscriminatedUnion<"format", [z.
|
|
|
1022
1113
|
mediaType: string;
|
|
1023
1114
|
};
|
|
1024
1115
|
filename?: string | undefined;
|
|
1116
|
+
} | {
|
|
1117
|
+
type: "refusal";
|
|
1118
|
+
text: string;
|
|
1025
1119
|
})[];
|
|
1026
1120
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
1027
1121
|
name?: string | undefined;
|
|
@@ -1421,6 +1515,15 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1421
1515
|
mediaType: string;
|
|
1422
1516
|
};
|
|
1423
1517
|
filename?: string | undefined;
|
|
1518
|
+
}>, z.ZodObject<{
|
|
1519
|
+
type: z.ZodLiteral<"refusal">;
|
|
1520
|
+
text: z.ZodString;
|
|
1521
|
+
}, "strict", z.ZodTypeAny, {
|
|
1522
|
+
type: "refusal";
|
|
1523
|
+
text: string;
|
|
1524
|
+
}, {
|
|
1525
|
+
type: "refusal";
|
|
1526
|
+
text: string;
|
|
1424
1527
|
}>]>, "many">;
|
|
1425
1528
|
/** Participant name, where the dialect supports naming participants. */
|
|
1426
1529
|
name: z.ZodOptional<z.ZodString>;
|
|
@@ -1476,6 +1579,9 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1476
1579
|
mediaType: string;
|
|
1477
1580
|
};
|
|
1478
1581
|
filename?: string | undefined;
|
|
1582
|
+
} | {
|
|
1583
|
+
type: "refusal";
|
|
1584
|
+
text: string;
|
|
1479
1585
|
})[];
|
|
1480
1586
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
1481
1587
|
name?: string | undefined;
|
|
@@ -1521,6 +1627,9 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1521
1627
|
mediaType: string;
|
|
1522
1628
|
};
|
|
1523
1629
|
filename?: string | undefined;
|
|
1630
|
+
} | {
|
|
1631
|
+
type: "refusal";
|
|
1632
|
+
text: string;
|
|
1524
1633
|
})[];
|
|
1525
1634
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
1526
1635
|
name?: string | undefined;
|
|
@@ -1566,6 +1675,9 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1566
1675
|
mediaType: string;
|
|
1567
1676
|
};
|
|
1568
1677
|
filename?: string | undefined;
|
|
1678
|
+
} | {
|
|
1679
|
+
type: "refusal";
|
|
1680
|
+
text: string;
|
|
1569
1681
|
})[];
|
|
1570
1682
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
1571
1683
|
name?: string | undefined;
|
|
@@ -1611,6 +1723,9 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1611
1723
|
mediaType: string;
|
|
1612
1724
|
};
|
|
1613
1725
|
filename?: string | undefined;
|
|
1726
|
+
} | {
|
|
1727
|
+
type: "refusal";
|
|
1728
|
+
text: string;
|
|
1614
1729
|
})[];
|
|
1615
1730
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
1616
1731
|
name?: string | undefined;
|
|
@@ -1659,6 +1774,9 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1659
1774
|
mediaType: string;
|
|
1660
1775
|
};
|
|
1661
1776
|
filename?: string | undefined;
|
|
1777
|
+
} | {
|
|
1778
|
+
type: "refusal";
|
|
1779
|
+
text: string;
|
|
1662
1780
|
})[];
|
|
1663
1781
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
1664
1782
|
name?: string | undefined;
|
|
@@ -1707,6 +1825,9 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1707
1825
|
mediaType: string;
|
|
1708
1826
|
};
|
|
1709
1827
|
filename?: string | undefined;
|
|
1828
|
+
} | {
|
|
1829
|
+
type: "refusal";
|
|
1830
|
+
text: string;
|
|
1710
1831
|
})[];
|
|
1711
1832
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
1712
1833
|
name?: string | undefined;
|
|
@@ -1857,6 +1978,103 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1857
1978
|
routingPolicyId: string;
|
|
1858
1979
|
policyVersion: number;
|
|
1859
1980
|
}>;
|
|
1981
|
+
/**
|
|
1982
|
+
* The routes the control plane has already authorized for this request, in
|
|
1983
|
+
* PREFERENCE ORDER. The first entry is the primary route Oxy resolved; the
|
|
1984
|
+
* data plane fails over by taking the next one.
|
|
1985
|
+
*
|
|
1986
|
+
* This is what closes the gap ADR 0010's amendment left open. That amendment
|
|
1987
|
+
* assigns the data plane "failover within the destinations the policy
|
|
1988
|
+
* authorized" — and the envelope named no destinations, so a data plane could
|
|
1989
|
+
* only fail over by re-deriving the customer's policy from values it does not
|
|
1990
|
+
* have. Enumerating the survivors instead means a route switch outside the
|
|
1991
|
+
* policy is impossible BY CONSTRUCTION rather than by two enforcement engines
|
|
1992
|
+
* agreeing in two languages.
|
|
1993
|
+
*
|
|
1994
|
+
* **Absent means no failover is authorized, never "choose freely."** It is
|
|
1995
|
+
* the state every envelope built before this field existed is in, and the
|
|
1996
|
+
* behaviour a data plane that reads no list must already have: resolve the
|
|
1997
|
+
* `target` and serve it or fail. Permission is granted by an ENTRY, so its
|
|
1998
|
+
* absence can only ever narrow, and there is no reading of an absent list
|
|
1999
|
+
* that widens what may be served.
|
|
2000
|
+
*
|
|
2001
|
+
* An EMPTY list is refused rather than treated as that state. `[]` would say
|
|
2002
|
+
* "no route is authorized at all", which contradicts an envelope that was
|
|
2003
|
+
* built to be served, and it is exactly the "permission granted, destination
|
|
2004
|
+
* unnamed" shape `authorizedRouteSchema` exists to make unrepresentable.
|
|
2005
|
+
*
|
|
2006
|
+
* No price rides here. Oxy sized the hold against the most expensive route
|
|
2007
|
+
* the policy permits (`usageReservationRequestSchema.ceilingPriceVersionId`),
|
|
2008
|
+
* and every entry is one that policy permitted, so no failover among them can
|
|
2009
|
+
* exceed it. A per-route price would also be a second authority for ranking,
|
|
2010
|
+
* beside the order this list already carries.
|
|
2011
|
+
*/
|
|
2012
|
+
authorizedRoutes: z.ZodOptional<z.ZodArray<z.ZodEffects<z.ZodDiscriminatedUnion<"substitution", [z.ZodObject<{
|
|
2013
|
+
deploymentId: z.ZodString;
|
|
2014
|
+
modelReference: z.ZodString;
|
|
2015
|
+
provider: z.ZodString;
|
|
2016
|
+
regions: z.ZodArray<z.ZodString, "many">;
|
|
2017
|
+
substitution: z.ZodLiteral<"same_model">;
|
|
2018
|
+
}, "strict", z.ZodTypeAny, {
|
|
2019
|
+
provider: string;
|
|
2020
|
+
modelReference: string;
|
|
2021
|
+
regions: string[];
|
|
2022
|
+
deploymentId: string;
|
|
2023
|
+
substitution: "same_model";
|
|
2024
|
+
}, {
|
|
2025
|
+
provider: string;
|
|
2026
|
+
modelReference: string;
|
|
2027
|
+
regions: string[];
|
|
2028
|
+
deploymentId: string;
|
|
2029
|
+
substitution: "same_model";
|
|
2030
|
+
}>, z.ZodObject<{
|
|
2031
|
+
authorizedByPolicy: z.ZodLiteral<true>;
|
|
2032
|
+
deploymentId: z.ZodString;
|
|
2033
|
+
modelReference: z.ZodString;
|
|
2034
|
+
provider: z.ZodString;
|
|
2035
|
+
regions: z.ZodArray<z.ZodString, "many">;
|
|
2036
|
+
substitution: z.ZodLiteral<"cross_model">;
|
|
2037
|
+
}, "strict", z.ZodTypeAny, {
|
|
2038
|
+
provider: string;
|
|
2039
|
+
modelReference: string;
|
|
2040
|
+
regions: string[];
|
|
2041
|
+
deploymentId: string;
|
|
2042
|
+
substitution: "cross_model";
|
|
2043
|
+
authorizedByPolicy: true;
|
|
2044
|
+
}, {
|
|
2045
|
+
provider: string;
|
|
2046
|
+
modelReference: string;
|
|
2047
|
+
regions: string[];
|
|
2048
|
+
deploymentId: string;
|
|
2049
|
+
substitution: "cross_model";
|
|
2050
|
+
authorizedByPolicy: true;
|
|
2051
|
+
}>]>, {
|
|
2052
|
+
provider: string;
|
|
2053
|
+
modelReference: string;
|
|
2054
|
+
regions: string[];
|
|
2055
|
+
deploymentId: string;
|
|
2056
|
+
substitution: "same_model";
|
|
2057
|
+
} | {
|
|
2058
|
+
provider: string;
|
|
2059
|
+
modelReference: string;
|
|
2060
|
+
regions: string[];
|
|
2061
|
+
deploymentId: string;
|
|
2062
|
+
substitution: "cross_model";
|
|
2063
|
+
authorizedByPolicy: true;
|
|
2064
|
+
}, {
|
|
2065
|
+
provider: string;
|
|
2066
|
+
modelReference: string;
|
|
2067
|
+
regions: string[];
|
|
2068
|
+
deploymentId: string;
|
|
2069
|
+
substitution: "same_model";
|
|
2070
|
+
} | {
|
|
2071
|
+
provider: string;
|
|
2072
|
+
modelReference: string;
|
|
2073
|
+
regions: string[];
|
|
2074
|
+
deploymentId: string;
|
|
2075
|
+
substitution: "cross_model";
|
|
2076
|
+
authorizedByPolicy: true;
|
|
2077
|
+
}>, "many">>;
|
|
1860
2078
|
}, "strip", z.ZodTypeAny, {
|
|
1861
2079
|
attribution: {
|
|
1862
2080
|
requestId: string;
|
|
@@ -1926,6 +2144,9 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1926
2144
|
mediaType: string;
|
|
1927
2145
|
};
|
|
1928
2146
|
filename?: string | undefined;
|
|
2147
|
+
} | {
|
|
2148
|
+
type: "refusal";
|
|
2149
|
+
text: string;
|
|
1929
2150
|
})[];
|
|
1930
2151
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
1931
2152
|
name?: string | undefined;
|
|
@@ -1980,6 +2201,20 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
1980
2201
|
strict: boolean;
|
|
1981
2202
|
schema: Record<string, unknown>;
|
|
1982
2203
|
} | undefined;
|
|
2204
|
+
authorizedRoutes?: ({
|
|
2205
|
+
provider: string;
|
|
2206
|
+
modelReference: string;
|
|
2207
|
+
regions: string[];
|
|
2208
|
+
deploymentId: string;
|
|
2209
|
+
substitution: "same_model";
|
|
2210
|
+
} | {
|
|
2211
|
+
provider: string;
|
|
2212
|
+
modelReference: string;
|
|
2213
|
+
regions: string[];
|
|
2214
|
+
deploymentId: string;
|
|
2215
|
+
substitution: "cross_model";
|
|
2216
|
+
authorizedByPolicy: true;
|
|
2217
|
+
})[] | undefined;
|
|
1983
2218
|
}, {
|
|
1984
2219
|
attribution: {
|
|
1985
2220
|
requestId: string;
|
|
@@ -2042,6 +2277,9 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2042
2277
|
mediaType: string;
|
|
2043
2278
|
};
|
|
2044
2279
|
filename?: string | undefined;
|
|
2280
|
+
} | {
|
|
2281
|
+
type: "refusal";
|
|
2282
|
+
text: string;
|
|
2045
2283
|
})[];
|
|
2046
2284
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
2047
2285
|
name?: string | undefined;
|
|
@@ -2103,6 +2341,20 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2103
2341
|
strict: boolean;
|
|
2104
2342
|
schema: Record<string, unknown>;
|
|
2105
2343
|
} | undefined;
|
|
2344
|
+
authorizedRoutes?: ({
|
|
2345
|
+
provider: string;
|
|
2346
|
+
modelReference: string;
|
|
2347
|
+
regions: string[];
|
|
2348
|
+
deploymentId: string;
|
|
2349
|
+
substitution: "same_model";
|
|
2350
|
+
} | {
|
|
2351
|
+
provider: string;
|
|
2352
|
+
modelReference: string;
|
|
2353
|
+
regions: string[];
|
|
2354
|
+
deploymentId: string;
|
|
2355
|
+
substitution: "cross_model";
|
|
2356
|
+
authorizedByPolicy: true;
|
|
2357
|
+
})[] | undefined;
|
|
2106
2358
|
}>, {
|
|
2107
2359
|
attribution: {
|
|
2108
2360
|
requestId: string;
|
|
@@ -2172,6 +2424,9 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2172
2424
|
mediaType: string;
|
|
2173
2425
|
};
|
|
2174
2426
|
filename?: string | undefined;
|
|
2427
|
+
} | {
|
|
2428
|
+
type: "refusal";
|
|
2429
|
+
text: string;
|
|
2175
2430
|
})[];
|
|
2176
2431
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
2177
2432
|
name?: string | undefined;
|
|
@@ -2226,6 +2481,20 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2226
2481
|
strict: boolean;
|
|
2227
2482
|
schema: Record<string, unknown>;
|
|
2228
2483
|
} | undefined;
|
|
2484
|
+
authorizedRoutes?: ({
|
|
2485
|
+
provider: string;
|
|
2486
|
+
modelReference: string;
|
|
2487
|
+
regions: string[];
|
|
2488
|
+
deploymentId: string;
|
|
2489
|
+
substitution: "same_model";
|
|
2490
|
+
} | {
|
|
2491
|
+
provider: string;
|
|
2492
|
+
modelReference: string;
|
|
2493
|
+
regions: string[];
|
|
2494
|
+
deploymentId: string;
|
|
2495
|
+
substitution: "cross_model";
|
|
2496
|
+
authorizedByPolicy: true;
|
|
2497
|
+
})[] | undefined;
|
|
2229
2498
|
}, {
|
|
2230
2499
|
attribution: {
|
|
2231
2500
|
requestId: string;
|
|
@@ -2288,6 +2557,9 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2288
2557
|
mediaType: string;
|
|
2289
2558
|
};
|
|
2290
2559
|
filename?: string | undefined;
|
|
2560
|
+
} | {
|
|
2561
|
+
type: "refusal";
|
|
2562
|
+
text: string;
|
|
2291
2563
|
})[];
|
|
2292
2564
|
role: "system" | "user" | "developer" | "assistant" | "tool";
|
|
2293
2565
|
name?: string | undefined;
|
|
@@ -2349,6 +2621,20 @@ export declare const inferenceRequestSchema: z.ZodEffects<z.ZodObject<{
|
|
|
2349
2621
|
strict: boolean;
|
|
2350
2622
|
schema: Record<string, unknown>;
|
|
2351
2623
|
} | undefined;
|
|
2624
|
+
authorizedRoutes?: ({
|
|
2625
|
+
provider: string;
|
|
2626
|
+
modelReference: string;
|
|
2627
|
+
regions: string[];
|
|
2628
|
+
deploymentId: string;
|
|
2629
|
+
substitution: "same_model";
|
|
2630
|
+
} | {
|
|
2631
|
+
provider: string;
|
|
2632
|
+
modelReference: string;
|
|
2633
|
+
regions: string[];
|
|
2634
|
+
deploymentId: string;
|
|
2635
|
+
substitution: "cross_model";
|
|
2636
|
+
authorizedByPolicy: true;
|
|
2637
|
+
})[] | undefined;
|
|
2352
2638
|
}>;
|
|
2353
2639
|
export type InferenceContentSource = z.infer<typeof inferenceContentSourceSchema>;
|
|
2354
2640
|
export type InferenceContentPart = z.infer<typeof inferenceContentPartSchema>;
|