aboutsummaryrefslogtreecommitdiff
path: root/modules/test/test-skill-create.js
diff options
context:
space:
mode:
authorAgando <roduccomm@gmail.com>2026-10-27 17:08:42 +0100
committerAgando <roduccomm@gmail.com>2026-10-27 17:08:42 +0100
commit74fd694745650770041ed90141e943f5c237a7f5 (patch)
treeb9a0bce98e24022d9a138d504a81f3db633562f4 /modules/test/test-skill-create.js
parent675397058b3562a67319e92bd455761168908090 (diff)
fix(newos4): send num_ctx to Ollama, and make one auto-connect failure read as one line
Two things I had flagged as "worth your attention" and one leftover nit. - num_ctx was never sent. Ollama's server-side default context is 2k-4k depending on the build, so a system prompt + 20 messages + up to 24k chars of tool results could be truncated server-side, which is exactly the "it forgot what it just read" class of report. Every Ollama request now carries options.num_ctx (default 16384, overridable via webx11_ollama_numctx, floor 512); the OpenAI-compatible branch is untouched because num_ctx is not one of its parameters. - Automatic connect prints one outcome instead of one line per endpoint tried (7 -> 3 on a dead endpoint). Interactive `ollamaconnect` keeps the per-endpoint detail. - write_file's failure message no longer echoes a trailing slash. Verification: - test-ollama-numctx.js (7 asserts): generate and chat payloads carry num_ctx=16384, a stored override is used, junk/too-small values fall back, and the /v1/chat/completions branch does not receive it. RED on HEAD: TypeError reading 'num_ctx' of undefined. Suite 20/20. - Live v4.6.117, capturing the real request: {"num_ctx":16384} on /api/generate with model gemma4:31b-cloud, reply "OK". - Live v4.6.118, dead endpoint (127.0.0.1:9, fallback disabled): automatic -> 3 lines ("connecting on first use…", "Connecting to dead…", "Auto-connect failed — …"); manual connect() -> 4 lines including "endpoint http://127.0.0.1:9 failed", so the suppression is conditional, not blanket.
Diffstat (limited to 'modules/test/test-skill-create.js')
0 files changed, 0 insertions, 0 deletions