Conversation
When LEMONADE_BASE_URL points to a remote server, gaia init now auto-detects remote mode and downloads models via the REST API instead of failing trying to install the local lemonade-server binary. - Auto-detect remote mode from LEMONADE_BASE_URL (non-localhost hosts) - Use LemonadeClient.pull_model_stream() API for model downloads in remote mode, with progress bar display - Fall back to API when local lemonade-server CLI is unavailable - Add unit tests for remote detection, API pull, and fallback behavior Co-Authored-By: Claude Opus 4.6 <[email protected]>
0846bf7 to
0153d22
Compare
…ation-fails-on-ubuntu-24043-lts
Replace ~170-line _download_models() subprocess/CLI logic and ~50-line _pull_models_via_api() with calls to LemonadeClient.ensure_model_downloaded(), which handles availability checks, API downloads, and progress for both local and remote servers. Closes #311
Replace ~170-line _download_models() subprocess/CLI logic and ~50-line _pull_models_via_api() with calls to LemonadeClient.ensure_model_downloaded(), which handles availability checks, API downloads, and progress for both local and remote servers. Closes #311
…https://github.com/amd/gaia into 311-gaia-init-installation-fails-on-ubuntu-24043-lts
- Fix LEMONADE_HOST → LEMONADE_BASE_URL in remote error message - Update --remote CLI help to describe actual behavior (skip local install/start, download models via API, auto-detection) - Document remote mode in cli.mdx: updated options table, added env var example, annotated steps with remote behavior, added Remote Mode tip block Closes #311
Give remote mode proper visibility as a #### subsection instead of a <Tip> block, and present both activation methods (--remote flag and LEMONADE_BASE_URL env var) as equal options. Co-Authored-By: Tomasz Iniewicz <[email protected]>
Remove standalone #### Remote Mode section to fix asymmetric TOC, add intro paragraph explaining Local vs Remote modes before the Tabs, and move activation details into the Remote Mode tab.
|
@claude review this PR for any issues. |
|
Claude finished @kovtcharov's task —— View job Reviewing PR #345
Code Review SummaryThis PR is well-structured and addresses the issue appropriately. The changes significantly simplify the codebase by delegating model downloads to 🟢 Strengths
🟡 Minor Observations
🟢 Test QualityThe new tests are well-structured and properly mock dependencies:
VerdictLGTM - This is a clean refactor that improves maintainability while fixing the reported issue. The minor observations above are non-blocking and can be addressed in future iterations if desired. |
## Summary - Add release notes for v0.15.4.1 (`docs/releases/v0.15.4.1.mdx`) - Bump `__version__` from `0.15.4` → `0.15.4.1` in `src/gaia/version.py` - Add `releases/v0.15.4.1` to nav and update navbar label in `docs/docs.json` Closes #336, #339, #344, #345, #342, #348, #346 > **Note:** Do not tag `v0.15.4.1` until after this PR merges. --------- Co-authored-by: Tomasz Iniewicz <[email protected]>
Summary
Fixes #311
When
LEMONADE_BASE_URLpoints to a remote Lemonade server (e.g., Docker container without local Lemonade CLI),gaia initpreviously failed trying to install the locallemonade-serverbinary. This PR fixes that by:LEMONADE_BASE_URLwhen it points to a non-localhost hostLemonadeClient.ensure_model_downloaded()instead of shelling out to the local CLI or reimplementing streaming pull logic_pull_models_via_api()method — all replaced by the existing client method that works for both local and remote serversBonus fix:
_ctx_warningdisplayed "None" during verificationWhy: During Step 4 model verification, the output showed
✓ Qwen3-0.6B-GGUF - OK Noneinstead of✓ Qwen3-0.6B-GGUF - OK (ctx: 4096).Before:
self._ctx_warningwas initialized toNonein__init__()(line 197). The display code usedhasattr(self, "_ctx_warning")to check whether a warning existed — but since the attribute was always set (toNone),hasattralways returnedTrue. The f-string then renderedNoneas the literal string"None"inside the Rich markup.After: Check the value's truthiness instead of attribute existence:
Justification: The
hasattrcheck was the wrong guard here because_ctx_warningis always defined on the instance. The attribute is only populated with a real string whenactual_ctx > min_ctx(context is larger than required). When context matches exactly (the common case), it staysNone, and truthiness correctly skips the warning display.Before
After
Test plan
pytest tests/unit/test_init_command.py— 42/42 passed)pytest tests/unit/— 417 passed, 13 skipped)python util/lint.py --all)LEMONADE_BASE_URL=https://itomek-gaia.ngrok.app/api/v1 gaia init --profile minimal --yes— all 4 steps complete, context displays correctly