orq-ai-sdk 4.2.8__py3-none-any.whl → 4.2.10__py3-none-any.whl

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 (73) hide show
  1. orq_ai_sdk/_version.py +2 -2
  2. orq_ai_sdk/completions.py +107 -1
  3. orq_ai_sdk/edits.py +107 -1
  4. orq_ai_sdk/embeddings.py +107 -1
  5. orq_ai_sdk/generations.py +99 -1
  6. orq_ai_sdk/models/__init__.py +405 -0
  7. orq_ai_sdk/models/conversationresponse.py +1 -1
  8. orq_ai_sdk/models/conversationwithmessagesresponse.py +1 -1
  9. orq_ai_sdk/models/createagentrequestop.py +24 -0
  10. orq_ai_sdk/models/createchatcompletionop.py +6 -0
  11. orq_ai_sdk/models/createcompletionop.py +218 -30
  12. orq_ai_sdk/models/createcontactop.py +1 -1
  13. orq_ai_sdk/models/createconversationop.py +1 -1
  14. orq_ai_sdk/models/createconversationresponseop.py +2 -2
  15. orq_ai_sdk/models/createdatasetitemop.py +4 -4
  16. orq_ai_sdk/models/createdatasetop.py +1 -1
  17. orq_ai_sdk/models/createdatasourceop.py +1 -1
  18. orq_ai_sdk/models/createembeddingop.py +221 -26
  19. orq_ai_sdk/models/createevalop.py +14 -14
  20. orq_ai_sdk/models/createidentityop.py +1 -1
  21. orq_ai_sdk/models/createimageeditop.py +242 -31
  22. orq_ai_sdk/models/createimageop.py +210 -22
  23. orq_ai_sdk/models/createimagevariationop.py +251 -31
  24. orq_ai_sdk/models/createpromptop.py +12 -0
  25. orq_ai_sdk/models/creatererankop.py +218 -26
  26. orq_ai_sdk/models/createspeechop.py +174 -24
  27. orq_ai_sdk/models/createtoolop.py +6 -6
  28. orq_ai_sdk/models/createtranscriptionop.py +180 -10
  29. orq_ai_sdk/models/createtranslationop.py +172 -10
  30. orq_ai_sdk/models/filegetop.py +1 -1
  31. orq_ai_sdk/models/filelistop.py +1 -1
  32. orq_ai_sdk/models/fileuploadop.py +1 -1
  33. orq_ai_sdk/models/generateconversationnameop.py +1 -1
  34. orq_ai_sdk/models/getallpromptsop.py +6 -0
  35. orq_ai_sdk/models/getalltoolsop.py +6 -6
  36. orq_ai_sdk/models/getevalsop.py +14 -14
  37. orq_ai_sdk/models/getonepromptop.py +6 -0
  38. orq_ai_sdk/models/getpromptversionop.py +6 -0
  39. orq_ai_sdk/models/listagentsop.py +12 -0
  40. orq_ai_sdk/models/listdatasetdatapointsop.py +4 -4
  41. orq_ai_sdk/models/listdatasetsop.py +1 -1
  42. orq_ai_sdk/models/listdatasourcesop.py +1 -1
  43. orq_ai_sdk/models/listidentitiesop.py +1 -1
  44. orq_ai_sdk/models/listpromptversionsop.py +6 -0
  45. orq_ai_sdk/models/partdoneevent.py +1 -1
  46. orq_ai_sdk/models/reasoningpart.py +1 -1
  47. orq_ai_sdk/models/retrieveagentrequestop.py +12 -0
  48. orq_ai_sdk/models/retrievedatapointop.py +4 -4
  49. orq_ai_sdk/models/retrievedatasetop.py +1 -1
  50. orq_ai_sdk/models/retrievedatasourceop.py +1 -1
  51. orq_ai_sdk/models/retrieveidentityop.py +1 -1
  52. orq_ai_sdk/models/retrievetoolop.py +6 -6
  53. orq_ai_sdk/models/runagentop.py +13 -1
  54. orq_ai_sdk/models/streamrunagentop.py +13 -1
  55. orq_ai_sdk/models/updateagentop.py +24 -0
  56. orq_ai_sdk/models/updateconversationop.py +1 -1
  57. orq_ai_sdk/models/updatedatapointop.py +4 -4
  58. orq_ai_sdk/models/updatedatasetop.py +1 -1
  59. orq_ai_sdk/models/updatedatasourceop.py +1 -1
  60. orq_ai_sdk/models/updateevalop.py +14 -14
  61. orq_ai_sdk/models/updateidentityop.py +1 -1
  62. orq_ai_sdk/models/updatepromptop.py +12 -0
  63. orq_ai_sdk/models/updatetoolop.py +7 -7
  64. orq_ai_sdk/orq_completions.py +6 -0
  65. orq_ai_sdk/rerank.py +98 -0
  66. orq_ai_sdk/speech.py +83 -1
  67. orq_ai_sdk/transcriptions.py +90 -0
  68. orq_ai_sdk/translations.py +87 -1
  69. orq_ai_sdk/variations.py +111 -1
  70. {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/METADATA +1 -1
  71. {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/RECORD +73 -73
  72. {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/WHEEL +1 -1
  73. {orq_ai_sdk-4.2.8.dist-info → orq_ai_sdk-4.2.10.dist-info}/top_level.txt +0 -0
@@ -104,7 +104,7 @@ class ConversationResponse(BaseModel):
104
104
  r"""Unix timestamp in milliseconds when the conversation was last modified."""
105
105
 
106
106
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
107
- "conv_01kfvjh98xpq7txy94b17s96kw"
107
+ "conv_01kfx9bgb1839ewgg9511964xe"
108
108
  )
109
109
  r"""Unique conversation identifier with `conv_` prefix."""
110
110
 
@@ -110,7 +110,7 @@ class ConversationWithMessagesResponse(BaseModel):
110
110
  r"""Conversation messages ordered chronologically (oldest first)."""
111
111
 
112
112
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
113
- "conv_01kfvjh992xegc77y1g4epck6h"
113
+ "conv_01kfx9bgb74064wnw21p55gase"
114
114
  )
115
115
  r"""Unique conversation identifier with `conv_` prefix."""
116
116
 
@@ -511,6 +511,8 @@ class Timeout(BaseModel):
511
511
  class ParametersTypedDict(TypedDict):
512
512
  r"""Model behavior parameters that control how the model generates responses. Common parameters: `temperature` (0-1, randomness), `max_completion_tokens` (max output length), `top_p` (sampling diversity). Advanced: `frequency_penalty`, `presence_penalty`, `response_format` (JSON/structured), `reasoning_effort`, `seed` (reproducibility). Support varies by model - consult AI Gateway documentation."""
513
513
 
514
+ name: NotRequired[str]
515
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
514
516
  audio: NotRequired[Nullable[ModelConfigurationAudioTypedDict]]
515
517
  r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
516
518
  frequency_penalty: NotRequired[Nullable[float]]
@@ -582,6 +584,9 @@ class ParametersTypedDict(TypedDict):
582
584
  class Parameters(BaseModel):
583
585
  r"""Model behavior parameters that control how the model generates responses. Common parameters: `temperature` (0-1, randomness), `max_completion_tokens` (max output length), `top_p` (sampling diversity). Advanced: `frequency_penalty`, `presence_penalty`, `response_format` (JSON/structured), `reasoning_effort`, `seed` (reproducibility). Support varies by model - consult AI Gateway documentation."""
584
586
 
587
+ name: Optional[str] = None
588
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
589
+
585
590
  audio: OptionalNullable[ModelConfigurationAudio] = UNSET
586
591
  r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
587
592
 
@@ -677,6 +682,7 @@ class Parameters(BaseModel):
677
682
  def serialize_model(self, handler):
678
683
  optional_fields = set(
679
684
  [
685
+ "name",
680
686
  "audio",
681
687
  "frequency_penalty",
682
688
  "max_tokens",
@@ -1348,6 +1354,8 @@ class FallbackModelConfigurationTimeout(BaseModel):
1348
1354
  class FallbackModelConfigurationParametersTypedDict(TypedDict):
1349
1355
  r"""Optional model parameters specific to this fallback model. Overrides primary model parameters if this fallback is used."""
1350
1356
 
1357
+ name: NotRequired[str]
1358
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
1351
1359
  audio: NotRequired[Nullable[FallbackModelConfigurationAudioTypedDict]]
1352
1360
  r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
1353
1361
  frequency_penalty: NotRequired[Nullable[float]]
@@ -1419,6 +1427,9 @@ class FallbackModelConfigurationParametersTypedDict(TypedDict):
1419
1427
  class FallbackModelConfigurationParameters(BaseModel):
1420
1428
  r"""Optional model parameters specific to this fallback model. Overrides primary model parameters if this fallback is used."""
1421
1429
 
1430
+ name: Optional[str] = None
1431
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
1432
+
1422
1433
  audio: OptionalNullable[FallbackModelConfigurationAudio] = UNSET
1423
1434
  r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
1424
1435
 
@@ -1514,6 +1525,7 @@ class FallbackModelConfigurationParameters(BaseModel):
1514
1525
  def serialize_model(self, handler):
1515
1526
  optional_fields = set(
1516
1527
  [
1528
+ "name",
1517
1529
  "audio",
1518
1530
  "frequency_penalty",
1519
1531
  "max_tokens",
@@ -3496,6 +3508,8 @@ class CreateAgentRequestTimeout(BaseModel):
3496
3508
  class CreateAgentRequestParametersTypedDict(TypedDict):
3497
3509
  r"""Model behavior parameters (snake_case) stored as part of the agent configuration. These become the default parameters used when the agent is executed. Commonly used: temperature (0-1, controls randomness), max_completion_tokens (response length), top_p (nucleus sampling). Advanced: frequency_penalty, presence_penalty, response_format (JSON/structured output), reasoning_effort (for o1/thinking models), seed (reproducibility), stop sequences. Model-specific support varies. Runtime parameters in agent execution requests can override these defaults."""
3498
3510
 
3511
+ name: NotRequired[str]
3512
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
3499
3513
  audio: NotRequired[Nullable[CreateAgentRequestAudioTypedDict]]
3500
3514
  r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
3501
3515
  frequency_penalty: NotRequired[Nullable[float]]
@@ -3565,6 +3579,9 @@ class CreateAgentRequestParametersTypedDict(TypedDict):
3565
3579
  class CreateAgentRequestParameters(BaseModel):
3566
3580
  r"""Model behavior parameters (snake_case) stored as part of the agent configuration. These become the default parameters used when the agent is executed. Commonly used: temperature (0-1, controls randomness), max_completion_tokens (response length), top_p (nucleus sampling). Advanced: frequency_penalty, presence_penalty, response_format (JSON/structured output), reasoning_effort (for o1/thinking models), seed (reproducibility), stop sequences. Model-specific support varies. Runtime parameters in agent execution requests can override these defaults."""
3567
3581
 
3582
+ name: Optional[str] = None
3583
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
3584
+
3568
3585
  audio: OptionalNullable[CreateAgentRequestAudio] = UNSET
3569
3586
  r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
3570
3587
 
@@ -3660,6 +3677,7 @@ class CreateAgentRequestParameters(BaseModel):
3660
3677
  def serialize_model(self, handler):
3661
3678
  optional_fields = set(
3662
3679
  [
3680
+ "name",
3663
3681
  "audio",
3664
3682
  "frequency_penalty",
3665
3683
  "max_tokens",
@@ -4309,6 +4327,8 @@ class CreateAgentRequestFallbackModelConfigurationTimeout(BaseModel):
4309
4327
  class CreateAgentRequestFallbackModelConfigurationParametersTypedDict(TypedDict):
4310
4328
  r"""Optional model parameters specific to this fallback model. Overrides primary model parameters if this fallback is used."""
4311
4329
 
4330
+ name: NotRequired[str]
4331
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
4312
4332
  audio: NotRequired[
4313
4333
  Nullable[CreateAgentRequestFallbackModelConfigurationAudioTypedDict]
4314
4334
  ]
@@ -4400,6 +4420,9 @@ class CreateAgentRequestFallbackModelConfigurationParametersTypedDict(TypedDict)
4400
4420
  class CreateAgentRequestFallbackModelConfigurationParameters(BaseModel):
4401
4421
  r"""Optional model parameters specific to this fallback model. Overrides primary model parameters if this fallback is used."""
4402
4422
 
4423
+ name: Optional[str] = None
4424
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
4425
+
4403
4426
  audio: OptionalNullable[CreateAgentRequestFallbackModelConfigurationAudio] = UNSET
4404
4427
  r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
4405
4428
 
@@ -4511,6 +4534,7 @@ class CreateAgentRequestFallbackModelConfigurationParameters(BaseModel):
4511
4534
  def serialize_model(self, handler):
4512
4535
  optional_fields = set(
4513
4536
  [
4537
+ "name",
4514
4538
  "audio",
4515
4539
  "frequency_penalty",
4516
4540
  "max_tokens",
@@ -2468,6 +2468,8 @@ class CreateChatCompletionRequestBodyTypedDict(TypedDict):
2468
2468
  r"""Model ID used to generate the response, like `openai/gpt-4o` or `anthropic/claude-haiku-4-5-20251001`. The AI Gateway offers a wide range of models with different capabilities, performance characteristics, and price points. Refer to the (Supported models)[/docs/proxy/supported-models] to browse available models."""
2469
2469
  metadata: NotRequired[Dict[str, str]]
2470
2470
  r"""Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can have a maximum length of 64 characters and values can have a maximum length of 512 characters."""
2471
+ name: NotRequired[str]
2472
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
2471
2473
  audio: NotRequired[Nullable[CreateChatCompletionAudioTypedDict]]
2472
2474
  r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
2473
2475
  frequency_penalty: NotRequired[Nullable[float]]
@@ -2549,6 +2551,9 @@ class CreateChatCompletionRequestBody(BaseModel):
2549
2551
  metadata: Optional[Dict[str, str]] = None
2550
2552
  r"""Set of 16 key-value pairs that can be attached to an object. This can be useful for storing additional information about the object in a structured format. Keys can have a maximum length of 64 characters and values can have a maximum length of 512 characters."""
2551
2553
 
2554
+ name: Optional[str] = None
2555
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
2556
+
2552
2557
  audio: OptionalNullable[CreateChatCompletionAudio] = UNSET
2553
2558
  r"""Parameters for audio output. Required when audio output is requested with modalities: [\"audio\"]. Learn more."""
2554
2559
 
@@ -2658,6 +2663,7 @@ class CreateChatCompletionRequestBody(BaseModel):
2658
2663
  optional_fields = set(
2659
2664
  [
2660
2665
  "metadata",
2666
+ "name",
2661
2667
  "audio",
2662
2668
  "frequency_penalty",
2663
2669
  "max_tokens",
@@ -33,6 +33,16 @@ CreateCompletionStop = TypeAliasType("CreateCompletionStop", Union[str, List[str
33
33
  r"""Up to 4 sequences where the API will stop generating further tokens. The returned text will not contain the stop sequence."""
34
34
 
35
35
 
36
+ class CreateCompletionFallbacksTypedDict(TypedDict):
37
+ model: str
38
+ r"""Fallback model identifier"""
39
+
40
+
41
+ class CreateCompletionFallbacks(BaseModel):
42
+ model: str
43
+ r"""Fallback model identifier"""
44
+
45
+
36
46
  class CreateCompletionRetryTypedDict(TypedDict):
37
47
  r"""Retry configuration for the request"""
38
48
 
@@ -68,12 +78,150 @@ class CreateCompletionRetry(BaseModel):
68
78
  return m
69
79
 
70
80
 
71
- class CreateCompletionFallbacksTypedDict(TypedDict):
81
+ CreateCompletionType = Literal["exact_match",]
82
+
83
+
84
+ class CreateCompletionCacheTypedDict(TypedDict):
85
+ r"""Cache configuration for the request."""
86
+
87
+ type: CreateCompletionType
88
+ ttl: NotRequired[float]
89
+ r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
90
+
91
+
92
+ class CreateCompletionCache(BaseModel):
93
+ r"""Cache configuration for the request."""
94
+
95
+ type: CreateCompletionType
96
+
97
+ ttl: Optional[float] = 1800
98
+ r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
99
+
100
+ @model_serializer(mode="wrap")
101
+ def serialize_model(self, handler):
102
+ optional_fields = set(["ttl"])
103
+ serialized = handler(self)
104
+ m = {}
105
+
106
+ for n, f in type(self).model_fields.items():
107
+ k = f.alias or n
108
+ val = serialized.get(k)
109
+
110
+ if val != UNSET_SENTINEL:
111
+ if val is not None or k not in optional_fields:
112
+ m[k] = val
113
+
114
+ return m
115
+
116
+
117
+ CreateCompletionLoadBalancerType = Literal["weight_based",]
118
+
119
+
120
+ class CreateCompletionLoadBalancerModelsTypedDict(TypedDict):
121
+ model: str
122
+ r"""Model identifier for load balancing"""
123
+ weight: NotRequired[float]
124
+ r"""Weight assigned to this model for load balancing"""
125
+
126
+
127
+ class CreateCompletionLoadBalancerModels(BaseModel):
128
+ model: str
129
+ r"""Model identifier for load balancing"""
130
+
131
+ weight: Optional[float] = 0.5
132
+ r"""Weight assigned to this model for load balancing"""
133
+
134
+ @model_serializer(mode="wrap")
135
+ def serialize_model(self, handler):
136
+ optional_fields = set(["weight"])
137
+ serialized = handler(self)
138
+ m = {}
139
+
140
+ for n, f in type(self).model_fields.items():
141
+ k = f.alias or n
142
+ val = serialized.get(k)
143
+
144
+ if val != UNSET_SENTINEL:
145
+ if val is not None or k not in optional_fields:
146
+ m[k] = val
147
+
148
+ return m
149
+
150
+
151
+ class CreateCompletionLoadBalancer1TypedDict(TypedDict):
152
+ type: CreateCompletionLoadBalancerType
153
+ models: List[CreateCompletionLoadBalancerModelsTypedDict]
154
+
155
+
156
+ class CreateCompletionLoadBalancer1(BaseModel):
157
+ type: CreateCompletionLoadBalancerType
158
+
159
+ models: List[CreateCompletionLoadBalancerModels]
160
+
161
+
162
+ CreateCompletionLoadBalancerTypedDict = CreateCompletionLoadBalancer1TypedDict
163
+ r"""Load balancer configuration for the request."""
164
+
165
+
166
+ CreateCompletionLoadBalancer = CreateCompletionLoadBalancer1
167
+ r"""Load balancer configuration for the request."""
168
+
169
+
170
+ class CreateCompletionTimeoutTypedDict(TypedDict):
171
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
172
+
173
+ call_timeout: float
174
+ r"""Timeout value in milliseconds"""
175
+
176
+
177
+ class CreateCompletionTimeout(BaseModel):
178
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
179
+
180
+ call_timeout: float
181
+ r"""Timeout value in milliseconds"""
182
+
183
+
184
+ class CreateCompletionRouterCompletionsRetryTypedDict(TypedDict):
185
+ r"""Retry configuration for the request"""
186
+
187
+ count: NotRequired[float]
188
+ r"""Number of retry attempts (1-5)"""
189
+ on_codes: NotRequired[List[float]]
190
+ r"""HTTP status codes that trigger retry logic"""
191
+
192
+
193
+ class CreateCompletionRouterCompletionsRetry(BaseModel):
194
+ r"""Retry configuration for the request"""
195
+
196
+ count: Optional[float] = 3
197
+ r"""Number of retry attempts (1-5)"""
198
+
199
+ on_codes: Optional[List[float]] = None
200
+ r"""HTTP status codes that trigger retry logic"""
201
+
202
+ @model_serializer(mode="wrap")
203
+ def serialize_model(self, handler):
204
+ optional_fields = set(["count", "on_codes"])
205
+ serialized = handler(self)
206
+ m = {}
207
+
208
+ for n, f in type(self).model_fields.items():
209
+ k = f.alias or n
210
+ val = serialized.get(k)
211
+
212
+ if val != UNSET_SENTINEL:
213
+ if val is not None or k not in optional_fields:
214
+ m[k] = val
215
+
216
+ return m
217
+
218
+
219
+ class CreateCompletionRouterCompletionsFallbacksTypedDict(TypedDict):
72
220
  model: str
73
221
  r"""Fallback model identifier"""
74
222
 
75
223
 
76
- class CreateCompletionFallbacks(BaseModel):
224
+ class CreateCompletionRouterCompletionsFallbacks(BaseModel):
77
225
  model: str
78
226
  r"""Fallback model identifier"""
79
227
 
@@ -179,21 +327,21 @@ CreateCompletionInputs = TypeAliasType(
179
327
  r"""Values to replace in the prompt messages using {{variableName}} syntax"""
180
328
 
181
329
 
182
- CreateCompletionType = Literal["exact_match",]
330
+ CreateCompletionRouterCompletionsType = Literal["exact_match",]
183
331
 
184
332
 
185
- class CreateCompletionCacheTypedDict(TypedDict):
333
+ class CreateCompletionRouterCompletionsCacheTypedDict(TypedDict):
186
334
  r"""Cache configuration for the request."""
187
335
 
188
- type: CreateCompletionType
336
+ type: CreateCompletionRouterCompletionsType
189
337
  ttl: NotRequired[float]
190
338
  r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
191
339
 
192
340
 
193
- class CreateCompletionCache(BaseModel):
341
+ class CreateCompletionRouterCompletionsCache(BaseModel):
194
342
  r"""Cache configuration for the request."""
195
343
 
196
- type: CreateCompletionType
344
+ type: CreateCompletionRouterCompletionsType
197
345
 
198
346
  ttl: Optional[float] = 1800
199
347
  r"""Time to live for cached responses in seconds. Maximum 259200 seconds (3 days)."""
@@ -992,17 +1140,17 @@ class CreateCompletionKnowledgeBases(BaseModel):
992
1140
  return m
993
1141
 
994
1142
 
995
- CreateCompletionLoadBalancerType = Literal["weight_based",]
1143
+ CreateCompletionLoadBalancerRouterCompletionsType = Literal["weight_based",]
996
1144
 
997
1145
 
998
- class CreateCompletionLoadBalancerModelsTypedDict(TypedDict):
1146
+ class CreateCompletionLoadBalancerRouterCompletionsModelsTypedDict(TypedDict):
999
1147
  model: str
1000
1148
  r"""Model identifier for load balancing"""
1001
1149
  weight: NotRequired[float]
1002
1150
  r"""Weight assigned to this model for load balancing"""
1003
1151
 
1004
1152
 
1005
- class CreateCompletionLoadBalancerModels(BaseModel):
1153
+ class CreateCompletionLoadBalancerRouterCompletionsModels(BaseModel):
1006
1154
  model: str
1007
1155
  r"""Model identifier for load balancing"""
1008
1156
 
@@ -1026,33 +1174,37 @@ class CreateCompletionLoadBalancerModels(BaseModel):
1026
1174
  return m
1027
1175
 
1028
1176
 
1029
- class CreateCompletionLoadBalancer1TypedDict(TypedDict):
1030
- type: CreateCompletionLoadBalancerType
1031
- models: List[CreateCompletionLoadBalancerModelsTypedDict]
1177
+ class CreateCompletionLoadBalancerRouterCompletions1TypedDict(TypedDict):
1178
+ type: CreateCompletionLoadBalancerRouterCompletionsType
1179
+ models: List[CreateCompletionLoadBalancerRouterCompletionsModelsTypedDict]
1032
1180
 
1033
1181
 
1034
- class CreateCompletionLoadBalancer1(BaseModel):
1035
- type: CreateCompletionLoadBalancerType
1182
+ class CreateCompletionLoadBalancerRouterCompletions1(BaseModel):
1183
+ type: CreateCompletionLoadBalancerRouterCompletionsType
1036
1184
 
1037
- models: List[CreateCompletionLoadBalancerModels]
1185
+ models: List[CreateCompletionLoadBalancerRouterCompletionsModels]
1038
1186
 
1039
1187
 
1040
- CreateCompletionLoadBalancerTypedDict = CreateCompletionLoadBalancer1TypedDict
1188
+ CreateCompletionRouterCompletionsLoadBalancerTypedDict = (
1189
+ CreateCompletionLoadBalancerRouterCompletions1TypedDict
1190
+ )
1041
1191
  r"""Array of models with weights for load balancing requests"""
1042
1192
 
1043
1193
 
1044
- CreateCompletionLoadBalancer = CreateCompletionLoadBalancer1
1194
+ CreateCompletionRouterCompletionsLoadBalancer = (
1195
+ CreateCompletionLoadBalancerRouterCompletions1
1196
+ )
1045
1197
  r"""Array of models with weights for load balancing requests"""
1046
1198
 
1047
1199
 
1048
- class CreateCompletionTimeoutTypedDict(TypedDict):
1200
+ class CreateCompletionRouterCompletionsTimeoutTypedDict(TypedDict):
1049
1201
  r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
1050
1202
 
1051
1203
  call_timeout: float
1052
1204
  r"""Timeout value in milliseconds"""
1053
1205
 
1054
1206
 
1055
- class CreateCompletionTimeout(BaseModel):
1207
+ class CreateCompletionRouterCompletionsTimeout(BaseModel):
1056
1208
  r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
1057
1209
 
1058
1210
  call_timeout: float
@@ -1067,9 +1219,9 @@ class CreateCompletionOrqTypedDict(TypedDict):
1067
1219
 
1068
1220
  name: NotRequired[str]
1069
1221
  r"""The name to display on the trace. If not specified, the default system name will be used."""
1070
- retry: NotRequired[CreateCompletionRetryTypedDict]
1222
+ retry: NotRequired[CreateCompletionRouterCompletionsRetryTypedDict]
1071
1223
  r"""Retry configuration for the request"""
1072
- fallbacks: NotRequired[List[CreateCompletionFallbacksTypedDict]]
1224
+ fallbacks: NotRequired[List[CreateCompletionRouterCompletionsFallbacksTypedDict]]
1073
1225
  r"""Array of fallback models to use if primary model fails"""
1074
1226
  prompt: NotRequired[CreateCompletionPromptTypedDict]
1075
1227
  r"""Prompt configuration for the request"""
@@ -1081,12 +1233,12 @@ class CreateCompletionOrqTypedDict(TypedDict):
1081
1233
  r"""Thread information to group related requests"""
1082
1234
  inputs: NotRequired[CreateCompletionInputsTypedDict]
1083
1235
  r"""Values to replace in the prompt messages using {{variableName}} syntax"""
1084
- cache: NotRequired[CreateCompletionCacheTypedDict]
1236
+ cache: NotRequired[CreateCompletionRouterCompletionsCacheTypedDict]
1085
1237
  r"""Cache configuration for the request."""
1086
1238
  knowledge_bases: NotRequired[List[CreateCompletionKnowledgeBasesTypedDict]]
1087
- load_balancer: NotRequired[CreateCompletionLoadBalancerTypedDict]
1239
+ load_balancer: NotRequired[CreateCompletionRouterCompletionsLoadBalancerTypedDict]
1088
1240
  r"""Array of models with weights for load balancing requests"""
1089
- timeout: NotRequired[CreateCompletionTimeoutTypedDict]
1241
+ timeout: NotRequired[CreateCompletionRouterCompletionsTimeoutTypedDict]
1090
1242
  r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
1091
1243
 
1092
1244
 
@@ -1099,10 +1251,10 @@ class CreateCompletionOrq(BaseModel):
1099
1251
  name: Optional[str] = None
1100
1252
  r"""The name to display on the trace. If not specified, the default system name will be used."""
1101
1253
 
1102
- retry: Optional[CreateCompletionRetry] = None
1254
+ retry: Optional[CreateCompletionRouterCompletionsRetry] = None
1103
1255
  r"""Retry configuration for the request"""
1104
1256
 
1105
- fallbacks: Optional[List[CreateCompletionFallbacks]] = None
1257
+ fallbacks: Optional[List[CreateCompletionRouterCompletionsFallbacks]] = None
1106
1258
  r"""Array of fallback models to use if primary model fails"""
1107
1259
 
1108
1260
  prompt: Optional[CreateCompletionPrompt] = None
@@ -1125,15 +1277,15 @@ class CreateCompletionOrq(BaseModel):
1125
1277
  inputs: Optional[CreateCompletionInputs] = None
1126
1278
  r"""Values to replace in the prompt messages using {{variableName}} syntax"""
1127
1279
 
1128
- cache: Optional[CreateCompletionCache] = None
1280
+ cache: Optional[CreateCompletionRouterCompletionsCache] = None
1129
1281
  r"""Cache configuration for the request."""
1130
1282
 
1131
1283
  knowledge_bases: Optional[List[CreateCompletionKnowledgeBases]] = None
1132
1284
 
1133
- load_balancer: Optional[CreateCompletionLoadBalancer] = None
1285
+ load_balancer: Optional[CreateCompletionRouterCompletionsLoadBalancer] = None
1134
1286
  r"""Array of models with weights for load balancing requests"""
1135
1287
 
1136
- timeout: Optional[CreateCompletionTimeout] = None
1288
+ timeout: Optional[CreateCompletionRouterCompletionsTimeout] = None
1137
1289
  r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
1138
1290
 
1139
1291
  @model_serializer(mode="wrap")
@@ -1193,6 +1345,18 @@ class CreateCompletionRequestBodyTypedDict(TypedDict):
1193
1345
  r"""How many completions to generate for each prompt. Note: Because this parameter generates many completions, it can quickly consume your token quota."""
1194
1346
  user: NotRequired[str]
1195
1347
  r"""A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse."""
1348
+ name: NotRequired[str]
1349
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
1350
+ fallbacks: NotRequired[List[CreateCompletionFallbacksTypedDict]]
1351
+ r"""Array of fallback models to use if primary model fails"""
1352
+ retry: NotRequired[CreateCompletionRetryTypedDict]
1353
+ r"""Retry configuration for the request"""
1354
+ cache: NotRequired[CreateCompletionCacheTypedDict]
1355
+ r"""Cache configuration for the request."""
1356
+ load_balancer: NotRequired[CreateCompletionLoadBalancerTypedDict]
1357
+ r"""Load balancer configuration for the request."""
1358
+ timeout: NotRequired[CreateCompletionTimeoutTypedDict]
1359
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
1196
1360
  orq: NotRequired[CreateCompletionOrqTypedDict]
1197
1361
  r"""Leverage Orq's intelligent routing capabilities to enhance your AI application with enterprise-grade reliability and observability. Orq provides automatic request management including retries on failures, model fallbacks for high availability, identity-level analytics tracking, conversation threading, and dynamic prompt templating with variable substitution."""
1198
1362
  stream: NotRequired[bool]
@@ -1235,6 +1399,24 @@ class CreateCompletionRequestBody(BaseModel):
1235
1399
  user: Optional[str] = None
1236
1400
  r"""A unique identifier representing your end-user, which can help OpenAI to monitor and detect abuse."""
1237
1401
 
1402
+ name: Optional[str] = None
1403
+ r"""The name to display on the trace. If not specified, the default system name will be used."""
1404
+
1405
+ fallbacks: Optional[List[CreateCompletionFallbacks]] = None
1406
+ r"""Array of fallback models to use if primary model fails"""
1407
+
1408
+ retry: Optional[CreateCompletionRetry] = None
1409
+ r"""Retry configuration for the request"""
1410
+
1411
+ cache: Optional[CreateCompletionCache] = None
1412
+ r"""Cache configuration for the request."""
1413
+
1414
+ load_balancer: Optional[CreateCompletionLoadBalancer] = None
1415
+ r"""Load balancer configuration for the request."""
1416
+
1417
+ timeout: Optional[CreateCompletionTimeout] = None
1418
+ r"""Timeout configuration to apply to the request. If the request exceeds the timeout, it will be retried or fallback to the next model if configured."""
1419
+
1238
1420
  orq: Annotated[
1239
1421
  Optional[CreateCompletionOrq],
1240
1422
  pydantic.Field(
@@ -1259,6 +1441,12 @@ class CreateCompletionRequestBody(BaseModel):
1259
1441
  "top_p",
1260
1442
  "n",
1261
1443
  "user",
1444
+ "name",
1445
+ "fallbacks",
1446
+ "retry",
1447
+ "cache",
1448
+ "load_balancer",
1449
+ "timeout",
1262
1450
  "orq",
1263
1451
  "stream",
1264
1452
  ]
@@ -132,7 +132,7 @@ class CreateContactResponseBody(BaseModel):
132
132
  created: Optional[datetime] = None
133
133
  r"""The date and time the resource was created"""
134
134
 
135
- updated: Optional[datetime] = parse_datetime("2026-01-25T21:56:21.657Z")
135
+ updated: Optional[datetime] = parse_datetime("2026-01-26T13:54:24.067Z")
136
136
  r"""The date and time the resource was last updated"""
137
137
 
138
138
  @model_serializer(mode="wrap")
@@ -199,7 +199,7 @@ class CreateConversationResponseBody(BaseModel):
199
199
  r"""Unix timestamp in milliseconds when the conversation was last modified."""
200
200
 
201
201
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
202
- "conv_01kfvjh98z6b5qsr5af3sr1c69"
202
+ "conv_01kfx9bgb48qctkc6mmvyz4sm5"
203
203
  )
204
204
  r"""Unique conversation identifier with `conv_` prefix."""
205
205
 
@@ -119,7 +119,7 @@ class CreateConversationResponsePartReasoningPart(BaseModel):
119
119
  r"""The reasoning or thought process behind the response. Used for chain-of-thought or extended thinking."""
120
120
 
121
121
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
122
- "reasoning_01kfvjh9a1s2nqtxrehsab13cd"
122
+ "reasoning_01kfx9bgby6na67cpc20ek4eqy"
123
123
  )
124
124
  r"""Unique identifier for the part. Format: reasoning_{ulid} (e.g., reasoning_01hxyz...)"""
125
125
 
@@ -211,7 +211,7 @@ class DeltaReasoningPart(BaseModel):
211
211
  r"""The reasoning or thought process behind the response. Used for chain-of-thought or extended thinking."""
212
212
 
213
213
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
214
- "reasoning_01kfvjh99sbd2ynq0r65y5n5hj"
214
+ "reasoning_01kfx9bgbrjkd2645ybrar3bz8"
215
215
  )
216
216
  r"""Unique identifier for the part. Format: reasoning_{ulid} (e.g., reasoning_01hxyz...)"""
217
217
 
@@ -1434,7 +1434,7 @@ class Evaluations3(BaseModel):
1434
1434
 
1435
1435
  source: Optional[CreateDatasetItemEvaluationsDatasetsSource] = "orq"
1436
1436
 
1437
- reviewed_at: Optional[datetime] = parse_datetime("2026-01-25T21:56:35.353Z")
1437
+ reviewed_at: Optional[datetime] = parse_datetime("2026-01-26T13:54:37.692Z")
1438
1438
  r"""The date and time the item was reviewed"""
1439
1439
 
1440
1440
  @model_serializer(mode="wrap")
@@ -1502,7 +1502,7 @@ class Evaluations2(BaseModel):
1502
1502
 
1503
1503
  source: Optional[CreateDatasetItemEvaluationsSource] = "orq"
1504
1504
 
1505
- reviewed_at: Optional[datetime] = parse_datetime("2026-01-25T21:56:35.352Z")
1505
+ reviewed_at: Optional[datetime] = parse_datetime("2026-01-26T13:54:37.691Z")
1506
1506
  r"""The date and time the item was reviewed"""
1507
1507
 
1508
1508
  @model_serializer(mode="wrap")
@@ -1570,7 +1570,7 @@ class Evaluations1(BaseModel):
1570
1570
 
1571
1571
  source: Optional[EvaluationsSource] = "orq"
1572
1572
 
1573
- reviewed_at: Optional[datetime] = parse_datetime("2026-01-25T21:56:35.352Z")
1573
+ reviewed_at: Optional[datetime] = parse_datetime("2026-01-26T13:54:37.690Z")
1574
1574
  r"""The date and time the item was reviewed"""
1575
1575
 
1576
1576
  @model_serializer(mode="wrap")
@@ -1665,7 +1665,7 @@ class CreateDatasetItemResponseBody(BaseModel):
1665
1665
  created: Optional[datetime] = None
1666
1666
  r"""The date and time the resource was created"""
1667
1667
 
1668
- updated: Optional[datetime] = parse_datetime("2026-01-25T21:56:21.657Z")
1668
+ updated: Optional[datetime] = parse_datetime("2026-01-26T13:54:24.067Z")
1669
1669
  r"""The date and time the resource was last updated"""
1670
1670
 
1671
1671
  @model_serializer(mode="wrap")
@@ -94,7 +94,7 @@ class CreateDatasetResponseBody(BaseModel):
94
94
  created: Optional[datetime] = None
95
95
  r"""The date and time the resource was created"""
96
96
 
97
- updated: Optional[datetime] = parse_datetime("2026-01-25T21:56:21.657Z")
97
+ updated: Optional[datetime] = parse_datetime("2026-01-26T13:54:24.067Z")
98
98
  r"""The date and time the resource was last updated"""
99
99
 
100
100
  @model_serializer(mode="wrap")
@@ -314,7 +314,7 @@ class CreateDatasourceResponseBody(BaseModel):
314
314
  r"""The number of chunks in the datasource"""
315
315
 
316
316
  id: Annotated[Optional[str], pydantic.Field(alias="_id")] = (
317
- "01KFVJH9RXNFN8BFTPY72M9XCJ"
317
+ "01KFX9BGWEPA9CZB0JRC31VCXM"
318
318
  )
319
319
  r"""The unique identifier of the data source"""
320
320