Repository navigation
Description
Bug description
ARTEX's Ollama Test Connection returns unexpected tool calls or tool-like JSON text instead of the requested OK response.
The UI sometimes reports Connected even when the returned content is semantically incorrect.
Environment
- ARTEX: v0.7.0
- Commit:
22ae88afabf66e47e73644a0528d8b427c4c80b8 - Norma SDK: v0.4.11
- Ollama: v0.30.9
- OS: Kali Linux
- Container engine: Podman 5.8.6
- Docker Compose: 2.40.3
- GPU: NVIDIA GTX 1660 Ti, 6 GB
- RAM: 32 GB
- Model:
huihui_ai/baronllm-abliterated:latest - Base URL:
http://host.docker.internal:11434/v1
Steps to reproduce
- Perform a clean installation of ARTEX v0.7.0.
- Configure an Ollama LLM profile.
- Click Test Connection.
- Inspect the returned response and ARTEX container logs.
Observed behavior
Four connection tests returned HTTP 200.
- Three returned unexpected TaskOutput-like text.
- One returned a structured tool call with
finish_reason: tool_calls. - All four requests consumed 627 prompt tokens.
- Direct Ollama API requests from the same ARTEX container returned
OK.with only 27 prompt tokens andfinish_reason: stop.
No actual tool execution has been established.
Expected behavior
The connection test should produce a minimal textual response without invoking executable tools or returning unrelated tool calls.
Source investigation
In agent/provider.go, TestConnection calls agentcore.Run() with an explicitly empty Tools slice and MaxTurns set to 1.
However, the observed responses suggest additional instructions or tool definitions may be present in the actual request.
The current validation also accepts any non-empty reply, which can result in a misleading Connected status.
Request
Please investigate whether Norma v0.4.11 introduces additional tools or instructions during TestConnection despite the explicitly empty Tools slice.
A dedicated text-only diagnostic path and stricter response validation may help address this issue while preserving existing operational security controls.
Additional information
- A complete ARTEX reinstall did not eliminate the behavior.
- Ollama connectivity and direct text generation work correctly.
- Similar unexpected tool responses were observed with other local models in the previous ARTEX installation.
- The current ARTEX source tree is clean and unmodified.
- No credentials or API keys are included in this report.
Activity
github-actions commentedon Nov 24, 2026
Thanks for the detailed report — classified as a bug. Version and environment details are good, but reproduction is not yet conclusive. Missing: (1) the exact HTTP request body sent by TestConnection and the full response JSON (message.content and message.tool_calls), since 627 vs 27 prompt tokens implies extra system prompt or tool definitions are serialized; (2) whether the empty Tools slice is encoded as
"tools": []or omitted entirely by Norma SDK v0.4.11, and any gamma/norma wrapper prompt applied aroundagentcore.Run(); (3) Ollama server-side debug logs for the same four requests; (4) the Modelfile/template forhuihui_ai/baronllm-abliterated:latest, as some local models inject tool-call tokens; (5) whether the issue reproduces with a stock model (e.g. llama3.1) and with a direct curl using an identical payload; (6) the validation code path that accepts any non-empty reply. Steps 1–3 should also be run against a single deterministic model to confirm.🤖 automated reply from the repo bot. A human maintainer reads everything. Ping me in any comment with
@artex-bot.houleiyx commentedon Nov 25, 2026
The 627 vs 27 prompt-token gap is a useful clue. I'd capture the exact TestConnection request and compare it with the direct Ollama request:
messages,tools(including whether it's omitted or[]), and the full response'scontent,tool_calls, andfinish_reason. If TestConnection sends extrainstructions or tools, that points to the Norma/agent wrapper. If the payload is genuinely text-only, I'd try the identical request with a stock Ollama model
to check the model template.
For the connection test itself, a minimal request without the agent wrapper may be more reliable. I'd also require a normal text reply rather than treating
any non-empty response as “Connected.”
I work on ccglass. Since this setup uses Ollama's OpenAI-compatible
/v1endpoint, it can help capture that request and response for comparison:https://github.com/jianshuo/ccglass.
Phantom-IN commentedon Nov 25, 2026
Found the cause: the SDK adds its background-task tools (TaskOutput, TaskStop, TaskList, Monitor) to the connection test even with an empty tool list, which explains the extra prompt tokens and the TaskOutput-like replies. Fix is in #538.
FoxSca commentedon Nov 25, 2026
Thank you, @Phantom-IN, for reproducing the issue, identifying the root cause, and providing a fix in PR #538.
Your findings are consistent with the behavior observed in my local environment, particularly the unexpected TaskOutput responses and the 627 vs 27 prompt-token difference.
I appreciate the addition of a regression test.
I will wait for the PR to be reviewed and merged, then retest the connection with my local Ollama installation and report the results.
Thank you for your contribution!
Phantom-IN commentedon Nov 25, 2026
Thanks @FoxSca, let me know how the retest goes once it's merged.