Repository navigation
perf(llm): local chat model keeps the conversation cached across side requests - #4543
Conversation
|
Verdict: Approve with suggestions Local llama.cpp chat models now load with a second slot that shares the conversation's memory. Side requests like memory extraction no longer push the conversation out to host RAM, which removes the 60–90s stalls between turns. The fix is small, opt-out (any caller passing its own flags keeps them), tested, and backed by live before/after numbers. Nothing blocks merge. One thing is worth checking before release: the two slots now share one context budget. A conversation that already fills most of the window may leave no room for a side request, or the side request may squeeze the conversation. A quick run near the context limit would settle it. Real-world evidenceN/A — no evidence bundle was produced for this run (backend load-flag change; real inference is deferred to the strix-halo lane). The PR description includes the author's own live measurements: a TUI 9-task batch with before/after latencies, and a direct server timing of 87.4s → 0.2s. Beyond those, this verdict rests on static review. I couldn't run the new tests here because pytest isn't installed on this runner. 🔍 Technical details🟡 Shared KV pool at near-full context ( 🟢 🟢 Extra catalog round-trip on every chat load ( Strengths
|
1837e8c to
a037859
Compare
|
🟡 Memory extraction may never finish on a model loaded with one slot. This push pins extraction to slot 1. The code comment says a one-slot server ignores the pin, but as far as I know llama.cpp doesn't: it looks up slot 1, finds nothing, and keeps deferring the request. If that's right, extraction times out every turn and memory quietly stops learning. That would happen whenever the model is already resident without Please run one extraction against a one-slot load to confirm. If it hangs, send the side-slot pin only when the loaded model is known to have two slots. 🔍 Technical details
|
|
CI's Linux Unit Tests failure is a real bug, not a flake: Reproduced locally against a minimal fixture server: a 404/error on 🔍 Technical detailsfails because its fixture serves client.load_model("Gemma-4-E4B-it-GGUF", ctx_size=16384, prompt=False)
# LemonadeClientError: Request failed with status 404: ...Suggest wrapping the Separately: the cache-correctness question this PR raises — could the new slots serve a stale/wrong conversation — checks out fine. GAIA resends the full |
… requests On a single llama.cpp slot, every request with its own prompt (memory extraction, titles) first saved the conversation's KV cache to host RAM: 87s per switch for a 30K-token Qwen3-30B context on a Radeon 8060S, while the user's next turn waited. Chat-model loads on the llamacpp recipe now start with a second slot over one shared KV pool and no host prompt cache.
Left to LRU, a memory extraction landed on the slot holding the conversation and overwrote it; the next turn re-read 28-30K tokens (109-122s). Local requests now default to id_slot 0 and extraction uses id_slot 1; a one-slot server ignores the pin.
f307c8d to
dc51e3a
Compare
|
The Reproduced live: a fixture server that 404s on 🔍 Technical detailsLocal repro ( Suggested fix is unchanged from the prior comment: wrap the Not blocking on CI alone — Windows/macOS smoke failures are the known, tracked, |
… load Every chat load now asked the catalog for the model's recipe before deciding on the two-slot flags, and any failure of that request aborted the whole load — so a server that 404s on ?show_all=true (CI's loopback fixture, or a proxy) could no longer load a model at all. The recipe lookup is now only for the speed-up: if the catalog can't be read, the load goes ahead without the chat flags and logs a warning saying so. An auth failure still fails the load, since POST /load would reject it too. A recipe already known from an earlier catalog read skips the extra round-trip.
…s one llama.cpp defers a request pinned to a slot it lacks until the caller gives up, so on a model loaded without --parallel 2 (by another client, with the caller's own flags, or from before the upgrade) every extraction timed out. The provider now reads the loaded model's slot count from /health and drops a side-slot pin the model can't serve.
|
Fixed: memory extraction no longer pins itself to a slot the model doesn't have, so a model loaded with one slot can't stall it. The catalog-failure bug from the earlier comments was already fixed in
🔍 Technical details
|
… point (amd#4657) Right after `gaia init`, if GAIA's own Lemonade is stopped (after a reboot, a crash, or `gaia lemonade embedded stop`), `gaia llm`, `gaia chat`, `gaia api`, every agent constructor, the TUI and `initialize_lemonade()` look for a system Lemonade. They find none and tell the user to run the `gaia init` they already ran. Only the Agent UI server started the right one. Now every start path checks one resolver and starts GAIA's server through the daemon. If that start fails, the daemon's error is shown and nothing tries a system install. <details> <summary>🔍 Technical details</summary> - **Cause.** `ensure_ready` only started the embedded server when the caller pinned no URL. The CLI pins env host and port, and the Agent base pins the URL it resolved while the server was stopped. Both fell through to `/daemon/v1/lemonade/start`, whose `LemonadeSupervisor` only knows `resolve_lemonade()`. `LemonadeClient.initialize` / `launch_server` resolved the system launcher directly. - **Fix.** `gaia_runs_lemonade(base_url)` in `lemonade_launcher.py` is the single decision. It is true when the embedded server is installed, `LEMONADE_BASE_URL` is unset, and the URL is unset or is the one GAIA resolves on its own. `ensure_ready`, the supervisor (now given the daemon's `EmbeddedLemonadeOwner`), `launch_server`, `_check_lemonade_installed`, `start_embedded_if_stopped` and `describe_start_hint` all go through it. The embedded server binds a random port, so `ensure_ready`, the Agent base and `launch_server` re-resolve after starting it. - **Not a start path.** `AgentSDK` construction never starts a server; its first request fails with the provider's client hint. - **Overlap.** This conflicts textually with amd#4618 in `LemonadeClient._check_lemonade_installed`, where both add an "embedded counts as installed" check. Either can merge first; on rebase keep this PR's `gaia_runs_lemonade(self.base_url)` line and amd#4618's message changes. It doesn't touch the functions changed by amd#4627, amd#4632 or amd#4543. </details> ## Test plan - [x] `pytest tests/unit/test_gaia_lemonade_start_path.py` covers the cold state: embedded installed and stopped, no system Lemonade. The tests patch only the daemon, HTTP, `Popen` and the launcher resolver. Each case asserts the daemon started GAIA's server, the system launcher was never consulted, nothing was spawned, and the caller ended up on the new port. Cases: CLI, Agent base, UI server, `initialize_lemonade`, `create_lemonade_client`, the daemon supervisor, and failure paths. - [x] Related suites pass: `test_lemonade_manager_autostart`, `test_lemonade_supervisor`, `test_lemonade_launcher`, `test_lemonade_service`, `test_daemon_lemonade`, `test_daemon_lemonade_routes` - [ ] On a machine with only `gaia init`'s Lemonade: `gaia lemonade embedded stop`, then `gaia llm "hi"` answers instead of saying Lemonade is not installed - [ ] Same state, TUI: the model server comes up without a "could not find one to start" error Co-authored-by: Kalin Ovtcharov <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
|
This PR conflicts with #4655 (Qwen card sampling), which the release plan merges first; the resolution is mechanical and passes the combined tests on a local v0.25 candidate. 🔍 Technical details
|
# Conflicts: # src/gaia/llm/providers/lemonade.py
Two slots without --kv-unified would split n_ctx between them, halving the window the memory fit sized. The unified pool keeps both slots at the full window and the KV memory at n_ctx tokens, which is what the fit charges.
… pool Memory extraction runs on a background thread after the answer returns, so it could be generating on the side slot while the user's next turn ran on the conversation slot. Both slots are promised the whole window from one unified KV pool; when the two active requests together outgrew it, llama.cpp failed both with "Context size has been exceeded" instead of evicting one. Requests to a local model now take a per-model lock inside the existing model-slot lease, so one runs at a time. That matches what --parallel 1 already did at the server, and keeps the second slot's benefit: the conversation's cache stays resident while the side request runs. Idle slots are purged when room is needed, so a single active request always fits. "Context size has been exceeded" and "failed to find free space in the KV cache" are now classified as context overflow, and both typed classifiers read the shared CONTEXT_OVERFLOW_PHRASES list.
# Conflicts: # src/gaia/llm/providers/lemonade.py
|
Side requests can overlap the conversation, so they're now kept from running at the same time. Without this, both requests could fail with "Context size has been exceeded" on the shared KV pool.
Error classification is LLM-affecting: CI should re-run 🔍 Technical details
|
A model with a forced llama.cpp backend loads with save_options, so chat flags sent with it would persist in Lemonade's config. Matches amd#4678, which applies the same guard to its one-slot pin.
…ade (amd#4678) On Lemonade older than v11.8.0, which GAIA still accepts (minimum v10.2.0), two GAIA requests running at once could both fail with "Context size has been exceeded". That happened when memory extraction ran beside the next turn, or when two Agent UI sessions were active. Those versions let llama-server pick several slots over one shared KV pool and promised each slot the whole window (lemonade-sdk/lemonade#3276). GAIA now asks for one slot explicitly, which is what v11.8.0+ (including the pinned v2026.40.0) already does by default, so current installs see no change. Merge before amd#4543, which replaces this flag with its own two-slot set; the overlap is one constant and the load hook. ## Test plan - [ ] `python -m pytest tests/unit/test_lemonade_single_slot.py`: a llama.cpp chat load sends `--parallel 1`, other loads keep their flags, an unreadable catalog still loads, and a 401 still fails. - [ ] `python -m pytest tests/unit/test_broker_wiring.py tests/unit/test_lemonade_model_loading.py tests/unit/test_embedder_cpu_backend.py tests/unit/test_llamacpp_backend.py` - [ ] On a Lemonade older than v11.8.0, load a GGUF chat model through GAIA and check the backend log reads `n_slots = 1`. <details> <summary>🔍 Technical details</summary> - Applies only when the caller passed `ctx_size` and no `llamacpp_args`, and the catalog says the recipe is `llamacpp`. Embedders keep their own batch flags, and FLM/NPU models are untouched. - Sending `llamacpp_args` replaces any args a user saved in Lemonade for that model, for GAIA's loads. - No prompt or tool change, so no eval category needs a re-run. </details> Co-authored-by: Kalin Ovtcharov <[email protected]>
…d#4687) On Qwen3.6-35B-A3B (the local default wherever a GPU holds it), every memory extraction after a turn reasoned until its 4096-token cap and wrote no answer — so memory learned nothing, and each call held the GPU for 2–3 minutes after the user's turn had ended. The agent abandons the call at 60s but Lemonade keeps generating, so calls pile up: on the v0.25 RC a `/model` switch waited ~12 minutes for six of them to drain. Memory's short JSON side calls (extraction, consolidation, reconciliation, skill distillation) now turn thinking off for local models that have a thinking switch; the main turn is unchanged. **Eval required before merge** — this changes what Qwen3.6 is asked to do for memory extraction (an LLM-affecting path). A `gaia eval agent` run on the `gaia_memory` category is pending. <details> <summary>🔍 Technical details</summary> - RC evidence: `lemond.log` shows six non-streaming requests at `out=4096` (prompts 404–1142 tokens), each fired ~100 ms after a turn's `Streaming completed`; the same call on Gemma produces 179–215 tokens. The TUI's agent log is ERROR-only in user mode, which is why the "extraction abandoned" WARNING never appeared. - Root cause: `ModelRequirement.thinking=True` for Qwen3.6 makes `chat_completions` send `enable_thinking: true` on every request unless the caller overrides it, and no memory side call did. Consolidation (1024) and reconciliation (256) had the same flaw with even smaller budgets. - New `no_thinking_kwargs(model)` in `lemonade_client.py` mirrors the auto-title helper's gate: it returns `{}` for cloud models and for models without a registered switch. - An extraction that still ends on `finish_reason=length` with no text now logs an ERROR naming the model. - Rebases cleanly onto amd#4543: its `id_slot=SIDE_SLOT` sits on different lines of the same call. </details> ## Test plan - [x] `pytest tests/unit/test_lemonade_cloud_models.py tests/unit/test_memory_mixin.py tests/unit/test_skill_synthesis_incremental.py tests/unit/test_skill_synthesis.py`: 489 passed - [x] The new call-site tests fail on unfixed `main` (5 fail on the Qwen3.6 path; the Gemma and cloud "send nothing" cases pass either way) - [x] Wire test: a side call to Qwen3.6 reaches Lemonade with `enable_thinking: false` and the card's non-thinking sampling, streaming and non-streaming - [x] `python util/lint.py --black --isort` - [ ] `gaia eval agent --category gaia_memory` on Qwen3.6-35B-A3B (scores the flagship) - [ ] On a Qwen3.6 TUI session, `grep "out=4096" lemond.log` stays empty across several turns, and a `/model` switch loads at once Co-authored-by: Kalin Ovtcharov <[email protected]>
On a cloud model (DeepSeek on Fireworks), every background memory request failed with HTTP 400, so GAIA never learned anything from a conversation on Fireworks. Background memory requests (extraction and the others) pin themselves to a llama.cpp slot to keep the chat's cache warm, a local-only hint added in amd#4543. The cloud path passed it straight to Fireworks, which rejects it ("Extra inputs are not permitted, field: 'id_slot'"). The user sees nothing except an agent-log error that wrongly blames the provider connection. Now the cloud branch drops `id_slot` along with the other llama.cpp-only fields it already strips. Found validating the v0.25 candidate in the TUI on DeepSeek via Fireworks; reproduced with a direct request (with `id_slot` → 400, without → 200). ## Test plan - [x] `pytest tests/unit/test_lemonade_cloud_models.py tests/unit/test_lemonade_chat_slots.py` (113 passed) - [x] The new assertion fails on `main` for both cloud providers (fireworks, amd) and passes here - [x] `python util/lint.py --black --isort` - [ ] TUI on a Fireworks model: "My favourite fruit is mango." → no `HTTP 400` in the agent log, and the fact is extracted to memory
# GAIA v0.25.0 Release Notes ## Breaking Changes - **`gaia chat` runs the flagship GAIA agent**, the same agent as the TUI and Agent UI, instead of the retired ChatAgent. `gaia chat -q "…"` queries it once. (PR [amd#4520](amd#4520)) - **`gaia talk` transcribes and speaks through Lemonade** — it uses Lemonade's Whisper and `kokoro-v1`, and stops with the reason if Lemonade is down. The `[audio]` extra is gone; `pip install amd-gaia[audio]` only warns. (PR [amd#4665](amd#4665)) - **The Agent UI runs only the GAIA agent** — the Agent Hub home, agent picker, and custom-agent export/import are removed from the UI. The CLI and eval harness can still run other agents. (PR [amd#4509](amd#4509)) - **The retired nomic embedder is removed** — memory saved with it is re-embedded on first start. (PR [amd#4489](amd#4489)) - **Indexed documents are re-indexed once** — the document cache is now keyed on chunking settings, so the first query after upgrading rebuilds it. (PR [amd#4624](amd#4624)) - **A skill that asks for more than its tier allows no longer loads** — the permission ceiling is checked at every load, so a skill already on disk that exceeds it is refused with the reason. (PR [amd#4849](amd#4849)) ## What's New - **A larger local model where the GPU holds it** — `gaia init` picks Qwen3.6-35B-A3B on a 64 GB+ Strix Halo or a 32 GB GPU and keeps Gemma-4-E4B elsewhere, with each context window sized to available memory. Qwen3.8 Flash Next is opt-in on 128 GB Strix Halo. (PRs [amd#4479](amd#4479), [amd#4670](amd#4670), [amd#4671](amd#4671), [amd#4658](amd#4658), [amd#4655](amd#4655)) - **The Agent UI opens straight to a chat and sets itself up** — a fresh install runs the same setup steps as the TUI in the window, with provider, key and model settings, permission modes, and revocable "always allow" grants. (PR [amd#4509](amd#4509)) - **A much smaller install** — PyTorch, transformers and accelerate are gone from the core, `[ui]` and `[talk]` installs; the desktop app's Python environment drops from ~0.9 GB to ~0.1 GB on Windows. (PRs [amd#4666](amd#4666), [amd#4621](amd#4621), [amd#4665](amd#4665)) - **One Windows installer for the desktop app and the terminal**, with a GAIA Windows Terminal profile. (PRs [amd#4720](amd#4720), [amd#4707](amd#4707)) - **A "no" holds** — a declined action isn't retried through another tool; the agent asks again with the exact command. The TUI gains Shift+Tab permission modes. (PRs [amd#4460](amd#4460), [amd#4461](amd#4461)) - **Answers are checked against what the tools actually did** — the agent looks at files you name before answering about them, and a short plain-English note appears only when work isn't confirmed. (PRs [amd#4532](amd#4532), [amd#4501](amd#4501), [amd#4508](amd#4508)) - **One shell session** — commands share a persistent shell, risky ones ask instead of being refused, and "full access" is one setting everywhere. (PR [amd#4408](amd#4408)) - **Memory surfaces what's relevant to each request, with its age**, keeps what fixed a failure as a lesson for that workspace, and extracts after the answer instead of before it. (PRs [amd#4061](amd#4061), [amd#4066](amd#4066), [amd#4406](amd#4406)) - **`gaia.log` stays bounded** — it rotates at 10 MB with three backups (`GAIA_LOG_MAX_MB`, `GAIA_LOG_BACKUPS`). (PRs [amd#4668](amd#4668), [amd#4760](amd#4760)) - **Child processes get a trimmed environment** — shell, MCP and skill children no longer inherit GAIA's internal credentials; `GAIA_NO_DOTENV` skips loading `.env`. (PRs [amd#4635](amd#4635), [amd#4659](amd#4659)) - **Every file tool checks the allowed-folders rule**, and paths inside an inline shell script are checked one by one. (PRs [amd#4656](amd#4656), [amd#4758](amd#4758)) ## Bug Fixes A selection of the user-visible fixes; the full list is in the changelog below. - **Local Qwen models no longer loop on repeated tool calls** — they run with their model card's sampling instead of near-greedy settings. (PR [amd#4655](amd#4655)) - **Qwen3.6 runs on a Strix Halo with an older AMD driver** — it used to crash on its first token, so `gaia init` failed; GAIA now turns off the Vulkan path that crashes on those drivers only, and newer drivers keep the faster path. (PR [amd#4674](amd#4674)) - **A long PDF no longer hangs or times out while indexing** — big documents index in the background, and PDFs that only carry owner-password restrictions now index. (PRs [amd#4754](amd#4754), [amd#4679](amd#4679), [amd#4734](amd#4734)) - **Document answers cite the right document and page**, and every chunk is embedded whole instead of its first 1,200 characters. (PRs [amd#4688](amd#4688), [amd#4723](amd#4723)) - **`gaia init` fails when model verification fails**, shows downloads live, and no longer hangs while Lemonade hashes a large model. (PRs [amd#4620](amd#4620), [amd#4564](amd#4564), [amd#4673](amd#4673)) - **`gaia init` adds a profile's extras without reinstalling GAIA**, which failed on Windows while `gaia.exe` was running. (PR [amd#4672](amd#4672)) - **Every SDK and CLI entry point starts GAIA's own Lemonade**, and every call goes to the resolved URL with its API key. (PRs [amd#4657](amd#4657), [amd#4627](amd#4627)) - **Local chat stays cached across turns** — the system prompt is fixed and side requests no longer evict the conversation. (PRs [amd#4698](amd#4698), [amd#4543](amd#4543)) - **A cloud model selection never preloads a local model**, and cloud models no longer get llama.cpp-only fields. (PRs [amd#4757](amd#4757), [amd#4709](amd#4709)) - **The Agent UI stops claiming "100% local" while chat goes to a cloud model**, and the chat header names the session's real model. (PRs [amd#4711](amd#4711), [amd#4550](amd#4550)) - **Enter can't approve a permission prompt**, and prompts wait 10 minutes before timing out. (PRs [amd#4700](amd#4700), [amd#4699](amd#4699)) - **Stopping a run keeps the turn and its steps visible.** (PR [amd#4743](amd#4743)) - **A file edit keeps the file's line endings** — a one-line edit on Windows used to rewrite every line ending, so a small change showed up as the whole file changed. (PR [amd#4864](amd#4864)) - **A broken agent install is reported as broken, not as missing** — the error names both package versions and the real import error, and suggests a reinstall that works. (PR [amd#4588](amd#4588)) - **A meeting or document summary is never cut off mid-sentence** — a thinking model used to spend the summary's output budget reasoning, so a long meeting lost its second half. (PR [amd#4827](amd#4827)) - **"What can you do?" gets an answer** instead of an attempt to generate an image of the question. (PR [amd#4809](amd#4809)) - **Writes and approved edits can't reach credential folders** (`~/.ssh`, `~/.aws`, `~/.kube` and others), and shell option values and script arguments get the same path check as plain paths. (PRs [amd#4848](amd#4848), [amd#4847](amd#4847)) - **`gaia connectors connect google --grant-agent installed:gaia` works** — it used to fail with no sign-in link for the shipped agent; it now asks for read-only Gmail and grants exactly that. (PR [amd#4859](amd#4859)) - **A "no" to creating a folder also covers writing into it** — GAIA no longer asks again to create the same folder a different way. (PR [amd#4857](amd#4857)) - **`gaia skill import` runs the same checks as a hub install** — https only, the audit, the permission ceiling, and an explicit opt-in for skills that ship code. (PR [amd#4849](amd#4849)) - **Memory off and private chats apply to scheduled and background runs too.** (PRs [amd#4842](amd#4842), [amd#4821](amd#4821)) - **Memory stops false apologies and reusing deleted values**, saves "remember this" requests, and skips loading the embedder when memory is off. (PRs [amd#4708](amd#4708), [amd#4756](amd#4756)) - **A reply cut off by the token limit is continued** instead of ending mid-sentence, and a tool call cut off at the output cap is retried shorter. (PRs [amd#4054](amd#4054), [amd#4556](amd#4556)) - **The TUI remembers the chosen model** across restarts and agent-process restarts. (PRs [amd#4497](amd#4497), [amd#4710](amd#4710)) - **`gaia uninstall --purge` removes installer binaries, PATH edits and daemon state.** (PR [amd#4413](amd#4413)) ## Contributors Thanks to the community members who contributed to this release: - [@itomek](https://github.com/itomek) — the flagship's browser and tool picker, one shell session, memory extraction off the answer path, stale tool-result eviction, the TUI's sourced Fireworks rankings, and `--purge` cleanup (PRs [amd#4407](amd#4407), [amd#4408](amd#4408), [amd#4406](amd#4406), [amd#4465](amd#4465), [amd#4414](amd#4414), [amd#4413](amd#4413)) - [@mikemikimike](https://github.com/mikemikimike) — chained shell command timeouts, bundled skills in frozen builds, and sidecar cleanup reporting (PRs [amd#4463](amd#4463), [amd#4467](amd#4467), [amd#4419](amd#4419)) - [@Hashim1999164](https://github.com/Hashim1999164) — honoring `GAIA_HOME` for cache, chat and index paths (PR [amd#4381](amd#4381)) - [@krtadev](https://github.com/krtadev) — `~` expansion in file and document tool paths (PR [amd#4576](amd#4576)) - [@aksh8b](https://github.com/aksh8b) — telling a broken agent install apart from a missing one, with a reinstall hint that works (PR [amd#4588](amd#4588)) - [@Dev-next-gen](https://github.com/Dev-next-gen) — numeric prerelease ordering in the hub (PR [amd#4517](amd#4517)) - [@vianmangal](https://github.com/vianmangal) — recording denied tool calls as unsuccessful in memory (PR [amd#4412](amd#4412)) - [@GaetanVDB07](https://github.com/GaetanVDB07) — links to upstream credential setup guides for connectors (PR [amd#4669](amd#4669)) - [@rradjabi](https://github.com/rradjabi) — moving self-hosted CI jobs to the xsj-dispatch runner pool (PR [amd#4534](amd#4534)) ## Also in this PR - **Hub floors raised to core 0.25.0** — the chat agent imports the allowed-folders check that only 0.25.0 ships (amd#4656), so `gaia-agent-chat` goes to 0.2.0 with `amd-gaia>=0.25.0`, and the flagship requires `amd-gaia>=0.25.0` and `gaia-agent-chat>=0.2.0`. - **Two follow-ups held back until that floor could rise** — `~/.gaia/logs/gaia-agent.log` now rotates like `gaia.log` (amd#4668), and the chat agent's Python runners and Windows notification start their children without GAIA's internal credentials (amd#4659). The full changelog (300 commits) is in `docs/releases/v0.25.0.mdx`. ## Test plan - [x] `util/validate_release_notes.py docs/releases/v0.25.0.mdx --tag v0.25.0` passes; narrative is 590 words (cap 600) - [x] `util/check_component_core_api.py --release-version 0.25.0` passes - [x] `pytest tests/unit/test_docs_json_release.py tests/unit/test_check_component_core_api.py hub/agents/chat/python/tests/test_chat_dependency_floor.py hub/agents/chat/python/tests/test_dependency_floor.py hub/agents/gaia/python/tests/test_gen_binaries_lock.py` (72 passed) - [x] `pytest hub/agents/gaia/python/tests/test_stdio.py` (91 passed, incl. the new rotation test); `pytest tests/unit/test_execute_python_file_cwd.py tests/unit/test_run_python_tool.py` (42 passed) - [ ] `mintlify validate` (docs CI job) — timed out locally, relying on CI - [x] Full flagship eval on main 9ce6598 (https://github.com/amd/gaia/actions/runs/37436249503): 181/308 scenarios pass vs 100/183 for the same categories in the baseline, 39 FAIL→PASS, 13 PASS→FAIL (two fixed in amd#4878, held until after rc1); retrieval lane still finishing at merge time - [ ] CI green ## Release checklist - [ ] Publish `gaia-agent-chat` 0.2.0 only after core 0.25.0 is on PyPI — it fails at import on an older core - [ ] Build Installers on the merged SHA (pre-tag verification) before pushing `v0.25.0` - [ ] terminal-hub 0.25.0 published before the flagship npm release consumes `binaries.lock.json` 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]> Co-authored-by: Kalin Ovtcharov <[email protected]>
On a local llama.cpp model, the turn after almost every message stalled for 60–90s with no visible reason. Memory extraction, which runs after each turn, sends its own short prompt. With a single llama.cpp slot, the server first copies the conversation's KV cache to host RAM, which took 87s for a 30K-token Qwen3-30B context on a Radeon 8060S. The user's next turn queues behind that copy, and extraction hit its 60s limit and stored nothing. Chat-model loads on the
llamacpprecipe now pass--parallel 2 --kv-unified --cache-ram 0 --slot-prompt-similarity 0.5. The second slot shares the one KV pool, so side requests no longer evict the conversation and the RAM copy is never needed.Measured directly against the server: a 29-token request after a 29.5K-token conversation took 87.4s with one slot and 0.2s with this change. Returning to the conversation stays cached at 0.3–0.9s.
Slots are pinned too. A longer session showed two slots aren't enough on their own: chosen by LRU, a memory extraction sometimes landed on the slot holding the conversation and overwrote it, and the next turn re-read 28–30K tokens (109–122 s). Local requests now go to
id_slot0 and extraction toid_slot1. A server with one slot ignores the pin, and cloud requests carry none.Test plan
pytest tests/unit/test_lemonade_chat_slots.py: local requests are pinned to the conversation slot, cloud requests carry no slot, and extraction runs on the side slot. Also: chat loads get the flags; loads that already set their own flags (the embedders), loads with no context size, and FLM models are untouched.pytest tests/test_lemonade_client.py tests/unit/test_lemonade_predownload_checks.py: same 26 failures as main, all needing a live server on :13305./api/v1/healthlaunch_command); the 9-task batch gave the numbers above.