Fara integration crashes when using LM Studio instead of vLLM (empty response triggers IndexError in _parse_thoughts_and_action)
Title: Fara model fails in Magentic-UI when served via LM Studio (IndexError parsing tool calls)
Summary:
Using microsoft_fara-7b@iq2_m served through LM Studio with Magentic-UI results in empty model responses and runtime crashes.
Steps to reproduce:
- Serve Fara model in LM Studio using OpenAI-compatible API.
- Configure Magentic-UI using OpenAIChatCompletionClient pointing to LM Studio.
- Start Magentic-UI with
--faraor use Fara-based team templates. - Attempt any prompt.
Observed behavior:
-
Model returns empty assistant messages (
"content": ""). -
Magentic-UI crashes with:
IndexError: list index out of range in _parse_thoughts_and_action -
Tool-call parser expects
<tool_call>formatting that Fara doesn't output when run via LM Studio.
Expected behavior:
- Model should generate valid formatted tool calls or degrade gracefully.
Notes:
- Authentication issue resolved, error comes after successful request.
- Appears Fara integration assumes vLLM template behavior.
System:
- macOS (Apple Silicon)
- LM Studio
- Magentic-UI latest build.
Also happens with Ollama.
I saw the same issue, when using the original fara-7b repo and someone created a workaround for LM Studio, because the payload/response was not the same as vLLM studio, its not a fix for magentic-ui.
https://github.com/pmbstyle/fara-agent
We're looking in better supporting LM studio in future releases