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. |
||
|---|---|---|
| .. | ||
| assets | ||
| auth | ||
| core | ||
| loggers | ||
| models | ||
| plugins | ||
| requirements | ||
| routes | ||
| state | ||
| storage | ||
| tests | ||
| utils | ||
| __init__.py | ||
| _platform_compat.py | ||
| colab.py | ||
| main.py | ||
| run.py | ||
| startup_banner.py | ||