You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add local LM Studio support, Prometheus metrics, Traefik proxy, and Grafana dashboards
Add Docker infrastructure for local development with LM Studio as LLM provider,
Prometheus metrics collection with custom histograms, Traefik reverse proxy
configuration, and Grafana dashboard provisioning. Update SDK session handling
and deriver queue management for improved reliability.
Copy file name to clipboardExpand all lines: CLAUDE.md
+31Lines changed: 31 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -84,6 +84,37 @@ All API routes follow the pattern: `/v1/{resource}/{id}/{action}`
84
84
- Typechecking: `uv run basedpyright`
85
85
- Format code: `uv run ruff format src/`
86
86
87
+
### Local LM Studio Setup
88
+
89
+
- Honcho can use LM Studio for generation through the `custom` provider path.
90
+
- Keep `LLM_OPENAI_API_KEY` configured for embeddings unless embedding support is added for local models.
91
+
- For Docker Compose, `LLM_OPENAI_COMPATIBLE_BASE_URL` must be `http://host.docker.internal:1234/v1`, not `http://localhost:1234/v1`.
92
+
-`LLM_OPENAI_COMPATIBLE_API_KEY=lm-studio` is sufficient for local use.
93
+
- Current local default model is `qwen2.5-14b-instruct`.
94
+
- When overriding `DIALECTIC_LEVELS__*` via env vars, each level needs its full required settings, not just `PROVIDER` and `MODEL`. Include `THINKING_BUDGET_TOKENS` and `MAX_TOOL_ITERATIONS`, and optionally `MAX_OUTPUT_TOKENS`.
95
+
- Docker should own the runtime environment completely. Do not mount the repo onto `/app` and do not mount a named volume onto `/app/.venv`, or the image-built environment can be hidden and replaced with incompatible artifacts.
96
+
- If Docker services fail with missing Python modules or incompatible native extensions, rebuild the image instead of trying to repair the environment in-place:
97
+
98
+
```bash
99
+
docker compose build --no-cache api deriver
100
+
docker compose up -d --force-recreate api deriver
101
+
```
102
+
103
+
- Verify LM Studio from the host with:
104
+
105
+
```bash
106
+
curl -sS http://localhost:1234/v1/models
107
+
```
108
+
109
+
- Verify LM Studio from Docker with:
110
+
111
+
```bash
112
+
docker compose run --rm --entrypoint sh api -lc 'python - <<\"PY\"
0 commit comments