This commit is contained in:
Connor Johnstone committed 2026-09-29 16:24:41 -04:00
1 parent e25bb71fb7
commit 0943d99465
21 files changed
+2189 -301

No files matched your search

+7 -10
View File
@@ -45,8 +45,8 @@ _oc_launch() {
fi
# ---- where the proxy lives -------------------------------------------
# Default is mainframe talking to itself. Any other machine (the laptop)
# exports LITELLM_BASE=https://llm.rcjohnstone.com before calling these.
# Always https://llm.rcjohnstone.com, on every host including mainframe --
# never 127.0.0.1 (the default is set in zshenv; see the note there).
# That name is NOT public: no A record, internal CA, and Caddy's (internal)
# snippet source-IP gates it to 10.0.0.0/24, 10.0.1.0/24 and the podman
# subnets. The router's DNS override resolves it to 10.0.0.2, so on the LAN
@@ -56,20 +56,17 @@ _oc_launch() {
# exported before opencode starts -- there is no default inside the JSON and
# an unset value interpolates to empty, which fails as a confusing URL error
# rather than a missing-variable one.
: ${LITELLM_BASE:=http://127.0.0.1:4000}
: ${LITELLM_BASE:=https://llm.rcjohnstone.com}
export LITELLM_BASE
# Preflight the proxy. Without this the first request fails somewhere inside
# the TUI and reads like a model problem instead of a dead backend.
if ! curl -fsS -m 3 -o /dev/null "$LITELLM_BASE/health/liveliness" 2>/dev/null; then
print -u2 "oc: LiteLLM proxy is not answering on $LITELLM_BASE."
if [[ "$LITELLM_BASE" == *127.0.0.1* ]]; then
print -u2 " Try: sudo podman restart connor_litellm_1"
else
print -u2 " Check: on the LAN? DNS resolving to 10.0.0.2? Caddy's"
print -u2 " internal CA trusted by this machine? (a TLS failure looks"
print -u2 " identical to a dead backend here)"
fi
print -u2 " Check: on the LAN? DNS resolving to 10.0.0.2? Caddy's"
print -u2 " internal CA trusted by this machine? (a TLS failure looks"
print -u2 " identical to a dead backend here)"
print -u2 " On mainframe, also: sudo podman restart connor_litellm_1"
return 1
fi
+6 -1
View File
@@ -26,7 +26,12 @@ export ANDROID_HOME="$HOME/Android/Sdk"
# opencode's {env:} interpolation has no fallback syntax: an unset value becomes
# an empty string and every request fails with an opaque URL parse error. Set
# here rather than in .zshrc so non-interactive shells resolve it too.
export LITELLM_BASE="${LITELLM_BASE:-http://127.0.0.1:4000}"
#
# The domain on EVERY host, mainframe included -- never 127.0.0.1. The router's
# DNS override resolves it to 10.0.0.2, so it stays on the LAN. A loopback
# default here was shared to the laptop by the one-branch rebuild and broke
# oc-work there; one name that works everywhere can't regress that way.
export LITELLM_BASE="${LITELLM_BASE:-https://llm.rcjohnstone.com}"
# Repo scripts come first; host-specific ones shadow the shared ones.
# typeset -U keeps the array unique, so a nested shell re-reading this file