@ai-sdk/openai-compatible 3.0.61 → 3.0.62

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.
@@ -73,6 +73,11 @@ export type OpenAICompatibleChatConfig = {
73
73
  */
74
74
  supportsStructuredOutputs?: boolean;
75
75
 
76
+ /**
77
+ * Whether the model supports multi-part content in tool results.
78
+ */
79
+ supportsMultiPartToolContent?: boolean;
80
+
76
81
  /**
77
82
  * The supported URLs for the model.
78
83
  */
@@ -315,6 +320,8 @@ export class OpenAICompatibleChatLanguageModel implements LanguageModelV4 {
315
320
  // messages:
316
321
  messages: convertToOpenAICompatibleChatMessages(prompt, {
317
322
  providerOptionsKey: metadataKey,
323
+ supportsMultiPartToolContent:
324
+ this.config.supportsMultiPartToolContent,
318
325
  }),
319
326
 
320
327
  // tools:
@@ -91,6 +91,14 @@ export interface OpenAICompatibleProviderSettings {
91
91
  */
92
92
  supportsStructuredOutputs?: boolean;
93
93
 
94
+ /**
95
+ * Whether chat models support multi-part content in tool results.
96
+ *
97
+ * Enable this for providers that extend the OpenAI Chat Completions API with
98
+ * structured tool-result content. Defaults to `false`.
99
+ */
100
+ supportsMultiPartToolContent?: boolean;
101
+
94
102
  /**
95
103
  * Optional function to transform the request body before sending it to the API.
96
104
  * This is useful for proxy providers that may require a different request format
@@ -172,6 +180,7 @@ export function createOpenAICompatible<
172
180
  ...getCommonModelConfig('chat'),
173
181
  includeUsage: options.includeUsage,
174
182
  supportsStructuredOutputs: options.supportsStructuredOutputs,
183
+ supportsMultiPartToolContent: options.supportsMultiPartToolContent,
175
184
  supportedUrls: options.supportedUrls,
176
185
  transformRequestBody: options.transformRequestBody,
177
186
  metadataExtractor: options.metadataExtractor,