From 8870eb04510f18ea81c246b8d5f2d27c20b910f1 Mon Sep 17 00:00:00 2001 From: Markus Fritsche Date: Sun, 10 May 2026 18:06:08 +0000 Subject: [PATCH] config: route all presets through hossenfelder per issue #12 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Resolves issue #12 by partial-accept of the recommendation. What landed: - Single broker URL: http://hossenfelder.fritz.box:8082 for all three presets (fast / deep / cloud). Server-side model-aware routing; no client-side cloud auth (proxy holds the OpenRouter bearer). - Models from hossenfelder's /v1/models inventory: fast -> qwen2.5-coder-1.5b-q4_k_m.gguf (boltzmann local) deep -> mistral-nemo-12b-instruct (boltzmann local) cloud -> anthropic/claude-haiku-4.5 (OpenRouter route) - `cloud` was already pointing at hossenfelder but with https://; flipped to http:// so it matches the proxy's actual scheme. What deferred: - Schema rename `models` -> `brokers` (and the 5-cloud-preset shape suggested in #12) โ€” would touch repl.lua + broker.lua. Not blocking Phase 7. If multi-preset becomes useful in practice, file a separate issue for the rename then. Phase 7 verification (live broker test): - broker.chat(fast, [user="say pong"]) -> "CMD: echo pong" in ~3s - multi-turn arithmetic (7*8=56, *2=112) preserved across turns Co-Authored-By: Claude Opus 4.7 (1M context) --- config.lua | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/config.lua b/config.lua index 70637b1..e6b3a66 100644 --- a/config.lua +++ b/config.lua @@ -1,26 +1,31 @@ -- config.lua โ€” model registry, routing rules, user preferences. -- Loaded with dofile() at startup; returns a plain Lua table. -- See docs/PHASE0.md ยง10 for resolution order and full schema. +-- +-- Per issue #12: hossenfelder is the canonical single-URL broker. It does +-- model-aware routing server-side (local models on boltzmann; cloud routes +-- through OpenRouter using its own bearer auth โ€” no client-side key here). +-- Discovery: GET http://hossenfelder.fritz.box:8082/v1/models. + +local HOSSENFELDER = "http://hossenfelder.fritz.box:8082" return { default_model = "fast", models = { fast = { - endpoint = "http://dirac.fritz.box:8081", - model = "qwen-coder-7b-snappy-8k", + endpoint = HOSSENFELDER, + model = "qwen2.5-coder-1.5b-q4_k_m.gguf", temperature = 0.2, }, deep = { - endpoint = "http://dirac.fritz.box:8080", - model = "qwen-coder-7b-32k", + endpoint = HOSSENFELDER, + model = "mistral-nemo-12b-instruct", temperature = 0.1, }, cloud = { - endpoint = "https://hossenfelder.fritz.box:8082", + endpoint = HOSSENFELDER, model = "anthropic/claude-haiku-4.5", - -- Hossenfelder forwards to OpenRouter using its own key from - -- /etc/conf.d/llm-proxy on the LXC; no client-side key needed. temperature = 0.2, }, },