fix(installer): don't flag SD/embedding models as 'Context unverified' during init#1558
Conversation
SD and embedding models skip context verification entirely, but the verification summary inherited a stale _ctx_verified=None from __init__ and printed a misleading '⚠️ Context unverified!' next to them. Reset the context state per-model so the warning shows only when verification was actually attempted (LLM models with a min context size). Closes #318
Code Review —
|
The per-model context-verification flag is set dynamically and its absence is meaningful (verification not attempted). Add a class-level annotation without assignment so hasattr semantics are preserved while resolving the Pylint attribute-defined-outside-init (W0201) failure.
Running
gaia init --profile sdprinted a misleading⚠️ Context unverified!next toSDXL-Turboeven though it verified fine — SD and embedding models never run context verification, but the summary inherited a stale_ctx_verified=Noneleft over from__init__and showed the warning on the first model in the profile. After this change, context state is reset per-model and the warning appears only when an LLM with a context requirement was actually checked and the server reported no context size back; SD/embedding models now show a cleanOK.Closes #318.
Test plan
python -m pytest tests/unit/installer/test_init_verify_ctx_display.py -v— 3 tests (SD-first stays clean, LLM-without-ctx still warns, ctx state doesn't leak between models)gaia init --profile sd --yesand confirmSDXL-TurboshowsOKwith no "Context unverified" warning, while LLMs still show(ctx: …)