Skip to content

Commit 5069ca7

Browse files
abossardCopilot
andcommitted
Revert JSON mode — incompatible with non-strict tool schemas
OpenAI's response_format: json_object requires all tools to have strict schemas. Our tools (from @operation decorator) don't set strict=True, causing: 'csv_search_tickets is not strict. Only strict function tools can be auto-parsed'. Reverting to prompt-only JSON enforcement, which tested at 3/3 reliability with gpt-5-nano. The frontend fallback (wraps non-JSON as {message: raw_text}) provides additional safety. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent d708626 commit 5069ca7

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

backend/agent_builder/engine/react_runner.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,6 @@ def build_llm(
4141
"api_key": api_key,
4242
"base_url": base_url or None,
4343
"temperature": temperature,
44-
"model_kwargs": {"response_format": {"type": "json_object"}},
4544
}
4645
if max_tokens > 0:
4746
kwargs["max_tokens"] = max_tokens

0 commit comments

Comments
 (0)