objectiveai-sdk 2.0.5

ObjectiveAI SDK, definitions, and utilities
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
/// Returns JSON Schemas for all public types that derive `JsonSchema`.
///
/// Each schema is generated via `schemars::schema_for!()` and includes
/// the type's `$defs` for referenced types. The schema title matches
/// the `#[schemars(rename = "...")]` attribute on each type.
pub fn json_schemas() -> Vec<schemars::Schema> {
    let mut schemas = vec![
        schemars::schema_for!(crate::agent::InlineAgentBase),
        schemars::schema_for!(crate::agent::RemoteAgentBase),
        schemars::schema_for!(crate::agent::AgentBase),
        schemars::schema_for!(crate::agent::InlineAgent),
        schemars::schema_for!(crate::agent::RemoteAgent),
        schemars::schema_for!(crate::agent::Agent),
        schemars::schema_for!(crate::agent::InlineAgentBaseWithFallbacksOrRemote),
        schemars::schema_for!(crate::agent::claude_agent_sdk::AgentBase),
        schemars::schema_for!(crate::agent::claude_agent_sdk::Agent),
        schemars::schema_for!(crate::agent::claude_agent_sdk::Effort),
        schemars::schema_for!(crate::agent::claude_agent_sdk::OutputMode),
        schemars::schema_for!(crate::agent::claude_agent_sdk::Upstream),
        schemars::schema_for!(crate::agent::codex_sdk::AgentBase),
        schemars::schema_for!(crate::agent::codex_sdk::Agent),
        schemars::schema_for!(crate::agent::codex_sdk::Effort),
        schemars::schema_for!(crate::agent::codex_sdk::OutputMode),
        schemars::schema_for!(crate::agent::codex_sdk::Upstream),
        schemars::schema_for!(crate::agent::completions::message::AssistantMessage),
        schemars::schema_for!(crate::agent::completions::message::AssistantMessageExpression),
        schemars::schema_for!(crate::agent::completions::message::AssistantToolCall),
        schemars::schema_for!(crate::agent::completions::message::AssistantToolCallExpression),
        schemars::schema_for!(crate::agent::completions::message::AssistantToolCallFunction),
        schemars::schema_for!(crate::agent::completions::message::AssistantToolCallDelta),
        schemars::schema_for!(crate::agent::completions::message::AssistantToolCallType),
        schemars::schema_for!(crate::agent::completions::message::AssistantToolCallFunctionDelta),
        schemars::schema_for!(crate::agent::completions::message::AssistantToolCallFunctionExpression),
        schemars::schema_for!(crate::agent::completions::message::DeveloperMessage),
        schemars::schema_for!(crate::agent::completions::message::DeveloperMessageExpression),
        schemars::schema_for!(crate::agent::completions::message::Message),
        schemars::schema_for!(crate::agent::completions::message::MessageExpression),
        schemars::schema_for!(crate::agent::completions::message::RichContent),
        schemars::schema_for!(crate::agent::completions::message::RichContentExpression),
        schemars::schema_for!(crate::agent::completions::message::RichContentPart),
        schemars::schema_for!(crate::agent::completions::message::RichContentPartExpression),
        schemars::schema_for!(crate::agent::completions::message::ImageUrl),
        schemars::schema_for!(crate::agent::completions::message::ImageUrlDetail),
        schemars::schema_for!(crate::agent::completions::message::InputAudio),
        schemars::schema_for!(crate::agent::completions::message::VideoUrl),
        schemars::schema_for!(crate::agent::completions::message::File),
        schemars::schema_for!(crate::agent::completions::message::SimpleContent),
        schemars::schema_for!(crate::agent::completions::message::SimpleContentExpression),
        schemars::schema_for!(crate::agent::completions::message::SimpleContentPart),
        schemars::schema_for!(crate::agent::completions::message::SimpleContentPartExpression),
        schemars::schema_for!(crate::agent::completions::message::SystemMessage),
        schemars::schema_for!(crate::agent::completions::message::SystemMessageExpression),
        schemars::schema_for!(crate::agent::completions::message::ToolMessage),
        schemars::schema_for!(crate::agent::completions::message::ToolMessageExpression),
        schemars::schema_for!(crate::agent::completions::message::UserMessage),
        schemars::schema_for!(crate::agent::completions::message::UserMessageExpression),
        schemars::schema_for!(crate::agent::completions::request::AgentCompletionCreateParams),
        schemars::schema_for!(crate::agent::completions::request::AgentCompletionNotifyParams),
        schemars::schema_for!(crate::agent::completions::request::Provider),
        schemars::schema_for!(crate::agent::completions::request::ProviderDataCollection),
        schemars::schema_for!(crate::agent::completions::request::ProviderSort),
        schemars::schema_for!(crate::agent::completions::request::ProviderMaxPrice),
        schemars::schema_for!(crate::agent::completions::request::ResponseFormat),
        schemars::schema_for!(crate::agent::completions::request::ResponseFormatParam),
        schemars::schema_for!(crate::agent::completions::response::AssistantRole),
        schemars::schema_for!(crate::agent::completions::response::FinishReason),
        schemars::schema_for!(crate::agent::completions::response::Logprobs),
        schemars::schema_for!(crate::agent::completions::response::Logprob),
        schemars::schema_for!(crate::agent::completions::response::TopLogprob),
        schemars::schema_for!(crate::agent::completions::response::streaming::AgentCompletionChunk),
        schemars::schema_for!(crate::agent::completions::response::streaming::AssistantResponseChunk),
        schemars::schema_for!(crate::agent::completions::response::streaming::MessageChunk),
        schemars::schema_for!(crate::agent::completions::response::streaming::Object),
        schemars::schema_for!(crate::agent::completions::response::ToolResponse),
        schemars::schema_for!(crate::agent::completions::response::ToolRole),
        schemars::schema_for!(crate::agent::completions::response::unary::AgentCompletion),
        schemars::schema_for!(crate::agent::completions::response::unary::AssistantResponse),
        schemars::schema_for!(crate::agent::completions::response::unary::Message),
        schemars::schema_for!(crate::agent::completions::response::unary::Object),
        schemars::schema_for!(crate::agent::completions::response::UpstreamUsage),
        schemars::schema_for!(crate::agent::completions::response::Usage),
        schemars::schema_for!(crate::agent::completions::response::CompletionTokensDetails),
        schemars::schema_for!(crate::agent::completions::response::PromptTokensDetails),
        schemars::schema_for!(crate::agent::completions::response::CostDetails),
        schemars::schema_for!(crate::agent::Continuation),
        schemars::schema_for!(crate::agent::McpServer),
        schemars::schema_for!(crate::agent::claude_agent_sdk::Continuation),
        schemars::schema_for!(crate::agent::codex_sdk::Continuation),
        schemars::schema_for!(crate::agent::mock::AgentBase),
        schemars::schema_for!(crate::agent::mock::Agent),
        schemars::schema_for!(crate::agent::mock::Continuation),
        schemars::schema_for!(crate::agent::mock::Mode),
        schemars::schema_for!(crate::agent::mock::OutputMode),
        schemars::schema_for!(crate::agent::mock::Upstream),
        schemars::schema_for!(crate::agent::openrouter::AgentBase),
        schemars::schema_for!(crate::agent::openrouter::Agent),
        schemars::schema_for!(crate::agent::openrouter::OutputMode),
        schemars::schema_for!(crate::agent::openrouter::Provider),
        schemars::schema_for!(crate::agent::openrouter::ProviderQuantization),
        schemars::schema_for!(crate::agent::openrouter::Reasoning),
        schemars::schema_for!(crate::agent::openrouter::ReasoningEffort),
        schemars::schema_for!(crate::agent::openrouter::ReasoningSummaryVerbosity),
        schemars::schema_for!(crate::agent::openrouter::Stop),
        schemars::schema_for!(crate::agent::openrouter::Continuation),
        schemars::schema_for!(crate::agent::openrouter::Upstream),
        schemars::schema_for!(crate::agent::openrouter::Verbosity),
        schemars::schema_for!(crate::agent::OutputMode),
        schemars::schema_for!(crate::agent::request::ListAgentsRequest),
        schemars::schema_for!(crate::agent::request::ListAgentsSource),
        schemars::schema_for!(crate::agent::response::ListAgentResponse),
        schemars::schema_for!(crate::agent::response::GetAgentResponse),
        schemars::schema_for!(crate::agent::response::UsageAgentResponse),
        schemars::schema_for!(crate::agent::Upstream),
        schemars::schema_for!(crate::auth::ApiKeyWithMetadata),
        schemars::schema_for!(crate::auth::request::CreateApiKeyRequest),
        schemars::schema_for!(crate::auth::request::DisableApiKeyRequest),
        schemars::schema_for!(crate::auth::request::CreateOpenRouterByokApiKeyRequest),
        schemars::schema_for!(crate::auth::response::GetCreditsResponse),
        schemars::schema_for!(crate::auth::response::ListApiKeyResponse),
        schemars::schema_for!(crate::auth::response::ListApiKeyItem),
        schemars::schema_for!(crate::auth::response::GetOpenRouterByokApiKeyResponse),
        schemars::schema_for!(crate::swarm::InlineSwarmBase),
        schemars::schema_for!(crate::swarm::RemoteSwarmBase),
        schemars::schema_for!(crate::swarm::SwarmBase),
        schemars::schema_for!(crate::swarm::InlineSwarm),
        schemars::schema_for!(crate::swarm::RemoteSwarm),
        schemars::schema_for!(crate::swarm::Swarm),
        schemars::schema_for!(crate::swarm::InlineSwarmBaseOrRemote),
        schemars::schema_for!(crate::Weights),
        schemars::schema_for!(crate::WeightsEntry),
        schemars::schema_for!(crate::swarm::request::ListSwarmsRequest),
        schemars::schema_for!(crate::swarm::request::ListSwarmsSource),
        schemars::schema_for!(crate::swarm::response::ListSwarmResponse),
        schemars::schema_for!(crate::swarm::response::GetSwarmResponse),
        schemars::schema_for!(crate::swarm::response::UsageSwarmResponse),
        schemars::schema_for!(crate::error::ResponseError),
        schemars::schema_for!(crate::error::request::ErrorCreateParams),
        schemars::schema_for!(crate::error::response::ErrorResponse),
        schemars::schema_for!(crate::functions::alpha_scalar::RemoteFunction),
        schemars::schema_for!(crate::functions::alpha_scalar::InlineFunction),
        schemars::schema_for!(crate::functions::alpha_scalar::BranchTaskExpression),
        schemars::schema_for!(crate::functions::alpha_scalar::PartialPlaceholderBranchTaskExpression),
        schemars::schema_for!(crate::functions::alpha_scalar::LeafTaskExpression),
        schemars::schema_for!(crate::functions::alpha_scalar::ScalarFunctionTaskExpression),
        schemars::schema_for!(crate::functions::alpha_scalar::PlaceholderScalarFunctionTaskExpression),
        schemars::schema_for!(crate::functions::alpha_scalar::PartialPlaceholderScalarFunctionTaskExpression),
        schemars::schema_for!(crate::functions::alpha_scalar::VectorCompletionTaskExpression),
        schemars::schema_for!(crate::functions::alpha_vector::expression::VectorFunctionInputSchema),
        schemars::schema_for!(crate::functions::alpha_vector::expression::VectorFunctionInputValueExpression),
        schemars::schema_for!(crate::functions::alpha_vector::expression::VectorFunctionInputValue),
        schemars::schema_for!(crate::functions::alpha_vector::RemoteFunction),
        schemars::schema_for!(crate::functions::alpha_vector::InlineFunction),
        schemars::schema_for!(crate::functions::alpha_vector::BranchTaskExpression),
        schemars::schema_for!(crate::functions::alpha_vector::PartialPlaceholderBranchTaskExpression),
        schemars::schema_for!(crate::functions::alpha_vector::LeafTaskExpression),
        schemars::schema_for!(crate::functions::alpha_vector::ScalarFunctionTaskExpression),
        schemars::schema_for!(crate::functions::alpha_vector::VectorFunctionTaskExpression),
        schemars::schema_for!(crate::functions::alpha_vector::PlaceholderScalarFunctionTaskExpression),
        schemars::schema_for!(crate::functions::alpha_vector::PartialPlaceholderScalarFunctionTaskExpression),
        schemars::schema_for!(crate::functions::alpha_vector::PlaceholderVectorFunctionTaskExpression),
        schemars::schema_for!(crate::functions::alpha_vector::PartialPlaceholderVectorFunctionTaskExpression),
        schemars::schema_for!(crate::functions::alpha_vector::VectorCompletionTaskExpression),
        schemars::schema_for!(crate::functions::check::ScalarFieldsValidation),
        schemars::schema_for!(crate::functions::check::VectorFieldsValidation),
        schemars::schema_for!(crate::functions::executions::request::Reasoning),
        schemars::schema_for!(crate::functions::executions::request::FunctionExecutionCreateParams),
        schemars::schema_for!(crate::functions::executions::request::Strategy),
        schemars::schema_for!(crate::functions::executions::response::streaming::FunctionExecutionChunk),
        schemars::schema_for!(crate::functions::executions::response::streaming::FunctionExecutionTaskChunk),
        schemars::schema_for!(crate::functions::executions::response::streaming::Object),
        schemars::schema_for!(crate::functions::executions::response::streaming::ReasoningSummaryChunk),
        schemars::schema_for!(crate::functions::executions::response::streaming::TaskChunk),
        schemars::schema_for!(crate::functions::executions::response::streaming::VectorCompletionTaskChunk),
        schemars::schema_for!(crate::functions::executions::response::unary::FunctionExecution),
        schemars::schema_for!(crate::functions::executions::response::unary::FunctionExecutionTask),
        schemars::schema_for!(crate::functions::executions::response::unary::Object),
        schemars::schema_for!(crate::functions::executions::response::unary::ReasoningSummary),
        schemars::schema_for!(crate::functions::executions::response::unary::Task),
        schemars::schema_for!(crate::functions::executions::response::unary::VectorCompletionTask),
        schemars::schema_for!(crate::functions::executions::RetryToken),
        schemars::schema_for!(crate::functions::expression::Expression),
        schemars::schema_for!(crate::functions::expression::InputValue),
        schemars::schema_for!(crate::functions::expression::InputValueExpression),
        schemars::schema_for!(crate::functions::expression::InputSchema),
        schemars::schema_for!(crate::functions::expression::AnyOfInputSchema),
        schemars::schema_for!(crate::functions::expression::ObjectInputSchema),
        schemars::schema_for!(crate::functions::expression::ArrayInputSchema),
        schemars::schema_for!(crate::functions::expression::StringInputSchema),
        schemars::schema_for!(crate::functions::expression::IntegerInputSchema),
        schemars::schema_for!(crate::functions::expression::NumberInputSchema),
        schemars::schema_for!(crate::functions::expression::BooleanInputSchema),
        schemars::schema_for!(crate::functions::expression::ImageInputSchema),
        schemars::schema_for!(crate::functions::expression::AudioInputSchema),
        schemars::schema_for!(crate::functions::expression::VideoInputSchema),
        schemars::schema_for!(crate::functions::expression::FileInputSchema),
        schemars::schema_for!(crate::functions::expression::ObjectInputSchemaType),
        schemars::schema_for!(crate::functions::expression::ArrayInputSchemaType),
        schemars::schema_for!(crate::functions::expression::StringInputSchemaType),
        schemars::schema_for!(crate::functions::expression::IntegerInputSchemaType),
        schemars::schema_for!(crate::functions::expression::NumberInputSchemaType),
        schemars::schema_for!(crate::functions::expression::BooleanInputSchemaType),
        schemars::schema_for!(crate::functions::expression::ImageInputSchemaType),
        schemars::schema_for!(crate::functions::expression::AudioInputSchemaType),
        schemars::schema_for!(crate::functions::expression::VideoInputSchemaType),
        schemars::schema_for!(crate::functions::expression::FileInputSchemaType),
        schemars::schema_for!(crate::functions::expression::ParamsOwned),
        schemars::schema_for!(crate::functions::expression::TaskOutputOwned),
        schemars::schema_for!(crate::functions::expression::Special),
        schemars::schema_for!(crate::functions::InlineProfileOrRemoteCommitOptional),
        schemars::schema_for!(crate::functions::FullInlineFunctionOrRemoteCommitOptional),
        schemars::schema_for!(crate::agent::InlineAgentBaseWithFallbacksOrRemoteCommitOptional),
        schemars::schema_for!(crate::swarm::InlineSwarmBaseOrRemoteCommitOptional),
        schemars::schema_for!(crate::functions::FullRemoteFunction),
        schemars::schema_for!(crate::functions::FullInlineFunction),
        schemars::schema_for!(crate::functions::AlphaRemoteFunction),
        schemars::schema_for!(crate::functions::AlphaInlineFunction),
        schemars::schema_for!(crate::functions::FullFunction),
        schemars::schema_for!(crate::functions::Function),
        schemars::schema_for!(crate::functions::RemoteFunction),
        schemars::schema_for!(crate::functions::InlineFunction),
        schemars::schema_for!(crate::functions::FunctionType),
        schemars::schema_for!(crate::functions::inventions::recursive::request::FunctionInventionRecursiveCreateParams),
        schemars::schema_for!(crate::functions::inventions::recursive::response::streaming::FunctionInventionChunk),
        schemars::schema_for!(crate::functions::inventions::recursive::response::streaming::FunctionInventionRecursiveChunk),
        schemars::schema_for!(crate::functions::inventions::recursive::response::streaming::Object),
        schemars::schema_for!(crate::functions::inventions::recursive::response::unary::FunctionInvention),
        schemars::schema_for!(crate::functions::inventions::recursive::response::unary::FunctionInventionRecursive),
        schemars::schema_for!(crate::functions::inventions::recursive::response::unary::Object),
        schemars::schema_for!(crate::functions::inventions::request::FunctionInventionCreateParams),
        schemars::schema_for!(crate::functions::inventions::response::streaming::AgentCompletionChunk),
        schemars::schema_for!(crate::functions::inventions::response::streaming::FunctionInventionChunk),
        schemars::schema_for!(crate::functions::inventions::response::streaming::Object),
        schemars::schema_for!(crate::functions::inventions::response::unary::AgentCompletion),
        schemars::schema_for!(crate::functions::inventions::response::unary::FunctionInvention),
        schemars::schema_for!(crate::functions::inventions::response::unary::Object),
        schemars::schema_for!(crate::functions::inventions::IndexObject),
        schemars::schema_for!(crate::functions::inventions::EssayObject),
        schemars::schema_for!(crate::functions::inventions::EssayTasksObject),
        schemars::schema_for!(crate::functions::inventions::TasksLengthObject),
        schemars::schema_for!(crate::functions::inventions::DescriptionObject),
        schemars::schema_for!(crate::functions::inventions::ScalarInputSchemaObject),
        schemars::schema_for!(crate::functions::inventions::VectorInputSchemaObject),
        schemars::schema_for!(crate::functions::inventions::ScalarLeafTaskObject),
        schemars::schema_for!(crate::functions::inventions::ScalarBranchTaskObject),
        schemars::schema_for!(crate::functions::inventions::VectorLeafTaskObject),
        schemars::schema_for!(crate::functions::inventions::VectorBranchTaskObject),
        schemars::schema_for!(crate::functions::inventions::AlphaScalarBranchState),
        schemars::schema_for!(crate::functions::inventions::AlphaScalarLeafState),
        schemars::schema_for!(crate::functions::inventions::AlphaScalarState),
        schemars::schema_for!(crate::functions::inventions::AlphaVectorBranchState),
        schemars::schema_for!(crate::functions::inventions::AlphaVectorLeafState),
        schemars::schema_for!(crate::functions::inventions::AlphaVectorState),
        schemars::schema_for!(crate::functions::inventions::State),
        schemars::schema_for!(crate::functions::inventions::ParamsState),
        schemars::schema_for!(crate::functions::inventions::InputSchema),
        schemars::schema_for!(crate::functions::inventions::ParamsStateOrRemoteCommitOptional),
        schemars::schema_for!(crate::functions::inventions::Params),
        schemars::schema_for!(crate::functions::inventions::prompts::Prompt),
        schemars::schema_for!(crate::functions::inventions::prompts::RemotePrompt),
        schemars::schema_for!(crate::functions::inventions::prompts::InlinePrompt),
        schemars::schema_for!(crate::functions::inventions::prompts::InlinePromptOrRemoteCommitOptional),
        schemars::schema_for!(crate::functions::inventions::prompts::StepPromptExpression),
        schemars::schema_for!(crate::functions::inventions::prompts::StepPromptType),
        schemars::schema_for!(crate::functions::inventions::prompts::request::ListPromptsRequest),
        schemars::schema_for!(crate::functions::inventions::prompts::request::ListPromptsSource),
        schemars::schema_for!(crate::functions::inventions::prompts::response::ListPromptResponse),
        schemars::schema_for!(crate::functions::inventions::prompts::response::GetPromptResponse),
        schemars::schema_for!(crate::functions::inventions::prompts::response::UsagePromptResponse),
        schemars::schema_for!(crate::functions::inventions::state::response::GetFunctionInventionStateResponse),
        schemars::schema_for!(crate::RemotePath),
        schemars::schema_for!(crate::RemotePathCommitOptional),
        schemars::schema_for!(crate::functions::Profile),
        schemars::schema_for!(crate::functions::RemoteProfile),
        schemars::schema_for!(crate::functions::InlineProfile),
        schemars::schema_for!(crate::functions::InlineTasksProfile),
        schemars::schema_for!(crate::functions::RemoteTasksProfile),
        schemars::schema_for!(crate::functions::TaskProfile),
        schemars::schema_for!(crate::functions::profiles::computations::request::DatasetItem),
        schemars::schema_for!(crate::functions::profiles::computations::request::Target),
        schemars::schema_for!(crate::functions::profiles::computations::request::FunctionProfileComputationCreateParams),
        schemars::schema_for!(crate::functions::profiles::computations::response::FittingStats),
        schemars::schema_for!(crate::functions::profiles::computations::response::streaming::FunctionExecutionChunk),
        schemars::schema_for!(crate::functions::profiles::computations::response::streaming::FunctionProfileComputationChunk),
        schemars::schema_for!(crate::functions::profiles::computations::response::streaming::Object),
        schemars::schema_for!(crate::functions::profiles::computations::response::unary::FunctionExecution),
        schemars::schema_for!(crate::functions::profiles::computations::response::unary::FunctionProfileComputation),
        schemars::schema_for!(crate::functions::profiles::computations::response::unary::Object),
        schemars::schema_for!(crate::functions::profiles::computations::RetryToken),
        schemars::schema_for!(crate::functions::profiles::request::ListProfilesRequest),
        schemars::schema_for!(crate::functions::profiles::request::ListProfilesSource),
        schemars::schema_for!(crate::functions::profiles::response::ListProfileResponse),
        schemars::schema_for!(crate::functions::profiles::response::GetProfileResponse),
        schemars::schema_for!(crate::functions::profiles::response::UsageProfileResponse),
        schemars::schema_for!(crate::Remote),
        schemars::schema_for!(crate::laboratories::executions::request::LaboratoryExecutionCreateParams),
        schemars::schema_for!(crate::laboratories::executions::response::streaming::BuilderChunk),
        schemars::schema_for!(crate::laboratories::executions::response::streaming::EvaluationChunk),
        schemars::schema_for!(crate::laboratories::executions::response::streaming::LaboratoryExecutionChunk),
        schemars::schema_for!(crate::laboratories::executions::response::streaming::Object),
        schemars::schema_for!(crate::laboratories::executions::response::unary::Builder),
        schemars::schema_for!(crate::laboratories::executions::response::unary::Evaluation),
        schemars::schema_for!(crate::laboratories::executions::response::unary::LaboratoryExecution),
        schemars::schema_for!(crate::laboratories::executions::response::unary::Object),
        schemars::schema_for!(crate::functions::request::ListFunctionsRequest),
        schemars::schema_for!(crate::functions::request::ListFunctionsSource),
        schemars::schema_for!(crate::functions::request::ListFunctionProfilePairsRequest),
        schemars::schema_for!(crate::functions::request::ListFunctionProfilePairsSource),
        schemars::schema_for!(crate::functions::request::GetFunctionProfilePairUsageRequest),
        schemars::schema_for!(crate::functions::response::ListFunctionResponse),
        schemars::schema_for!(crate::functions::response::GetFunctionResponse),
        schemars::schema_for!(crate::functions::response::UsageFunctionResponse),
        schemars::schema_for!(crate::functions::response::ListFunctionProfilePairResponse),
        schemars::schema_for!(crate::functions::response::ListFunctionProfilePairItem),
        schemars::schema_for!(crate::functions::response::GetFunctionProfilePairResponse),
        schemars::schema_for!(crate::functions::response::UsageFunctionProfilePairResponse),
        schemars::schema_for!(crate::functions::TaskExpression),
        schemars::schema_for!(crate::functions::Task),
        schemars::schema_for!(crate::functions::ScalarFunctionTaskExpression),
        schemars::schema_for!(crate::functions::ScalarFunctionTask),
        schemars::schema_for!(crate::functions::VectorFunctionTaskExpression),
        schemars::schema_for!(crate::functions::VectorFunctionTask),
        schemars::schema_for!(crate::functions::VectorCompletionTaskExpression),
        schemars::schema_for!(crate::functions::VectorCompletionTask),
        schemars::schema_for!(crate::functions::PlaceholderScalarFunctionTaskExpression),
        schemars::schema_for!(crate::functions::PlaceholderScalarFunctionTask),
        schemars::schema_for!(crate::functions::PlaceholderVectorFunctionTaskExpression),
        schemars::schema_for!(crate::functions::PlaceholderVectorFunctionTask),
        schemars::schema_for!(crate::functions::CompiledTask),
        schemars::schema_for!(crate::prefixed_uuid::PrefixedUuid<'a', 'p', 'k'>),
        schemars::schema_for!(crate::vector::completions::cache::request::GetCompletionVotesRequest),
        schemars::schema_for!(crate::vector::completions::cache::request::CacheVoteRequestOwned),
        schemars::schema_for!(crate::vector::completions::cache::response::CompletionVotes),
        schemars::schema_for!(crate::vector::completions::cache::response::CacheVote),
        schemars::schema_for!(crate::vector::completions::request::VectorCompletionCreateParams),
        schemars::schema_for!(crate::vector::completions::response::streaming::AgentCompletionChunk),
        schemars::schema_for!(crate::vector::completions::response::streaming::Object),
        schemars::schema_for!(crate::vector::completions::response::streaming::VectorCompletionChunk),
        schemars::schema_for!(crate::vector::completions::response::unary::AgentCompletion),
        schemars::schema_for!(crate::vector::completions::response::unary::Object),
        schemars::schema_for!(crate::vector::completions::response::unary::VectorCompletion),
        schemars::schema_for!(crate::vector::completions::response::Vote),
        schemars::schema_for!(crate::vector::completions::VectorResponses),
        schemars::schema_for!(crate::functions::executions::response::Output),
        schemars::schema_for!(crate::agent::InlineAgentBaseWithFallbacks),
        schemars::schema_for!(crate::agent::InlineAgentWithFallbacks),
        schemars::schema_for!(crate::agent::RemoteAgentBaseWithFallbacks),
        schemars::schema_for!(crate::agent::RemoteAgentWithFallbacks),
        schemars::schema_for!(crate::agent::AgentWithFallbacks),
        schemars::schema_for!(crate::agent::InlineAgentBaseWithFallbacksOrRemoteWithCount),
        schemars::schema_for!(crate::agent::AgentWithFallbacksWithCount),
        schemars::schema_for!(crate::Remote),
        schemars::schema_for!(crate::RemotePath),
        schemars::schema_for!(crate::functions::expression::OneOrMany<String>),
        schemars::schema_for!(crate::functions::expression::WithExpression<String>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::functions::expression::InputValueExpression>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::MessageExpression>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::AssistantToolCallExpression>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::AssistantToolCallFunctionExpression>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::File>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::ImageUrl>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::InputAudio>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::RichContentExpression>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::RichContentPartExpression>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::SimpleContentExpression>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::SimpleContentPartExpression>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::VideoUrl>),
        schemars::schema_for!(crate::functions::expression::WithExpression<crate::agent::completions::message::RichContentExpression>),
        schemars::schema_for!(crate::functions::expression::WithExpression<Vec<crate::functions::expression::WithExpression<crate::agent::completions::message::AssistantToolCallExpression>>>),
        schemars::schema_for!(crate::functions::expression::WithExpression<Vec<crate::functions::expression::WithExpression<crate::agent::completions::message::MessageExpression>>>),
        schemars::schema_for!(crate::functions::expression::WithExpression<Vec<crate::functions::expression::WithExpression<crate::agent::completions::message::RichContentExpression>>>),
    ];
    #[cfg(feature = "mcp")]
    {
        schemas.extend([
            schemars::schema_for!(crate::mcp::shared::Annotations),
            schemars::schema_for!(crate::mcp::shared::Role),
            schemars::schema_for!(crate::mcp::shared::Icon),
            schemars::schema_for!(crate::mcp::shared::IconTheme),
            schemars::schema_for!(crate::mcp::shared::ResourceContents),
            schemars::schema_for!(crate::mcp::shared::TextResourceContents),
            schemars::schema_for!(crate::mcp::shared::BlobResourceContents),
            schemars::schema_for!(crate::mcp::shared::ResourceContentsUnion),
            schemars::schema_for!(crate::mcp::initialize_result::InitializeResult),
            schemars::schema_for!(crate::mcp::initialize_result::Implementation),
            schemars::schema_for!(crate::mcp::initialize_result::ServerCapabilities),
            schemars::schema_for!(crate::mcp::initialize_result::PromptsCapability),
            schemars::schema_for!(crate::mcp::initialize_result::ResourcesCapability),
            schemars::schema_for!(crate::mcp::initialize_result::ToolsCapability),
            schemars::schema_for!(crate::mcp::initialize_result::LoggingCapability),
            schemars::schema_for!(crate::mcp::initialize_result::CompletionsCapability),
            schemars::schema_for!(crate::mcp::initialize_result::TasksCapability),
            schemars::schema_for!(crate::mcp::initialize_result::TasksListCapability),
            schemars::schema_for!(crate::mcp::initialize_result::TasksCancelCapability),
            schemars::schema_for!(crate::mcp::initialize_result::TasksRequestsCapability),
            schemars::schema_for!(crate::mcp::initialize_result::TasksToolsCapability),
            schemars::schema_for!(crate::mcp::initialize_result::TasksToolsCallCapability),
            schemars::schema_for!(crate::mcp::JsonRpcRequest),
            schemars::schema_for!(crate::mcp::JsonRpcError),
            schemars::schema_for!(crate::mcp::JsonRpcNotification),
            schemars::schema_for!(crate::mcp::resource::ListResourcesRequest),
            schemars::schema_for!(crate::mcp::resource::ListResourcesResult),
            schemars::schema_for!(crate::mcp::resource::ReadResourceRequestParams),
            schemars::schema_for!(crate::mcp::resource::ReadResourceResult),
            schemars::schema_for!(crate::mcp::resource::Resource),
            schemars::schema_for!(crate::mcp::tool::AudioContent),
            schemars::schema_for!(crate::mcp::tool::CallToolRequestParams),
            schemars::schema_for!(crate::mcp::tool::CallToolResult),
            schemars::schema_for!(crate::mcp::tool::TaskMetadata),
            schemars::schema_for!(crate::mcp::tool::ContentBlock),
            schemars::schema_for!(crate::mcp::tool::EmbeddedResource),
            schemars::schema_for!(crate::mcp::tool::ImageContent),
            schemars::schema_for!(crate::mcp::tool::ListToolsRequest),
            schemars::schema_for!(crate::mcp::tool::ListToolsResult),
            schemars::schema_for!(crate::mcp::tool::ResourceLink),
            schemars::schema_for!(crate::mcp::tool::TextContent),
            schemars::schema_for!(crate::mcp::tool::Tool),
            schemars::schema_for!(crate::mcp::tool::ToolSchemaObject),
            schemars::schema_for!(crate::mcp::tool::ToolSchemaType),
            schemars::schema_for!(crate::mcp::tool::ToolAnnotations),
            schemars::schema_for!(crate::mcp::tool::ToolExecution),
            schemars::schema_for!(crate::mcp::tool::TaskSupport),
            schemars::schema_for!(crate::mcp::tool::ToolResultContent),
            schemars::schema_for!(crate::mcp::tool::ToolUseContent),
        ]);
    }
    #[cfg(feature = "filesystem")]
    {
        schemas.extend([
            schemars::schema_for!(crate::filesystem::config::AgentsConfig),
            schemars::schema_for!(crate::filesystem::config::ApiConfig),
            schemars::schema_for!(crate::filesystem::config::ApiMode),
            schemars::schema_for!(crate::filesystem::config::ApiRemoteConfig),
            schemars::schema_for!(crate::filesystem::config::ApiLocalConfig),
            schemars::schema_for!(crate::filesystem::config::ApiHeadersConfig),
            schemars::schema_for!(crate::filesystem::config::Config),
            schemars::schema_for!(crate::filesystem::config::Favorite),
            schemars::schema_for!(crate::filesystem::config::PairFavorite),
            schemars::schema_for!(crate::filesystem::config::FunctionsConfig),
            schemars::schema_for!(crate::filesystem::config::FunctionsInventionsConfig),
            schemars::schema_for!(crate::filesystem::config::FunctionsProfilesConfig),
            schemars::schema_for!(crate::filesystem::config::FunctionsProfilesPairsConfig),
            schemars::schema_for!(crate::filesystem::config::SwarmsConfig),
            schemars::schema_for!(crate::filesystem::config::ViewerSecretSignaturePair),
            schemars::schema_for!(crate::filesystem::config::ViewerMode),
            schemars::schema_for!(crate::filesystem::config::ViewerConfig),
            schemars::schema_for!(crate::filesystem::config::ViewerLocalConfig),
            schemars::schema_for!(crate::filesystem::logs::ListItem),
            schemars::schema_for!(crate::filesystem::plugins::Binaries),
            schemars::schema_for!(crate::filesystem::plugins::Manifest),
            schemars::schema_for!(crate::filesystem::plugins::ManifestWithNameAndSource),
            schemars::schema_for!(crate::filesystem::plugins::Platform),
            schemars::schema_for!(crate::filesystem::plugins::ViewerRoute),
            schemars::schema_for!(crate::filesystem::plugins::HttpMethod),
            schemars::schema_for!(crate::filesystem::plugins::WhitelistEntry),
        ]);
    }
    schemas
}

/// Schema helper: produces a `$ref` to `T` for use with `#[schemars(schema_with)]`
/// on `#[serde(flatten)]` fields, preventing schemars from merging the inner type's
/// schema into the parent.
pub fn flatten_schema<T: schemars::JsonSchema>(
    generator: &mut schemars::SchemaGenerator,
) -> schemars::Schema {
    generator.subschema_for::<T>()
}