File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -177,21 +177,19 @@ export class LLMVisionProvider implements IVisionProvider {
177177 const { generateText } = await import ( '../../api/generateText.js' ) ;
178178
179179 // Build the multimodal message with text prompt + image.
180- // The content array format is the standard multimodal message shape
181- // accepted by all major vision LLM providers (OpenAI, Anthropic, Gemini) .
180+ // Message. content now natively accepts MessageContentPart[] so we
181+ // pass the structured array directly instead of JSON.stringify .
182182 const result = await generateText ( {
183183 provider : this . _config . provider ,
184184 model : this . _config . model ,
185185 apiKey : this . _config . apiKey ,
186186 baseUrl : this . _config . baseUrl ,
187187 messages : [ {
188188 role : 'user' ,
189- // Serialize the content parts array as JSON. The provider adapter
190- // will parse it back into the appropriate multimodal format.
191- content : JSON . stringify ( [
189+ content : [
192190 { type : 'text' , text : this . _prompt } ,
193191 { type : 'image_url' , image_url : { url : image } } ,
194- ] ) ,
192+ ] ,
195193 } ] ,
196194 } ) ;
197195
You can’t perform that action at this time.
0 commit comments