Repository navigation
fix(models): honor runtime-discovered cloud models in Local only and setup - #7002
Conversation
|
Verdict: Request changes This PR makes Local only, setup, vision-model choice and agent startup recognise cloud models GAIA learned about from Lemonade's catalog, such as
Real-world evidenceN/A: no evidence bundle was produced for this run. The verdict rests on static review alone. The PR itself says it ran no live cloud gateway or hardware check. I couldn't run the unit tests either, because pytest isn't installed in this review environment. 🔍 Technical details🟡 New checks are cold-cache blind (
🟡 Follow-up: same 🟢 Repeated three-way check Strengths
|
|
Addressed the cold-catalog review blocker in
Local verification: 373 passed, 1 skipped across nine focused unit test modules; Black check (10 changed files), isort check, compileall, and Disclosure and authorization: Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content. |
|
Thanks — this fixes #6996 and every local default still stays local with no network call. Two regressions against main need fixing before merge:
🔍 Technical details
|
|
Addressed the maintainer-requested regressions in
The PR description still reflects the first implementation and should be updated separately to describe the cold-catalog behavior and failure handling accurately. Disclosure and authorization: Slai Agent Runtime performed the investigation, implementation, and test execution. The account owner authorized this contribution and is responsible for its content. |
|
Verdict: Request changes The cold-catalog fixes from my last review are in: Local only and agent startup now read the catalog, and context eviction and the output cap use the same check. One regression the maintainer flagged is still unfixed: 🟡 With Lemonade stopped, setup and vision now error for a user-added dotted model. Take a saved chat model added from a Hugging Face link, such as
The fix: treat a registered local model as local before asking the catalog. Agent startup already does this. 🔍 Technical details
if not may_be_cloud_model(model_id) or find_model_requirement(model_id) is not None:
return FalseAdd a cold-cache test with
|
|
Addressed the latest bot finding in Registered local models (including user-added dotted ids) are now treated as local before catalog probing in the shared classifier. Setup planning and default vision selection therefore keep the normal local path when Lemonade is stopped; unregistered ambiguous dotted ids still read the catalog and fail loudly if it cannot be checked. Added cold setup and vision regressions proving the catalog is not queried for a registered local id. Validation: 165 focused tests passed, 1 skipped; Black, compileall, and The PR body already describes the cold-catalog behavior and raise-on-failure handling. No live gateway or hardware result is claimed. |
…stopped Turning on Local only with Lemonade down now still clears known cloud defaults and names the one id it couldn't check. Agent startup on a dotted model GAIA doesn't know starts Lemonade without loading anything, then asks the catalog again instead of failing. Setup reports a plan error rather than a 500, and the vision default only reads the catalog for an -FLM id, so RAGConfig() no longer needs a running server. Registered local models never trigger a catalog read on any of these paths.
|
Thanks @huong8373tt-beep, this is a solid fix and the cold-catalog tests are exactly what was needed. I merged main in and closed the remaining gaps from the review: with Lemonade stopped, Local only now still clears known cloud defaults and names only the id it couldn't check, agent startup on an unlisted dotted local model starts Lemonade before asking the catalog again, setup returns a plan error instead of a 500, and the vision default no longer needs a running server. Tests for each are in, and the PR body and CLI reference now match. |
Turning on Local only kept a saved default that only Lemonade's model list identifies as a cloud model (for example an
opencode.*model), so every later chat was refused. Setup also planned to download such a model, the vision default could mistake it for an NPU model, and agent startup tried to preload it on the PC. These paths now read Lemonade's model list whenever a saved or requested id could be a gateway model, including in a fresh CLI process, and treat it as cloud. Known cloud ids (amd.*,fireworks.*, Claude) still need no network call, and models GAIA knows are local, including user-added dotted ids, never trigger a lookup.With Lemonade unreachable, nothing silently guesses: Local only clears the known cloud ids, keeps the one it couldn't check and warns that it wasn't checked; agent startup starts Lemonade without loading a model and asks again, failing with a clear error if it still can't tell; setup returns a plan error instead of a 500. Discovered cloud models also get the cloud output-token cap and context eviction at agent startup.
Fixes #6996.
Test plan
python -m pytest tests/unit/test_local_only_paths.py tests/unit/test_base_agent_lemonade_api_key.py tests/unit/test_default_vision_model.py tests/unit/chat/ui/test_setup_plan.py tests/unit/chat/ui/test_setup_chat_model.pypython -m pytest tests/unit/test_vision_off_on_npu.py tests/unit/test_vision_uses_downloaded_model.py tests/unit/test_agent_max_output_tokens.py tests/unit/test_lemonade_cloud_models.py tests/unit/installer/test_init_test_step.pyopencode.*model saved asdefault_model, Lemonade stopped:gaia config set network_policy local_ai_onlyclears anyamd.*default and warns that theopencode.*id wasn't checked; with Lemonade running it clears it.No prompts, tool text or schemas change, so no eval category needs a re-run.
Disclosure and authorization
Slai Agent Runtime performed the investigation, implementation, and test execution.
The account owner authorized this contribution and is responsible for its content.