@nocobase/plugin-ai 2.1.0-beta.24 → 2.1.0-beta.26

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 (94) hide show
  1. package/dist/ai/ai-employees/dara.js +1 -0
  2. package/dist/ai/tools/sub-agents/shared.js +3 -1
  3. package/dist/client/343.6f36d97dd122c5b6.js +10 -0
  4. package/dist/client/{559.133d286a0a0a1d93.js → 559.39872901b9053629.js} +1 -1
  5. package/dist/client/646.afa699c92cd556f3.js +10 -0
  6. package/dist/client/ai-employees/types.d.ts +2 -0
  7. package/dist/client/components/skill-settings.d.ts +2 -0
  8. package/dist/client/index.js +3 -3
  9. package/dist/client/llm-providers/mimo/ModelSettings.d.ts +10 -0
  10. package/dist/client/llm-providers/mimo/index.d.ts +10 -0
  11. package/dist/client/llm-providers/xai/ModelSettings.d.ts +10 -0
  12. package/dist/client/llm-providers/xai/index.d.ts +10 -0
  13. package/dist/collections/ai-employees.d.ts +7 -0
  14. package/dist/collections/ai-employees.js +13 -0
  15. package/dist/externalVersion.js +15 -15
  16. package/dist/locale/en-US.json +2 -0
  17. package/dist/locale/zh-CN.json +2 -0
  18. package/dist/node_modules/@langchain/xai/LICENSE +21 -0
  19. package/dist/node_modules/@langchain/xai/dist/_virtual/rolldown_runtime.cjs +25 -0
  20. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.cjs +568 -0
  21. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.d.cts +619 -0
  22. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.d.ts +619 -0
  23. package/dist/node_modules/@langchain/xai/dist/chat_models/completions.js +566 -0
  24. package/dist/node_modules/@langchain/xai/dist/chat_models/index.cjs +2 -0
  25. package/dist/node_modules/@langchain/xai/dist/chat_models/index.d.ts +3 -0
  26. package/dist/node_modules/@langchain/xai/dist/chat_models/index.js +2 -0
  27. package/dist/node_modules/@langchain/xai/dist/chat_models/responses-types.d.cts +1178 -0
  28. package/dist/node_modules/@langchain/xai/dist/chat_models/responses-types.d.ts +1178 -0
  29. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.cjs +233 -0
  30. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.d.cts +70 -0
  31. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.d.ts +70 -0
  32. package/dist/node_modules/@langchain/xai/dist/chat_models/responses.js +232 -0
  33. package/dist/node_modules/@langchain/xai/dist/converters/responses.cjs +168 -0
  34. package/dist/node_modules/@langchain/xai/dist/converters/responses.js +164 -0
  35. package/dist/node_modules/@langchain/xai/dist/index.cjs +7 -0
  36. package/dist/node_modules/@langchain/xai/dist/index.d.cts +5 -0
  37. package/dist/node_modules/@langchain/xai/dist/index.d.ts +6 -0
  38. package/dist/node_modules/@langchain/xai/dist/index.js +6 -0
  39. package/dist/node_modules/@langchain/xai/dist/live_search.cjs +54 -0
  40. package/dist/node_modules/@langchain/xai/dist/live_search.d.cts +145 -0
  41. package/dist/node_modules/@langchain/xai/dist/live_search.d.ts +145 -0
  42. package/dist/node_modules/@langchain/xai/dist/live_search.js +51 -0
  43. package/dist/node_modules/@langchain/xai/dist/profiles.cjs +289 -0
  44. package/dist/node_modules/@langchain/xai/dist/profiles.js +288 -0
  45. package/dist/node_modules/@langchain/xai/dist/tools/code_execution.cjs +52 -0
  46. package/dist/node_modules/@langchain/xai/dist/tools/code_execution.d.cts +64 -0
  47. package/dist/node_modules/@langchain/xai/dist/tools/code_execution.d.ts +64 -0
  48. package/dist/node_modules/@langchain/xai/dist/tools/code_execution.js +50 -0
  49. package/dist/node_modules/@langchain/xai/dist/tools/collections_search.cjs +60 -0
  50. package/dist/node_modules/@langchain/xai/dist/tools/collections_search.d.cts +90 -0
  51. package/dist/node_modules/@langchain/xai/dist/tools/collections_search.d.ts +90 -0
  52. package/dist/node_modules/@langchain/xai/dist/tools/collections_search.js +58 -0
  53. package/dist/node_modules/@langchain/xai/dist/tools/index.cjs +18 -0
  54. package/dist/node_modules/@langchain/xai/dist/tools/index.d.cts +18 -0
  55. package/dist/node_modules/@langchain/xai/dist/tools/index.d.ts +18 -0
  56. package/dist/node_modules/@langchain/xai/dist/tools/index.js +18 -0
  57. package/dist/node_modules/@langchain/xai/dist/tools/live_search.cjs +94 -0
  58. package/dist/node_modules/@langchain/xai/dist/tools/live_search.d.cts +149 -0
  59. package/dist/node_modules/@langchain/xai/dist/tools/live_search.d.ts +149 -0
  60. package/dist/node_modules/@langchain/xai/dist/tools/live_search.js +91 -0
  61. package/dist/node_modules/@langchain/xai/dist/tools/web_search.cjs +57 -0
  62. package/dist/node_modules/@langchain/xai/dist/tools/web_search.d.cts +104 -0
  63. package/dist/node_modules/@langchain/xai/dist/tools/web_search.d.ts +104 -0
  64. package/dist/node_modules/@langchain/xai/dist/tools/web_search.js +55 -0
  65. package/dist/node_modules/@langchain/xai/dist/tools/x_search.cjs +63 -0
  66. package/dist/node_modules/@langchain/xai/dist/tools/x_search.d.cts +145 -0
  67. package/dist/node_modules/@langchain/xai/dist/tools/x_search.d.ts +145 -0
  68. package/dist/node_modules/@langchain/xai/dist/tools/x_search.js +61 -0
  69. package/dist/node_modules/@langchain/xai/package.json +1 -0
  70. package/dist/node_modules/fast-glob/package.json +1 -1
  71. package/dist/node_modules/flexsearch/package.json +1 -1
  72. package/dist/node_modules/fs-extra/package.json +1 -1
  73. package/dist/node_modules/jsonrepair/package.json +1 -1
  74. package/dist/node_modules/nodejs-snowflake/package.json +1 -1
  75. package/dist/node_modules/openai/package.json +1 -1
  76. package/dist/node_modules/zod/package.json +1 -1
  77. package/dist/server/ai-employees/ai-employee.js +20 -10
  78. package/dist/server/llm-providers/common/reasoning.js +2 -4
  79. package/dist/server/llm-providers/mimo.d.ts +37 -0
  80. package/dist/server/llm-providers/mimo.js +156 -0
  81. package/dist/server/llm-providers/xai.d.ts +17 -0
  82. package/dist/server/llm-providers/xai.js +88 -0
  83. package/dist/server/migrations/20260428175558-update-ai-employee-category.d.ts +14 -0
  84. package/dist/server/migrations/20260428175558-update-ai-employee-category.js +55 -0
  85. package/dist/server/migrations/20260429175132-ai-employee-deprecated-orin.d.ts +14 -0
  86. package/dist/server/migrations/20260429175132-ai-employee-deprecated-orin.js +53 -0
  87. package/dist/server/plugin.js +5 -0
  88. package/dist/server/resource/aiEmployees.js +10 -1
  89. package/dist/server/workflow/nodes/employee/files.js +7 -4
  90. package/dist/server/workflow/nodes/employee/index.js +136 -132
  91. package/dist/server/workflow/nodes/employee/types.d.ts +1 -1
  92. package/package.json +3 -2
  93. package/dist/client/343.83f7d96664e4e038.js +0 -10
  94. package/dist/client/646.cba98d80e9e6ea74.js +0 -10
@@ -0,0 +1,1178 @@
1
+ import { BaseChatModelCallOptions, BaseChatModelParams } from "@langchain/core/language_models/chat_models";
2
+
3
+ //#region src/chat_models/responses-types.d.ts
4
+ /**
5
+ * Text input content item.
6
+ */
7
+ interface XAIResponsesInputTextItem {
8
+ type: "input_text";
9
+ /** The text content. */
10
+ text: string;
11
+ }
12
+ /**
13
+ * Image input content item.
14
+ * Note: Storing/fetching images is not fully supported.
15
+ */
16
+ interface XAIResponsesInputImageItem {
17
+ type: "input_image";
18
+ /** Public URL of the image. */
19
+ image_url: string;
20
+ /** Image detail level. */
21
+ detail?: "high" | "low" | "auto";
22
+ }
23
+ /**
24
+ * File input content item.
25
+ */
26
+ interface XAIResponsesInputFileItem {
27
+ type: "input_file";
28
+ /** File ID from the Files API. */
29
+ file_id: string;
30
+ }
31
+ /**
32
+ * Union type for all input content items.
33
+ */
34
+ type XAIResponsesInputContentItem = XAIResponsesInputTextItem | XAIResponsesInputImageItem | XAIResponsesInputFileItem;
35
+ /**
36
+ * Function tool call from a previous response.
37
+ */
38
+ interface XAIResponsesFunctionToolCall {
39
+ type: "function_call";
40
+ /** The ID of the tool call. */
41
+ id: string;
42
+ /** The ID of the tool call (alias). */
43
+ call_id?: string;
44
+ /** The name of the function. */
45
+ name: string;
46
+ /** The arguments to the function as a JSON string. */
47
+ arguments: string;
48
+ }
49
+ /**
50
+ * Web search tool call from a previous response.
51
+ */
52
+ interface XAIResponsesWebSearchToolCall {
53
+ type: "web_search_call";
54
+ /** The ID of the tool call. */
55
+ id: string;
56
+ /** The search status. */
57
+ status?: "in_progress" | "searching" | "completed" | "failed";
58
+ }
59
+ /**
60
+ * Code interpreter tool call from a previous response.
61
+ */
62
+ interface XAIResponsesCodeInterpreterToolCall {
63
+ type: "code_interpreter_call";
64
+ /** The ID of the tool call. */
65
+ id: string;
66
+ /** The code to execute. */
67
+ code?: string;
68
+ /** The status of the code interpreter. */
69
+ status?: "in_progress" | "interpreting" | "completed" | "failed";
70
+ }
71
+ /**
72
+ * MCP tool call from a previous response.
73
+ */
74
+ interface XAIResponsesMcpToolCall {
75
+ type: "mcp_call";
76
+ /** The ID of the tool call. */
77
+ id: string;
78
+ /** The MCP server URL. */
79
+ server_url?: string;
80
+ /** The MCP server label. */
81
+ server_label?: string;
82
+ }
83
+ /**
84
+ * Union type for all tool calls from previous responses.
85
+ */
86
+ type XAIResponsesToolCall = XAIResponsesFunctionToolCall | XAIResponsesWebSearchToolCall | XAIResponsesCodeInterpreterToolCall | XAIResponsesMcpToolCall;
87
+ /**
88
+ * Log probability information for a token.
89
+ */
90
+ interface XAIResponsesLogprobToken {
91
+ /** The token string. */
92
+ token: string;
93
+ /** The log probability of the token. */
94
+ logprob: number;
95
+ /** The bytes representation of the token. */
96
+ bytes?: number[];
97
+ }
98
+ /**
99
+ * Log probability content item.
100
+ */
101
+ interface XAIResponsesLogprobContent {
102
+ /** The token. */
103
+ token: string;
104
+ /** The log probability. */
105
+ logprob: number;
106
+ /** The bytes representation. */
107
+ bytes?: number[];
108
+ /** Top log probabilities at this position. */
109
+ top_logprobs?: XAIResponsesLogprobToken[];
110
+ }
111
+ /**
112
+ * Log probabilities from a previous response.
113
+ */
114
+ interface XAIResponsesLogprobs {
115
+ /** Log probability content. */
116
+ content?: XAIResponsesLogprobContent[];
117
+ }
118
+ /**
119
+ * Previous response structure that can be included in the input array.
120
+ * Used for multi-turn conversations with assistant outputs.
121
+ */
122
+ interface XAIResponsesPreviousResponse {
123
+ /** The type identifier for previous response. */
124
+ type: "message";
125
+ /** The role for previous assistant responses. */
126
+ role: "assistant";
127
+ /** The text output from the previous response. */
128
+ text?: string;
129
+ /** Refusal message if the model refused to respond. */
130
+ refusal?: string;
131
+ /** Tool calls made in the previous response. */
132
+ tool_calls?: XAIResponsesToolCall[];
133
+ /** Log probabilities from the previous response. */
134
+ logprobs?: XAIResponsesLogprobs;
135
+ }
136
+ /**
137
+ * Function tool call output to provide results back to the model.
138
+ */
139
+ interface XAIResponsesFunctionToolOutput {
140
+ type: "function_call_output";
141
+ /** The ID of the tool call this output is for. */
142
+ call_id: string;
143
+ /** The output/result of the function call. */
144
+ output: string;
145
+ }
146
+ /**
147
+ * Union type for tool outputs that can be included in input.
148
+ */
149
+ type XAIResponsesToolOutput = XAIResponsesFunctionToolOutput;
150
+ /**
151
+ * Message role types.
152
+ */
153
+ type XAIResponsesMessageRole = "user" | "assistant" | "system" | "developer";
154
+ /**
155
+ * Message input to the model.
156
+ */
157
+ interface XAIResponsesMessage {
158
+ /** The role of the message author. */
159
+ role: XAIResponsesMessageRole;
160
+ /** Text, image, or audio input. Can be a string or array of content items. */
161
+ content: string | XAIResponsesInputContentItem[];
162
+ /** Unique identifier for the end-user. Only for `user` messages. */
163
+ name?: string;
164
+ }
165
+ /**
166
+ * Union type for all items that can appear in the input array.
167
+ * Includes messages, previous responses, and tool outputs.
168
+ */
169
+ type XAIResponsesInputItem = XAIResponsesMessage | XAIResponsesPreviousResponse | XAIResponsesToolOutput;
170
+ /**
171
+ * Input type - can be a string or array of input items.
172
+ * The array can contain messages, previous responses, and tool outputs.
173
+ */
174
+ type XAIResponsesInput = string | XAIResponsesInputItem[];
175
+ /**
176
+ * Reasoning effort level.
177
+ */
178
+ type XAIResponsesReasoningEffort = "low" | "medium" | "high";
179
+ /**
180
+ * Reasoning summary style.
181
+ */
182
+ type XAIResponsesReasoningSummary = "auto" | "concise" | "detailed";
183
+ /**
184
+ * Reasoning configuration for reasoning models.
185
+ */
186
+ interface XAIResponsesReasoning {
187
+ /** The effort level for reasoning. Defaults to `medium`. */
188
+ effort?: XAIResponsesReasoningEffort;
189
+ /** The summary style for reasoning output. */
190
+ summary?: XAIResponsesReasoningSummary;
191
+ }
192
+ /**
193
+ * X (Twitter) search source configuration.
194
+ */
195
+ interface XAIResponsesSearchSourceX {
196
+ type: "x";
197
+ /** X handles to include in search. */
198
+ included_x_handles?: string[];
199
+ /** X handles to exclude from search. */
200
+ excluded_x_handles?: string[];
201
+ /** Minimum favorite count for posts. */
202
+ post_favorite_count?: number;
203
+ /** Minimum view count for posts. */
204
+ post_view_count?: number;
205
+ }
206
+ /**
207
+ * Web search source configuration.
208
+ */
209
+ interface XAIResponsesSearchSourceWeb {
210
+ type: "web";
211
+ /** Whitelist of allowed websites (max 5). */
212
+ allowed_websites?: string[];
213
+ /** Blacklist of excluded websites (max 5). */
214
+ excluded_websites?: string[];
215
+ /** ISO alpha-2 country code. */
216
+ country?: string;
217
+ /** Whether to enable safe search. Defaults to `true`. */
218
+ safe_search?: boolean;
219
+ }
220
+ /**
221
+ * RSS/News search source configuration.
222
+ */
223
+ interface XAIResponsesSearchSourceRss {
224
+ type: "rss";
225
+ /** Links of RSS feeds. */
226
+ links?: string[];
227
+ }
228
+ /**
229
+ * Union type for all search sources.
230
+ */
231
+ type XAIResponsesSearchSource = XAIResponsesSearchSourceX | XAIResponsesSearchSourceWeb | XAIResponsesSearchSourceRss;
232
+ /**
233
+ * Search mode options.
234
+ */
235
+ type XAIResponsesSearchMode = "off" | "on" | "auto";
236
+ /**
237
+ * Search parameters configuration.
238
+ * Takes precedence over `web_search_preview` tool.
239
+ */
240
+ interface XAIResponsesSearchParameters {
241
+ /** Start date for search results (ISO-8601 YYYY-MM-DD). */
242
+ from_date?: string;
243
+ /** End date for search results (ISO-8601 YYYY-MM-DD). */
244
+ to_date?: string;
245
+ /** Maximum number of search results. Defaults to 15 (range: 1-30). */
246
+ max_search_results?: number;
247
+ /** Search mode. Defaults to `on`. */
248
+ mode?: XAIResponsesSearchMode;
249
+ /** Whether to return citations. Defaults to `true`. */
250
+ return_citations?: boolean;
251
+ /** List of search sources. If empty, searches web and X. */
252
+ sources?: XAIResponsesSearchSource[];
253
+ }
254
+ /**
255
+ * Plain text format.
256
+ */
257
+ interface XAIResponsesTextFormatText {
258
+ type: "text";
259
+ }
260
+ /**
261
+ * JSON object format.
262
+ */
263
+ interface XAIResponsesTextFormatJsonObject {
264
+ type: "json_object";
265
+ }
266
+ /**
267
+ * JSON schema format.
268
+ */
269
+ interface XAIResponsesTextFormatJsonSchema {
270
+ type: "json_schema";
271
+ /** JSON schema definition. */
272
+ schema: Record<string, unknown>;
273
+ /** Compatibility field for strict mode. */
274
+ strict?: boolean;
275
+ }
276
+ /**
277
+ * Union type for all text response formats.
278
+ */
279
+ type XAIResponsesTextFormat = XAIResponsesTextFormatText | XAIResponsesTextFormatJsonObject | XAIResponsesTextFormatJsonSchema;
280
+ /**
281
+ * Text response configuration.
282
+ */
283
+ interface XAIResponsesText {
284
+ /** The format for text response. */
285
+ format?: XAIResponsesTextFormat;
286
+ }
287
+ /**
288
+ * Function tool parameters using JSON Schema.
289
+ */
290
+ interface XAIResponsesFunctionToolFunction {
291
+ /** The name of the function. */
292
+ name: string;
293
+ /** A description of what the function does. */
294
+ description?: string;
295
+ /** The parameters the function accepts, described as a JSON Schema object. */
296
+ parameters: Record<string, unknown>;
297
+ }
298
+ /**
299
+ * Function tool definition.
300
+ */
301
+ interface XAIResponsesFunctionTool {
302
+ type: "function";
303
+ /** The function definition. */
304
+ function: XAIResponsesFunctionToolFunction;
305
+ }
306
+ /**
307
+ * Web search tool definition.
308
+ * Enables the model to search the web and browse pages for real-time information.
309
+ */
310
+ interface XAIResponsesWebSearchTool {
311
+ type: "web_search";
312
+ /** Domains to exclusively include in the search (max 5). */
313
+ allowed_domains?: string[];
314
+ /** Domains to exclude from the search (max 5). */
315
+ excluded_domains?: string[];
316
+ /** Whether to enable image understanding during search. */
317
+ enable_image_understanding?: boolean;
318
+ }
319
+ /**
320
+ * X search tool definition.
321
+ */
322
+ interface XAIResponsesXSearchTool {
323
+ type: "x_search";
324
+ /** X handles to allow in search. */
325
+ allowed_x_handles?: string[];
326
+ /** X handles to exclude from search. */
327
+ excluded_x_handles?: string[];
328
+ /** Whether to enable image understanding. */
329
+ enable_image_understanding?: boolean;
330
+ /** Whether to enable video understanding. */
331
+ enable_video_understanding?: boolean;
332
+ /** Start date for search (ISO-8601). */
333
+ from_date?: string;
334
+ /** End date for search (ISO-8601). */
335
+ to_date?: string;
336
+ }
337
+ /**
338
+ * File search tool definition.
339
+ */
340
+ interface XAIResponsesFileSearchTool {
341
+ type: "file_search";
342
+ /** List of vector store IDs to search. */
343
+ vector_store_ids?: string[];
344
+ }
345
+ /**
346
+ * Code interpreter tool definition.
347
+ */
348
+ interface XAIResponsesCodeInterpreterTool {
349
+ type: "code_interpreter";
350
+ }
351
+ /**
352
+ * MCP (Model Context Protocol) tool definition.
353
+ */
354
+ interface XAIResponsesMcpTool {
355
+ type: "mcp";
356
+ /** The URL of the MCP server. */
357
+ server_url: string;
358
+ /** The label for the MCP server. */
359
+ server_label: string;
360
+ }
361
+ /**
362
+ * Union type for all tool definitions.
363
+ */
364
+ type XAIResponsesTool = XAIResponsesFunctionTool | XAIResponsesWebSearchTool | XAIResponsesXSearchTool | XAIResponsesFileSearchTool | XAIResponsesCodeInterpreterTool | XAIResponsesMcpTool;
365
+ /**
366
+ * String tool choice options.
367
+ */
368
+ type XAIResponsesToolChoiceString = "none" | "auto" | "required";
369
+ /**
370
+ * Function tool choice object.
371
+ */
372
+ interface XAIResponsesToolChoiceFunction {
373
+ type: "function";
374
+ function: {
375
+ /** The name of the function to call. */
376
+ name: string;
377
+ };
378
+ }
379
+ /**
380
+ * Tool choice configuration.
381
+ */
382
+ type XAIResponsesToolChoice = XAIResponsesToolChoiceString | XAIResponsesToolChoiceFunction;
383
+ /**
384
+ * Additional output data to include in the response.
385
+ */
386
+ type XAIResponsesInclude = "reasoning.encrypted_content";
387
+ /**
388
+ * xAI Responses API request body parameters.
389
+ */
390
+ interface XAIResponsesCreateParams {
391
+ /**
392
+ * The input passed to the model.
393
+ * Can be text (string) or an array of message objects.
394
+ */
395
+ input: XAIResponsesInput;
396
+ /**
397
+ * Model name for the model to use (e.g., from xAI console).
398
+ */
399
+ model?: string;
400
+ /**
401
+ * Whether to process the response asynchronously in the background.
402
+ * Note: Unsupported.
403
+ * @default false
404
+ */
405
+ background?: boolean;
406
+ /**
407
+ * What additional output data to include in the response.
408
+ * Currently supported: `reasoning.encrypted_content`.
409
+ */
410
+ include?: XAIResponsesInclude[];
411
+ /**
412
+ * An alternate way to specify the system prompt.
413
+ * Cannot be used with `previous_response_id`.
414
+ */
415
+ instructions?: string;
416
+ /**
417
+ * Whether to return log probabilities of the output tokens.
418
+ * @default false
419
+ */
420
+ logprobs?: boolean;
421
+ /**
422
+ * Max number of tokens that can be generated.
423
+ * Includes both output and reasoning tokens.
424
+ */
425
+ max_output_tokens?: number;
426
+ /**
427
+ * Metadata for the request.
428
+ * Note: Not supported. Maintained for compatibility.
429
+ */
430
+ metadata?: Record<string, unknown>;
431
+ /**
432
+ * Whether to allow the model to run parallel tool calls.
433
+ * @default true
434
+ */
435
+ parallel_tool_calls?: boolean;
436
+ /**
437
+ * The ID of the previous response from the model.
438
+ * Use this to create multi-turn conversations.
439
+ */
440
+ previous_response_id?: string;
441
+ /**
442
+ * Reasoning configuration.
443
+ * Only for reasoning models.
444
+ */
445
+ reasoning?: XAIResponsesReasoning;
446
+ /**
447
+ * Set parameters for searched data.
448
+ * Takes precedence over `web_search_preview` tool.
449
+ */
450
+ search_parameters?: XAIResponsesSearchParameters;
451
+ /**
452
+ * Service tier for the request.
453
+ * Note: Not supported. Maintained for compatibility.
454
+ */
455
+ service_tier?: string;
456
+ /**
457
+ * Whether to store the input message(s) and response.
458
+ * @default true
459
+ */
460
+ store?: boolean;
461
+ /**
462
+ * If set, partial message deltas will be sent as server-sent events.
463
+ * @default false
464
+ */
465
+ stream?: boolean;
466
+ /**
467
+ * Sampling temperature between 0 and 2.
468
+ * Higher values make output more random, lower values more deterministic.
469
+ * @default 1
470
+ */
471
+ temperature?: number;
472
+ /**
473
+ * Settings for customizing a text response.
474
+ */
475
+ text?: XAIResponsesText;
476
+ /**
477
+ * Controls which tool is called by the model.
478
+ */
479
+ tool_choice?: XAIResponsesToolChoice;
480
+ /**
481
+ * A list of tools the model may call.
482
+ * Maximum of 128 tools.
483
+ */
484
+ tools?: XAIResponsesTool[];
485
+ /**
486
+ * Number of most likely tokens to return at each token position.
487
+ * Range: 0-8. Requires `logprobs` to be `true`.
488
+ */
489
+ top_logprobs?: number;
490
+ /**
491
+ * Nucleus sampling probability mass.
492
+ * The model considers results of tokens with top_p probability mass.
493
+ * @default 1
494
+ */
495
+ top_p?: number;
496
+ /**
497
+ * Truncation strategy.
498
+ * Note: Not supported. Maintained for compatibility.
499
+ */
500
+ truncation?: string;
501
+ /**
502
+ * Unique identifier representing your end-user.
503
+ * Used for monitoring and abuse detection.
504
+ */
505
+ user?: string;
506
+ }
507
+ /**
508
+ * Streaming variant of the request params.
509
+ */
510
+ interface XAIResponsesCreateParamsStreaming extends XAIResponsesCreateParams {
511
+ stream: true;
512
+ }
513
+ /**
514
+ * Non-streaming variant of the request params.
515
+ */
516
+ interface XAIResponsesCreateParamsNonStreaming extends XAIResponsesCreateParams {
517
+ stream?: false;
518
+ }
519
+ /**
520
+ * Response status values.
521
+ */
522
+ type XAIResponsesStatus = "completed" | "in_progress" | "incomplete";
523
+ /**
524
+ * Response object type literal.
525
+ */
526
+ type XAIResponsesObjectType = "response";
527
+ /**
528
+ * Text output item in the response.
529
+ */
530
+ interface XAIResponsesOutputTextItem {
531
+ type: "message";
532
+ /** The role of the message (always assistant for outputs). */
533
+ role: "assistant";
534
+ /** The text content of the message. */
535
+ content: XAIResponsesOutputContent[];
536
+ /** The ID of this output item. */
537
+ id?: string;
538
+ /** The status of this output item. */
539
+ status?: XAIResponsesStatus;
540
+ }
541
+ /**
542
+ * Text content in an output message.
543
+ */
544
+ interface XAIResponsesOutputTextContent {
545
+ type: "output_text";
546
+ /** The text content. */
547
+ text: string;
548
+ /** Annotations on the text (e.g., citations). */
549
+ annotations?: XAIResponsesAnnotation[];
550
+ }
551
+ /**
552
+ * Refusal content in an output message.
553
+ */
554
+ interface XAIResponsesOutputRefusalContent {
555
+ type: "refusal";
556
+ /** The refusal message. */
557
+ refusal: string;
558
+ }
559
+ /**
560
+ * Union type for output content items.
561
+ */
562
+ type XAIResponsesOutputContent = XAIResponsesOutputTextContent | XAIResponsesOutputRefusalContent;
563
+ /**
564
+ * Citation annotation for web search results.
565
+ */
566
+ interface XAIResponsesUrlCitationAnnotation {
567
+ type: "url_citation";
568
+ /** Start index in the text. */
569
+ start_index: number;
570
+ /** End index in the text. */
571
+ end_index: number;
572
+ /** The URL being cited. */
573
+ url: string;
574
+ /** The title of the cited page. */
575
+ title?: string;
576
+ }
577
+ /**
578
+ * File citation annotation.
579
+ */
580
+ interface XAIResponsesFileCitationAnnotation {
581
+ type: "file_citation";
582
+ /** Start index in the text. */
583
+ start_index: number;
584
+ /** End index in the text. */
585
+ end_index: number;
586
+ /** The file ID being cited. */
587
+ file_id: string;
588
+ /** The filename. */
589
+ filename?: string;
590
+ }
591
+ /**
592
+ * Union type for all annotation types.
593
+ */
594
+ type XAIResponsesAnnotation = XAIResponsesUrlCitationAnnotation | XAIResponsesFileCitationAnnotation;
595
+ /**
596
+ * Function call output item.
597
+ */
598
+ interface XAIResponsesOutputFunctionCall {
599
+ type: "function_call";
600
+ /** The ID of the function call. */
601
+ id: string;
602
+ /** The ID of the function call (alias). */
603
+ call_id?: string;
604
+ /** The name of the function being called. */
605
+ name: string;
606
+ /** The arguments to the function as a JSON string. */
607
+ arguments: string;
608
+ /** The status of the function call. */
609
+ status?: XAIResponsesStatus;
610
+ }
611
+ /**
612
+ * Web search call output item.
613
+ */
614
+ interface XAIResponsesOutputWebSearchCall {
615
+ type: "web_search_call";
616
+ /** The ID of the web search call. */
617
+ id: string;
618
+ /** The status of the web search. */
619
+ status?: "in_progress" | "searching" | "completed" | "failed";
620
+ }
621
+ /**
622
+ * File search call output item.
623
+ */
624
+ interface XAIResponsesOutputFileSearchCall {
625
+ type: "file_search_call";
626
+ /** The ID of the file search call. */
627
+ id: string;
628
+ /** The status of the file search. */
629
+ status?: "in_progress" | "searching" | "completed" | "failed";
630
+ /** The search queries used. */
631
+ queries?: string[];
632
+ /** The search results. */
633
+ results?: XAIResponsesFileSearchResult[];
634
+ }
635
+ /**
636
+ * File search result item.
637
+ */
638
+ interface XAIResponsesFileSearchResult {
639
+ /** The file ID. */
640
+ file_id: string;
641
+ /** The filename. */
642
+ filename?: string;
643
+ /** The score/relevance of the result. */
644
+ score?: number;
645
+ /** The matched text content. */
646
+ text?: string;
647
+ }
648
+ /**
649
+ * Code interpreter call output item.
650
+ */
651
+ interface XAIResponsesOutputCodeInterpreterCall {
652
+ type: "code_interpreter_call";
653
+ /** The ID of the code interpreter call. */
654
+ id: string;
655
+ /** The code being executed. */
656
+ code?: string;
657
+ /** The status of the code interpreter. */
658
+ status?: "in_progress" | "interpreting" | "completed" | "failed";
659
+ /** The results of the code execution. */
660
+ results?: XAIResponsesCodeInterpreterResult[];
661
+ }
662
+ /**
663
+ * Code interpreter result item.
664
+ */
665
+ interface XAIResponsesCodeInterpreterResult {
666
+ type: "logs" | "image";
667
+ /** The log output (for type "logs"). */
668
+ logs?: string;
669
+ /** The image data (for type "image"). */
670
+ image?: {
671
+ /** The base64-encoded image data. */
672
+ data?: string;
673
+ /** The MIME type of the image. */
674
+ media_type?: string;
675
+ };
676
+ }
677
+ /**
678
+ * MCP call output item.
679
+ */
680
+ interface XAIResponsesOutputMcpCall {
681
+ type: "mcp_call";
682
+ /** The ID of the MCP call. */
683
+ id: string;
684
+ /** The MCP server URL. */
685
+ server_url?: string;
686
+ /** The MCP server label. */
687
+ server_label?: string;
688
+ /** The status of the MCP call. */
689
+ status?: "in_progress" | "completed" | "failed";
690
+ }
691
+ /**
692
+ * Reasoning output item.
693
+ */
694
+ interface XAIResponsesOutputReasoning {
695
+ type: "reasoning";
696
+ /** The ID of the reasoning item. */
697
+ id?: string;
698
+ /** Summary of the reasoning. */
699
+ summary?: XAIResponsesReasoningSummaryItem[];
700
+ /** Encrypted reasoning content (if included). */
701
+ encrypted_content?: string;
702
+ }
703
+ /**
704
+ * Reasoning summary item.
705
+ */
706
+ interface XAIResponsesReasoningSummaryItem {
707
+ type: "summary_text";
708
+ /** The summary text. */
709
+ text: string;
710
+ }
711
+ /**
712
+ * Union type for all response output items.
713
+ */
714
+ type XAIResponsesOutputItem = XAIResponsesOutputTextItem | XAIResponsesOutputFunctionCall | XAIResponsesOutputWebSearchCall | XAIResponsesOutputFileSearchCall | XAIResponsesOutputCodeInterpreterCall | XAIResponsesOutputMcpCall | XAIResponsesOutputReasoning;
715
+ /**
716
+ * Token usage information for the response.
717
+ */
718
+ interface XAIResponsesUsage {
719
+ /** Number of tokens in the input/prompt. */
720
+ input_tokens: number;
721
+ /** Number of tokens in the output/completion. */
722
+ output_tokens: number;
723
+ /** Total number of tokens used. */
724
+ total_tokens: number;
725
+ /** Detailed breakdown of input tokens. */
726
+ input_tokens_details?: {
727
+ /** Cached tokens from previous requests. */
728
+ cached_tokens?: number;
729
+ };
730
+ /** Detailed breakdown of output tokens. */
731
+ output_tokens_details?: {
732
+ /** Tokens used for reasoning. */
733
+ reasoning_tokens?: number;
734
+ };
735
+ }
736
+ /**
737
+ * Reason for incomplete response.
738
+ */
739
+ type XAIResponsesIncompleteReason = "max_output_tokens" | "content_filter" | "turn_limit" | "tool_use_limit";
740
+ /**
741
+ * Details about why a response is incomplete.
742
+ */
743
+ interface XAIResponsesIncompleteDetails {
744
+ /** The reason the response is incomplete. */
745
+ reason?: XAIResponsesIncompleteReason;
746
+ }
747
+ /**
748
+ * Debug output information (when available).
749
+ */
750
+ interface XAIResponsesDebugOutput {
751
+ /** Debug model information. */
752
+ model_info?: Record<string, unknown>;
753
+ /** Additional debug data. */
754
+ [key: string]: unknown;
755
+ }
756
+ /**
757
+ * Reasoning configuration echoed in the response.
758
+ */
759
+ interface XAIResponsesReasoningResponse {
760
+ /** The effort level used for reasoning. */
761
+ effort?: XAIResponsesReasoningEffort;
762
+ /** The summary style used. */
763
+ summary?: XAIResponsesReasoningSummary;
764
+ }
765
+ /**
766
+ * xAI Responses API response body.
767
+ */
768
+ interface XAIResponse {
769
+ /**
770
+ * Unique ID of the response.
771
+ */
772
+ id: string;
773
+ /**
774
+ * The object type of this resource. Always set to `response`.
775
+ */
776
+ object: XAIResponsesObjectType;
777
+ /**
778
+ * The Unix timestamp (in seconds) for the response creation time.
779
+ */
780
+ created_at: number;
781
+ /**
782
+ * Model name used to generate the response.
783
+ */
784
+ model: string;
785
+ /**
786
+ * Status of the response.
787
+ */
788
+ status: XAIResponsesStatus;
789
+ /**
790
+ * The response generated by the model.
791
+ */
792
+ output: XAIResponsesOutputItem[];
793
+ /**
794
+ * Whether to allow the model to run parallel tool calls.
795
+ */
796
+ parallel_tool_calls?: boolean;
797
+ /**
798
+ * Whether to store the input message(s) and response.
799
+ * @default true
800
+ */
801
+ store?: boolean;
802
+ /**
803
+ * Settings for customizing a text response.
804
+ */
805
+ text?: XAIResponsesText;
806
+ /**
807
+ * Controls which tool is called by the model.
808
+ */
809
+ tool_choice?: XAIResponsesToolChoice;
810
+ /**
811
+ * A list of tools the model may call.
812
+ * Maximum of 128 tools.
813
+ */
814
+ tools?: XAIResponsesTool[];
815
+ /**
816
+ * Whether to process the response asynchronously in the background.
817
+ * Note: Unsupported.
818
+ * @default false
819
+ */
820
+ background?: boolean | null;
821
+ /**
822
+ * Debug output information (when available).
823
+ */
824
+ debug_output?: XAIResponsesDebugOutput | null;
825
+ /**
826
+ * Details about why the response is incomplete (if status is "incomplete").
827
+ */
828
+ incomplete_details?: XAIResponsesIncompleteDetails | null;
829
+ /**
830
+ * Max number of tokens that can be generated.
831
+ * Includes both output and reasoning tokens.
832
+ */
833
+ max_output_tokens?: number | null;
834
+ /**
835
+ * Only included for compatibility.
836
+ */
837
+ metadata?: Record<string, unknown> | null;
838
+ /**
839
+ * The ID of the previous response from the model.
840
+ */
841
+ previous_response_id?: string | null;
842
+ /**
843
+ * Reasoning configuration used for the response.
844
+ */
845
+ reasoning?: XAIResponsesReasoningResponse | null;
846
+ /**
847
+ * Sampling temperature used (between 0 and 2).
848
+ * @default 1
849
+ */
850
+ temperature?: number | null;
851
+ /**
852
+ * Nucleus sampling probability mass used.
853
+ * @default 1
854
+ */
855
+ top_p?: number | null;
856
+ /**
857
+ * Token usage information.
858
+ */
859
+ usage?: XAIResponsesUsage | null;
860
+ /**
861
+ * Unique identifier representing your end-user.
862
+ * Used for monitoring and abuse detection.
863
+ */
864
+ user?: string | null;
865
+ }
866
+ /**
867
+ * Base streaming event structure.
868
+ */
869
+ interface XAIResponsesStreamEventBase {
870
+ /** The type of the streaming event. */
871
+ type: string;
872
+ }
873
+ /**
874
+ * Response created event.
875
+ */
876
+ interface XAIResponsesStreamEventCreated extends XAIResponsesStreamEventBase {
877
+ type: "response.created";
878
+ /** The response object. */
879
+ response: XAIResponse;
880
+ }
881
+ /**
882
+ * Response in progress event.
883
+ */
884
+ interface XAIResponsesStreamEventInProgress extends XAIResponsesStreamEventBase {
885
+ type: "response.in_progress";
886
+ /** The response object. */
887
+ response: XAIResponse;
888
+ }
889
+ /**
890
+ * Response completed event.
891
+ */
892
+ interface XAIResponsesStreamEventCompleted extends XAIResponsesStreamEventBase {
893
+ type: "response.completed";
894
+ /** The completed response object. */
895
+ response: XAIResponse;
896
+ }
897
+ /**
898
+ * Response failed event.
899
+ */
900
+ interface XAIResponsesStreamEventFailed extends XAIResponsesStreamEventBase {
901
+ type: "response.failed";
902
+ /** The failed response object. */
903
+ response: XAIResponse;
904
+ /** Error information. */
905
+ error?: {
906
+ /** Error code. */
907
+ code?: string;
908
+ /** Error message. */
909
+ message?: string;
910
+ };
911
+ }
912
+ /**
913
+ * Response incomplete event.
914
+ */
915
+ interface XAIResponsesStreamEventIncomplete extends XAIResponsesStreamEventBase {
916
+ type: "response.incomplete";
917
+ /** The incomplete response object. */
918
+ response: XAIResponse;
919
+ }
920
+ /**
921
+ * Output item added event.
922
+ */
923
+ interface XAIResponsesStreamEventOutputItemAdded extends XAIResponsesStreamEventBase {
924
+ type: "response.output_item.added";
925
+ /** The index of the output item. */
926
+ output_index: number;
927
+ /** The output item that was added. */
928
+ item: XAIResponsesOutputItem;
929
+ }
930
+ /**
931
+ * Output item done event.
932
+ */
933
+ interface XAIResponsesStreamEventOutputItemDone extends XAIResponsesStreamEventBase {
934
+ type: "response.output_item.done";
935
+ /** The index of the output item. */
936
+ output_index: number;
937
+ /** The completed output item. */
938
+ item: XAIResponsesOutputItem;
939
+ }
940
+ /**
941
+ * Content part added event.
942
+ */
943
+ interface XAIResponsesStreamEventContentPartAdded extends XAIResponsesStreamEventBase {
944
+ type: "response.content_part.added";
945
+ /** The index of the output item. */
946
+ output_index: number;
947
+ /** The index of the content part. */
948
+ content_index: number;
949
+ /** The content part that was added. */
950
+ part: XAIResponsesOutputContent;
951
+ }
952
+ /**
953
+ * Content part done event.
954
+ */
955
+ interface XAIResponsesStreamEventContentPartDone extends XAIResponsesStreamEventBase {
956
+ type: "response.content_part.done";
957
+ /** The index of the output item. */
958
+ output_index: number;
959
+ /** The index of the content part. */
960
+ content_index: number;
961
+ /** The completed content part. */
962
+ part: XAIResponsesOutputContent;
963
+ }
964
+ /**
965
+ * Text delta event (streaming text).
966
+ */
967
+ interface XAIResponsesStreamEventTextDelta extends XAIResponsesStreamEventBase {
968
+ type: "response.output_text.delta";
969
+ /** The index of the output item. */
970
+ output_index: number;
971
+ /** The index of the content part. */
972
+ content_index: number;
973
+ /** The text delta. */
974
+ delta: string;
975
+ }
976
+ /**
977
+ * Text done event.
978
+ */
979
+ interface XAIResponsesStreamEventTextDone extends XAIResponsesStreamEventBase {
980
+ type: "response.output_text.done";
981
+ /** The index of the output item. */
982
+ output_index: number;
983
+ /** The index of the content part. */
984
+ content_index: number;
985
+ /** The complete text. */
986
+ text: string;
987
+ }
988
+ /**
989
+ * Function call arguments delta event.
990
+ */
991
+ interface XAIResponsesStreamEventFunctionCallArgumentsDelta extends XAIResponsesStreamEventBase {
992
+ type: "response.function_call_arguments.delta";
993
+ /** The index of the output item. */
994
+ output_index: number;
995
+ /** The ID of the function call. */
996
+ call_id: string;
997
+ /** The arguments delta. */
998
+ delta: string;
999
+ }
1000
+ /**
1001
+ * Function call arguments done event.
1002
+ */
1003
+ interface XAIResponsesStreamEventFunctionCallArgumentsDone extends XAIResponsesStreamEventBase {
1004
+ type: "response.function_call_arguments.done";
1005
+ /** The index of the output item. */
1006
+ output_index: number;
1007
+ /** The ID of the function call. */
1008
+ call_id: string;
1009
+ /** The complete arguments. */
1010
+ arguments: string;
1011
+ }
1012
+ /**
1013
+ * Reasoning summary text delta event.
1014
+ */
1015
+ interface XAIResponsesStreamEventReasoningSummaryTextDelta extends XAIResponsesStreamEventBase {
1016
+ type: "response.reasoning_summary_text.delta";
1017
+ /** The index of the output item. */
1018
+ output_index: number;
1019
+ /** The index of the summary part. */
1020
+ summary_index: number;
1021
+ /** The text delta. */
1022
+ delta: string;
1023
+ }
1024
+ /**
1025
+ * Reasoning summary text done event.
1026
+ */
1027
+ interface XAIResponsesStreamEventReasoningSummaryTextDone extends XAIResponsesStreamEventBase {
1028
+ type: "response.reasoning_summary_text.done";
1029
+ /** The index of the output item. */
1030
+ output_index: number;
1031
+ /** The index of the summary part. */
1032
+ summary_index: number;
1033
+ /** The complete text. */
1034
+ text: string;
1035
+ }
1036
+ /**
1037
+ * Error event.
1038
+ */
1039
+ interface XAIResponsesStreamEventError extends XAIResponsesStreamEventBase {
1040
+ type: "error";
1041
+ /** Error code. */
1042
+ code?: string;
1043
+ /** Error message. */
1044
+ message?: string;
1045
+ /** Error parameter. */
1046
+ param?: string;
1047
+ }
1048
+ /**
1049
+ * Union type for all streaming events.
1050
+ */
1051
+ type XAIResponsesStreamEvent = XAIResponsesStreamEventCreated | XAIResponsesStreamEventInProgress | XAIResponsesStreamEventCompleted | XAIResponsesStreamEventFailed | XAIResponsesStreamEventIncomplete | XAIResponsesStreamEventOutputItemAdded | XAIResponsesStreamEventOutputItemDone | XAIResponsesStreamEventContentPartAdded | XAIResponsesStreamEventContentPartDone | XAIResponsesStreamEventTextDelta | XAIResponsesStreamEventTextDone | XAIResponsesStreamEventFunctionCallArgumentsDelta | XAIResponsesStreamEventFunctionCallArgumentsDone | XAIResponsesStreamEventReasoningSummaryTextDelta | XAIResponsesStreamEventReasoningSummaryTextDone | XAIResponsesStreamEventError;
1052
+ /**
1053
+ * Call options for ChatXAIResponses.
1054
+ */
1055
+ interface ChatXAIResponsesCallOptions extends BaseChatModelCallOptions {
1056
+ /**
1057
+ * Configuration options for a text response from the model.
1058
+ */
1059
+ text?: XAIResponsesText;
1060
+ /**
1061
+ * Specify additional output data to include in the model response.
1062
+ */
1063
+ include?: XAIResponsesInclude[];
1064
+ /**
1065
+ * The unique ID of the previous response to the model.
1066
+ * Use this to create multi-turn conversations.
1067
+ */
1068
+ previous_response_id?: string;
1069
+ /**
1070
+ * Search parameters for xAI's search capabilities.
1071
+ */
1072
+ search_parameters?: XAIResponsesSearchParameters;
1073
+ /**
1074
+ * Reasoning configuration for reasoning models.
1075
+ */
1076
+ reasoning?: XAIResponsesReasoning;
1077
+ /**
1078
+ * A list of tools the model may call.
1079
+ * Includes built-in tools (web_search, x_search, code_interpreter, file_search)
1080
+ * and custom function tools.
1081
+ *
1082
+ * @example
1083
+ * ```typescript
1084
+ * import { tools } from "@langchain/xai";
1085
+ *
1086
+ * const result = await llm.invoke("What's happening on X?", {
1087
+ * tools: [tools.xaiWebSearch(), tools.xaiXSearch()],
1088
+ * });
1089
+ * ```
1090
+ */
1091
+ tools?: XAIResponsesTool[];
1092
+ /**
1093
+ * Controls which tool is called by the model.
1094
+ */
1095
+ tool_choice?: XAIResponsesToolChoice;
1096
+ /**
1097
+ * Whether to allow the model to run parallel tool calls.
1098
+ */
1099
+ parallel_tool_calls?: boolean;
1100
+ }
1101
+ /**
1102
+ * Input configuration for ChatXAIResponses constructor.
1103
+ */
1104
+ interface ChatXAIResponsesInput extends BaseChatModelParams {
1105
+ /**
1106
+ * The xAI API key to use for requests.
1107
+ * @default process.env.XAI_API_KEY
1108
+ */
1109
+ apiKey?: string;
1110
+ /**
1111
+ * The name of the model to use.
1112
+ * @default "grok-3"
1113
+ */
1114
+ model?: string;
1115
+ /**
1116
+ * Whether to stream responses.
1117
+ * @default false
1118
+ */
1119
+ streaming?: boolean;
1120
+ /**
1121
+ * Sampling temperature between 0 and 2.
1122
+ * @default 1
1123
+ */
1124
+ temperature?: number;
1125
+ /**
1126
+ * Nucleus sampling probability mass.
1127
+ * @default 1
1128
+ */
1129
+ topP?: number;
1130
+ /**
1131
+ * Maximum number of tokens to generate.
1132
+ */
1133
+ maxOutputTokens?: number;
1134
+ /**
1135
+ * Whether to store the input messages and response.
1136
+ * @default true
1137
+ */
1138
+ store?: boolean;
1139
+ /**
1140
+ * A unique identifier representing your end-user.
1141
+ */
1142
+ user?: string;
1143
+ /**
1144
+ * The base URL for the xAI API.
1145
+ * @default "https://api.x.ai/v1"
1146
+ */
1147
+ baseURL?: string;
1148
+ /**
1149
+ * Default search parameters for xAI's search capabilities.
1150
+ */
1151
+ searchParameters?: XAIResponsesSearchParameters;
1152
+ /**
1153
+ * Default reasoning configuration.
1154
+ */
1155
+ reasoning?: XAIResponsesReasoning;
1156
+ /**
1157
+ * Default tools to make available to the model.
1158
+ * Can be overridden per-request in call options.
1159
+ *
1160
+ * @example
1161
+ * ```typescript
1162
+ * import { ChatXAIResponses, tools } from "@langchain/xai";
1163
+ *
1164
+ * const llm = new ChatXAIResponses({
1165
+ * model: "grok-4-1-fast",
1166
+ * tools: [tools.xaiWebSearch(), tools.xaiCodeExecution()],
1167
+ * });
1168
+ * ```
1169
+ */
1170
+ tools?: XAIResponsesTool[];
1171
+ }
1172
+ /**
1173
+ * Invocation parameters for ChatXAIResponses (request params without input).
1174
+ */
1175
+ type ChatXAIResponsesInvocationParams = Omit<XAIResponsesCreateParams, "input">;
1176
+ //#endregion
1177
+ export { ChatXAIResponsesCallOptions, ChatXAIResponsesInput, ChatXAIResponsesInvocationParams, XAIResponse, XAIResponsesAnnotation, XAIResponsesCodeInterpreterResult, XAIResponsesCodeInterpreterTool, XAIResponsesCodeInterpreterToolCall, XAIResponsesCreateParams, XAIResponsesCreateParamsNonStreaming, XAIResponsesCreateParamsStreaming, XAIResponsesDebugOutput, XAIResponsesFileCitationAnnotation, XAIResponsesFileSearchResult, XAIResponsesFileSearchTool, XAIResponsesFunctionTool, XAIResponsesFunctionToolCall, XAIResponsesFunctionToolFunction, XAIResponsesFunctionToolOutput, XAIResponsesInclude, XAIResponsesIncompleteDetails, XAIResponsesIncompleteReason, XAIResponsesInput, XAIResponsesInputContentItem, XAIResponsesInputFileItem, XAIResponsesInputImageItem, XAIResponsesInputItem, XAIResponsesInputTextItem, XAIResponsesLogprobContent, XAIResponsesLogprobToken, XAIResponsesLogprobs, XAIResponsesMcpTool, XAIResponsesMcpToolCall, XAIResponsesMessage, XAIResponsesMessageRole, XAIResponsesObjectType, XAIResponsesOutputCodeInterpreterCall, XAIResponsesOutputContent, XAIResponsesOutputFileSearchCall, XAIResponsesOutputFunctionCall, XAIResponsesOutputItem, XAIResponsesOutputMcpCall, XAIResponsesOutputReasoning, XAIResponsesOutputRefusalContent, XAIResponsesOutputTextContent, XAIResponsesOutputTextItem, XAIResponsesOutputWebSearchCall, XAIResponsesPreviousResponse, XAIResponsesReasoning, XAIResponsesReasoningEffort, XAIResponsesReasoningResponse, XAIResponsesReasoningSummary, XAIResponsesReasoningSummaryItem, XAIResponsesSearchMode, XAIResponsesSearchParameters, XAIResponsesSearchSource, XAIResponsesSearchSourceRss, XAIResponsesSearchSourceWeb, XAIResponsesSearchSourceX, XAIResponsesStatus, XAIResponsesStreamEvent, XAIResponsesStreamEventBase, XAIResponsesStreamEventCompleted, XAIResponsesStreamEventContentPartAdded, XAIResponsesStreamEventContentPartDone, XAIResponsesStreamEventCreated, XAIResponsesStreamEventError, XAIResponsesStreamEventFailed, XAIResponsesStreamEventFunctionCallArgumentsDelta, XAIResponsesStreamEventFunctionCallArgumentsDone, XAIResponsesStreamEventInProgress, XAIResponsesStreamEventIncomplete, XAIResponsesStreamEventOutputItemAdded, XAIResponsesStreamEventOutputItemDone, XAIResponsesStreamEventReasoningSummaryTextDelta, XAIResponsesStreamEventReasoningSummaryTextDone, XAIResponsesStreamEventTextDelta, XAIResponsesStreamEventTextDone, XAIResponsesText, XAIResponsesTextFormat, XAIResponsesTextFormatJsonObject, XAIResponsesTextFormatJsonSchema, XAIResponsesTextFormatText, XAIResponsesTool, XAIResponsesToolCall, XAIResponsesToolChoice, XAIResponsesToolChoiceFunction, XAIResponsesToolChoiceString, XAIResponsesToolOutput, XAIResponsesUrlCitationAnnotation, XAIResponsesUsage, XAIResponsesWebSearchTool, XAIResponsesWebSearchToolCall, XAIResponsesXSearchTool };
1178
+ //# sourceMappingURL=responses-types.d.cts.map