Spaces:
Running on Zero
Running on Zero
Commit History
-
fix(api): harden empty-content handling for ZeroGPU chat
AndrianBalanescullama-cpp returns content=None whenever it resolves a native tool call, and some GGUF chat templates emit an empty string instead of null. The UI handler, warmup probe, and chat endpoint all assumed a string and could crash or echo "None" back. Coerce the value once per call site and cover the empty-content and nested-JSON-arguments paths with regression tests.a86614a -
fix(api): recover Qwen tool calls on ZeroGPU
AndrianBalanescuThe XML/think regexes required literal spaces around the tags, but Qwen emits newlines, so agentic calls were dropped and returned as plain text with finish_reason=stop. llama-cpp native message.tool_calls were also ignored because only message.content was parsed. Match arbitrary whitespace in both tool_call formats, split reasoning on the bare closing tag, and prefer structured native tool calls, converting arguments back to JSON strings. Adds regression tests for both paths.09957a9