_call_vlm_with_multimodal_content passes a pre-built messages list via
messages= when doing VLM-enhanced queries with multimodal content. The
vision_model_func in insert_content_list_example.py was not accepting this
parameter, so it fell through to **kwargs and then into
openai_complete_if_cache which also builds its own messages from prompt —
causing "got multiple values for keyword argument 'messages'" TypeError.
Added messages=None parameter and a fast path that uses the pre-built
messages directly when provided, matching the pattern already used in
raganything_example.py.
Fixes#28Fixes#98
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
openai_embed is an EmbeddingFunc instance (decorated with
@wrap_embedding_func_with_attrs). Wrapping it inside a lambda and
passing it to another EmbeddingFunc causes double invocation of
EmbeddingFunc.__call__, which doubles the returned vector count and
raises "Vector count mismatch: expected N vectors but got 2N vectors".
Using openai_embed.func accesses the unwrapped async function directly,
as documented in lightrag-hku's own codebase.
Fixes the root cause of HKUDS/LightRAG#2549.