sync: auto-sync from GURU-KALI at 2026-05-26 20:08:37

Author: Mike Swanson
Machine: GURU-KALI
Timestamp: 2026-05-26 20:08:37
This commit is contained in:
2026-05-26 20:08:38 -07:00
parent b9d7b657c2
commit 63bc234d1b
3 changed files with 15 additions and 28 deletions

View File

@@ -49,26 +49,20 @@ qwen3:14b and qwen3.6 are CPU-bottlenecked on this machine (split mode, PCIe ban
## Endpoints
Auto-detect: any machine with a local Ollama on `127.0.0.1:11434` uses local. Otherwise it falls back to the **per-machine** host in `.claude/identity.json` `ollama_fallback` — each user/machine chooses its own (GURU-BEAST-ROG, the always-on RTX 4090, is the usual pick).
Endpoint comes from `.claude/identity.json` `ollama` (Phase 2 centralization, 2026-05-26) — read the declared endpoint, no curl probe per call:
```bash
# Universal resolver — the fallback is per-machine, read from identity.json (never hardcode)
LOCAL="http://localhost:11434"
FALLBACK=$(python3 -c "import json;print((json.load(open('.claude/identity.json')).get('ollama_fallback') or {}).get('endpoint',''))" 2>/dev/null)
if curl -s -m 2 "$LOCAL/api/tags" >/dev/null 2>&1; then
OLLAMA="$LOCAL"
elif [ -n "$FALLBACK" ]; then
OLLAMA="$FALLBACK" # e.g. GURU-KALI -> http://100.101.122.4:11434 (GURU-BEAST-ROG)
else
OLLAMA="$LOCAL" # no fallback configured — local only
fi
OLLAMA=$(jq -r '.ollama.endpoint // .ollama.fallback // "http://localhost:11434"' .claude/identity.json)
MODEL=$(jq -r '.ollama.prose_model // "qwen3:14b"' .claude/identity.json)
```
`migrate-identity.sh` sets the `ollama` object per machine — `endpoint` (the one to use), `fallback` (backup, usually GURU-BEAST-ROG `100.101.122.4`), `prose_model` (qwen3:8b on 12 GB boxes, qwen3:14b elsewhere). Re-run `migrate-identity.sh` to re-detect after an Ollama/network change.
Rationale:
- **Local-Ollama machines** (e.g. Howard-Home, with the canonical model set) use local — faster, zero Tailscale hop; leave `ollama_fallback` unset/local.
- **GURU-BEAST-ROG:** always-on RTX 4090; the usual `ollama_fallback` target for machines without local models.
- **Machines without local Ollama** set `ollama_fallback` in identity.json to the host they want (commonly Beast over Tailscale).
- **Fallback offline (rare):** graceful degradation — local users continue; remote users get a clean timeout.
- **Local-Ollama machines** (e.g. Howard-Home, GURU-5070) get `endpoint=localhost` at migration — faster, zero Tailscale hop.
- **GURU-BEAST-ROG:** always-on RTX 4090; the usual `fallback`, and many machines' `endpoint`.
- **Machines without local Ollama** (e.g. GURU-KALI) get `endpoint=fallback=Beast`.
- **No per-call probe:** the declared endpoint is trusted; re-run migrate-identity.sh if the Ollama/network topology changes.
Manual override (for testing or explicit preference): set `OLLAMA=http://100.101.122.4:11434` before the call.