From ed36c38ae4e0859968207df884ea54231562de7a Mon Sep 17 00:00:00 2001 From: yage Date: Sun, 15 Nov 2026 18:13:31 -0700 Subject: [PATCH] preparation for yagehome/llm model --- config/local/altaria/etc/yagehome/llm/env | 16 +++++++++++++++ zsh/rc.d/31.utils-claude.zsh | 24 +++++++++++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 config/local/altaria/etc/yagehome/llm/env create mode 100644 zsh/rc.d/31.utils-claude.zsh diff --git a/config/local/altaria/etc/yagehome/llm/env b/config/local/altaria/etc/yagehome/llm/env new file mode 100644 index 0000000..c8ab320 --- /dev/null +++ b/config/local/altaria/etc/yagehome/llm/env @@ -0,0 +1,16 @@ +# +# enables yage/home `ollama-llm` on this host (linked to /etc/yagehome/llm/env) +# install with `scwrypts -g yagehome llm/install`; see llm/README.md in yage/home +# + +# ollama-cuda | ollama-rocm | ollama +YAGEHOME_LLM__GPU=ollama-cuda + +# pre-pulled on install; must match the altaria host model in application/lite-llm (yage/home) +YAGEHOME_LLM__MODEL=qwen3.6:35b + +# (optional) unload the model and free VRAM after this much idle time (default 5m) +YAGEHOME_LLM__KEEP_ALIVE=5m + +# (optional) tokens; size to VRAM and match maxInputTokens for altaria in application/lite-llm (default 32768) +YAGEHOME_LLM__CONTEXT_LENGTH=32768 diff --git a/zsh/rc.d/31.utils-claude.zsh b/zsh/rc.d/31.utils-claude.zsh new file mode 100644 index 0000000..e012664 --- /dev/null +++ b/zsh/rc.d/31.utils-claude.zsh @@ -0,0 +1,24 @@ +command -v claude &>/dev/null || return 0 + +claude.home() { + # Claude Code against the home LLM router (wrynegade/home application/lite-llm) + # + # default / haiku / sonnet slots -> "yagehome" model group (GPU host, CPU fallback) + # '/model opus' -> real Claude, billed to API credits + # + # plain `claude` is untouched and keeps using the subscription + local router_url="${CLAUDE_HOME__ROUTER_URL:-http://192.168.69.100:11434}" + local router_key_ref='op://27lf2zsq4fwwgw4sqlte4tynhm/claude/home-llm-router-key' # yage/home + + local router_key + router_key="$(op read "${router_key_ref}")" && [[ "${router_key}" ]] \ + || { echo "claude.home : unable to read router key from 1Password (${router_key_ref})" >&2; return 1; } + + ANTHROPIC_BASE_URL="${router_url}" \ + ANTHROPIC_AUTH_TOKEN="${router_key}" \ + ANTHROPIC_MODEL=yagehome \ + ANTHROPIC_DEFAULT_HAIKU_MODEL=yagehome \ + ANTHROPIC_DEFAULT_SONNET_MODEL=yagehome \ + ANTHROPIC_DEFAULT_OPUS_MODEL=claude-opus-5-5 \ + claude "${@}" +}