• ctrl/chat_llm.ini exec/chat_llm.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Fri May 29 23:59:56 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/3ef83bcbfc9ed41607b63774
    Modified Files:
    ctrl/chat_llm.ini exec/chat_llm.js
    Log Message:
    chat_llm: add configurable num_ctx (Ollama context window)

    Adds a num_ctx knob (read from chat_llm.ini, per-persona or [default])
    passed through to Ollama's request options on all three /api/chat
    builds (initial, pre-tool, follow-up). 0/unset => omitted via
    `cfg.num_ctx || undefined` (JSON.stringify drops an undefined value),
    so Ollama keeps its server default and existing installs are unaffected.

    Why: a large system prompt plus retrieved RAG context can exceed
    Ollama's ~4096-token default; llama.cpp then keeps the prompt's tail and truncates the FRONT, dropping the identity/style rules at the top of the
    system prompt and making the bot answer as a generic "AI assistant".
    Observed with a 4698-token persona prompt capped at 4096. Documents the
    knob (commented, off by default) in the stock chat_llm.ini.

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net
  • From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Fri May 29 23:59:57 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/143338a4deabfd87458fee78
    Modified Files:
    ctrl/chat_llm.ini exec/chat_llm.js
    Log Message:
    chat_llm: endpoint failover (endpoint_fallback)

    Add an optional endpoint_fallback. dispatch() now wraps the provider
    call: when the primary endpoint throws (transport error / non-200), it
    retries once against the fallback, and a ~60s cooldown routes straight
    to the fallback on subsequent turns so an outage doesn't add the
    primary's full timeout to every reply (re-probes the primary after the cooldown). No fallback configured => unchanged behavior. Documents the
    knob (commented) in the stock chat_llm.ini.

    Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net