lmstudio-embeddings-catalog-drift-no-models-loaded-jit-load-fix
Verified the environment end-to-end and wrote the solution to ~/lmstudio-embeddings-catalog-drift-no-models-loaded-jit-load-fix.md.
| Hypothesis | Evidence |
|---|---|
/api/v0/load is not valid |
POST /api/v0/load → {"error":"Unexpected endpoint or method. (POST /api/v0/load)"} — so a forced load is impossible on this API surface |
/api/tags (ollama probe) fails |
GET /api/tags → Unexpected endpoint or method — explains why provider=auto can never flip to ollama via that path |
The configured model exists in /v1/models |
present, so a JIT embeddings request resolves by fallback |
| The JIT fix works | POST /v1/embeddings (old model name) → 200 object:list with a real vector |
/health flips healthy |
embedding.healthy: True, provider ollama, model text-embedding-qwen3-embedding-0.6b |
state:not-loaded), and provider=auto probes lmstudio→ollama→openai and falls through → embedding.healthy=false./v1/embeddings request to trigger LM Studio's JIT loader, which serves via fallback within ~60s and flips /health to healthy.Content-Type client bug. Red /health + 500s ≠ embeddings problem; check the daemon journal first.The .md includes the exact commands, a verification table, verify_command, and optional long-term hardening (pinning an existing catalog model in the embedding config block, or reloading kara LM Studio models).
# Evidence - Problem class: lmstudio-embeddings-catalog-drift-no-models-loaded-jit-load-fix - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-09-05T00:23:42.615Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "DuckBrain /health showed status degraded with embedding.healthy=false (lmstudio note: 'No models loaded. Please load a model in the developer page or use the lms load command'; ollama: model not in /api/tags; openai: missing key), making embedding-dependent paths fail. Root condition: LM Studio at :1234 had NO models loaded AND its catalog had DRIFTED - the configured model text-embedding-qwen3-embedding-0.6b no longer appears in /api/v0/models (only qwen3-0.6b LLM + text-embedding-nomic-embed-text-v1.5 embeddings, both state not-loaded). POST /api/v0/load is NOT a valid endpoint (Unexpected endpoint or method). Fix WITHOUT config change or restart: POST any /v1/embeddings request (even with the OLD model name - the server JIT-loads an embeddings model and serves the request via fallback) -> model loads, /health flips to healthy (lmstudio healthy:true note ok) within ~60s, writes succeed. CRITICAL co-finding: this degraded health was NOT the cause of the accompanying POST 500s (that was a separate missing-Content-Type client bug) - a red /health plus 500s does not mean the embeddings are the culprit; check the daemon journal for the actual exception stack first.", "environment": "LM Studio API at localhost:1234 (tailnet-forwarded to kara host, no local systemd unit on this box); DuckBrain daemon with embedding provider=auto defaults (no embedding block in local duckbrain.config.json), model text-embedding-qwen3-embedding-0.6b", "language": "typescript", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "lmstudio-embeddings-catalog-drift-no-models-loaded-jit-load-fix", "provider": "openrouter", "solved_at": "2026-09-05T00:23:42.615Z", "version": ""}Verified the environment end-to-end and wrote the solution to ~/lmstudio-embeddings-catalog-drift-no-models-loaded-jit-load-fix.md.
| Hypothesis | Evidence |
|---|---|
/api/v0/load is not valid |
POST /api/v0/load → {"error":"Unexpected endpoint or method. (POST /api/v0/load)"} — so a forced load is impossible on this API surface |
/api/tags (ollama probe) fails |
GET /api/tags → Unexpected endpoint or method — explains why provider=auto can never flip to ollama via that path |
The configured model exists in /v1/models |
present, so a JIT embeddings request resolves by fallback |
| The JIT fix works | POST /v1/embeddings (old model name) → 200 object:list with a real vector |
/health flips healthy |
embedding.healthy: True, provider ollama, model text-embedding-qwen3-embedding-0.6b |
state:not-loaded), and provider=auto probes lmstudio→ollama→openai and falls through → embedding.healthy=false./v1/embeddings request to trigger LM Studio's JIT loader, which serves via fallback within ~60s and flips /health to healthy.Content-Type client bug. Red /health + 500s ≠ embeddings problem; check the daemon journal first.The .md includes the exact commands, a verification table, verify_command, and optional long-term hardening (pinning an existing catalog model in the embedding config block, or reloading kara LM Studio models).
# Evidence - Problem class: lmstudio-embeddings-catalog-drift-no-models-loaded-jit-load-fix - Model: openrouter/deepseek/deepseek-v4-flash-0731 - Solved: 2026-09-05T00:23:42.615Z - Verification: solution produced by pi in sandbox; see signatures.json
{"description": "DuckBrain /health showed status degraded with embedding.healthy=false (lmstudio note: 'No models loaded. Please load a model in the developer page or use the lms load command'; ollama: model not in /api/tags; openai: missing key), making embedding-dependent paths fail. Root condition: LM Studio at :1234 had NO models loaded AND its catalog had DRIFTED - the configured model text-embedding-qwen3-embedding-0.6b no longer appears in /api/v0/models (only qwen3-0.6b LLM + text-embedding-nomic-embed-text-v1.5 embeddings, both state not-loaded). POST /api/v0/load is NOT a valid endpoint (Unexpected endpoint or method). Fix WITHOUT config change or restart: POST any /v1/embeddings request (even with the OLD model name - the server JIT-loads an embeddings model and serves the request via fallback) -> model loads, /health flips to healthy (lmstudio healthy:true note ok) within ~60s, writes succeed. CRITICAL co-finding: this degraded health was NOT the cause of the accompanying POST 500s (that was a separate missing-Content-Type client bug) - a red /health plus 500s does not mean the embeddings are the culprit; check the daemon journal for the actual exception stack first.", "environment": "LM Studio API at localhost:1234 (tailnet-forwarded to kara host, no local systemd unit on this box); DuckBrain daemon with embedding provider=auto defaults (no embedding block in local duckbrain.config.json), model text-embedding-qwen3-embedding-0.6b", "language": "typescript", "model": "openrouter/deepseek/deepseek-v4-flash-0731", "problem_class": "lmstudio-embeddings-catalog-drift-no-models-loaded-jit-load-fix", "provider": "openrouter", "solved_at": "2026-09-05T00:23:42.615Z", "version": ""}