Commit Graph

6 Commits

Author SHA1 Message Date
Lucas Ercolano 842bfd4335 Merge PR #463: multi-provider LLM support via Prompture
# Conflicts:
#	.env.example
#	backend/app/utils/llm_client.py
2026-04-10 16:58:04 -03:00
Juan Denis 25909ccdca fix: use Prompture's strip_think_tags and clean_json_text instead of hand-rolled regexes
chat() and chat_json() now delegate think-tag stripping and JSON
cleanup to Prompture's built-in utilities (strip_think_tags,
clean_json_text).  Manual regexes are kept only in the OpenAI
fallback path.  Adds LM Studio integration test script.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 01:34:38 -04:00
Juan Denis 79edc61563 feat: multi-provider LLM support via Prompture
Add optional Prompture integration for 12+ LLM providers (LM Studio,
Ollama, Claude, Groq, Kimi/Moonshot, etc.) as a drop-in backend.
Zero breaking changes — falls back to the existing OpenAI SDK client
when Prompture is not installed.

- Rewrite llm_client.py with dual-backend architecture
- Update .env.example with provider/model format examples
- Add multi-provider table to README Quick Start section
- Add prompture as optional dependency in requirements.txt

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-04 01:18:04 -04:00
iml1s 481cc009a3 fix(llm_client): remove response_format json_object for local LLM compatibility
LM Studio and Ollama do not support response_format: json_object,
only json_schema or text. This causes errors when using local LLMs.

The existing markdown fence cleanup logic in chat_json() already
handles parsing JSON from raw LLM output, making response_format
unnecessary. This change follows the same pattern as commit 985f89f
which improved compatibility with diverse model outputs.

Tested with: LM Studio + qwen3.5-9b (full predict pipeline passes)
2026-03-11 02:20:25 +08:00
666ghj 985f89f49a fix: resolve 500 error caused by <think> tags and markdown code fences in content field from reasoning models like MiniMax/GLM 2026-03-06 00:30:31 +08:00
666ghj 08f417f3b7 Introduce Project ID for context management, finalizing the stateful API pipeline from file submission to graph construction. 2025-11-28 17:21:08 +08:00