Small models (e.g. Qwen3.5-4B) frequently skip tool calls when tools are enabled, defaulting to plain text answers instead. This adds a short, model-agnostic system prompt nudge when tools are active that encourages the model to use them for math/code/search tasks. The nudge varies depending on which tools are enabled (code, web, or both). Also fixes tool-call XML leaking into visible chat output: - Strip <tool_call> / <function=...> tags from outgoing SSE content deltas before they reach the frontend. - Sanitize stale <tool_call> XML from conversation history messages so prior leaked text does not re-enter the model context. - Strip raw content_accum in the false-positive DRAINING path that previously yielded unprocessed text. |
||
|---|---|---|
| .. | ||
| data_recipe | ||
| export | ||
| inference | ||
| training | ||
| __init__.py | ||