Skip to content

fix(llm): route OpenClaw through LLMSpy gateway#139

Draft
bussyjd wants to merge 4 commits intofeat/appkit-nanobotfrom
fix/llmspy-routing
Draft

fix(llm): route OpenClaw through LLMSpy gateway#139
bussyjd wants to merge 4 commits intofeat/appkit-nanobotfrom
fix/llmspy-routing

Conversation

@bussyjd
Copy link
Collaborator

@bussyjd bussyjd commented Feb 9, 2026

Summary

  • Fix LLMSpy deployment: the init container and volume config now correctly copy both llms.json and providers.json (root cause of the crash / scale-to-0)
  • Update default model name from glm4 to glm-4.7-flash in the LLMSpy ConfigMap
  • Route OpenClaw's Ollama provider through LLMSpy (llmspy.llm.svc:8000) instead of directly to Ollama (ollama.llm.svc:11434)
  • Wire agentModel into the Helm chart's generated openclaw.json

Test plan

  • LLMSpy pod starts and stays Running (1/1 ready, readiness probe passes)
  • Both llms.json and providers.json present in /home/llms/.llms/
  • Direct POST to LLMSpy /v1/chat/completions returns valid OpenAI-format JSON from Ollama
  • OpenClaw config (openclaw.json) shows baseUrl pointing to LLMSpy
  • Ollama logs confirm requests arriving from LLMSpy pod IP (full proxy chain verified)

LLMSpy was scaled to 0 due to a missing providers.json in the deployed
init container. The source llm.yaml already had the fix but the cluster
was stale. This commit also updates OpenClaw's default Ollama baseUrl
to point to LLMSpy (port 8000) instead of directly to Ollama, and
fixes the default model name from "glm4" to "glm-4.7-flash".
Revert Ollama limits to cpu: 2000m, memory: 4Gi to match the previous
defaults and avoid over-provisioning on local dev clusters.
Replace the in-cluster Ollama Deployment/PVC/Service with an
ExternalName Service that routes ollama.llm.svc.cluster.local to the
host machine. LLMSpy and all consumers use the stable cluster-internal
DNS name; the ExternalName target is resolved at stack init time:

  k3d  → host.k3d.internal
  k3s  → node gateway IP (future)

CopyDefaults now accepts a replacements map so stack init can resolve
{{OLLAMA_HOST}} (and future placeholders) in infrastructure templates.
@bussyjd bussyjd changed the base branch from feat/appkit-nanobot to integration-okr-1 February 9, 2026 15:15
@bussyjd bussyjd changed the base branch from integration-okr-1 to feat/appkit-nanobot February 9, 2026 15:16
@OisinKyne
Copy link
Contributor

Is it just that you had ollama on your host previously? or is the a reason it can't go in the stack? imo without good reason i see this as a con for the efficacy of the stack if it has to be on host. I'd much rather we put it in the stack and as an easy opt in for like obol agent init local or something.

@bussyjd bussyjd marked this pull request as draft February 11, 2026 07:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants