Wayfinder map: native LLM engine — providers, keys, per-surface models #125

Closed
opened 2026-10-23 10:12:15 +02:00 by AlexKucera · 1 comment
Owner

Destination

Museion runs one Hermes profile per LLM surface (e.g. museion-pass1 / museion-pass2 / museion-chat), each carrying its own model + reasoning config, provisioned and seeded from the app. A real Settings page edits per-surface model + provider keys/endpoints (written into profile config) with model dropdowns. ADR-0014 records the multi-profile topology; affected PRD stories are amended.

Notes

  • Swift 6 default-MainActor isolation; SwiftFairy before Swift edits; prototype skill for UI spikes (ref/prototypes/ house pattern).
  • Bench evidence (2026-10-23): prototypes/model-bench/results/final/REPORT.md + harness prototypes/model-bench/bench.py — measured speed/cost/quality across glm-5.3 efforts, flash, GPT-6-Sol ×2, grok-4.7, gemini-4-argon, claude opus/sonnet 5.5. Ground default recommendations there, not vibes.

Settled — do not re-ask:

  1. One Hermes profile per LLM surface; per-surface models via each profile's config (#131, 2026-10-23 — supersedes the chart-time native-engine destination; native had been chosen "A full" before the profile idea + streaming probe landed).
  2. Native direct-HTTP engine is out of scope with a revisit trigger (see Out of scope) — the chunk-timing probe closed streaming as a differentiator: z.ai streams reasoning AND content live (≤15-char chunks, content starts as thinking ends).
  3. Settings writes profile model/key config; keys + endpoints editable in-app (profile config — Keychain not required by this effort).
  4. Reasoning effort exposed per surface for ALL three providers (zai low/high/max · OpenAI low/medium/high/xhigh/max · Anthropic low/medium/high/xhigh/max — one model.reasoning_effort key, hermes clamps per route; #128 amendment, 2026-10-23, supersedes the GLM-only framing). Effort is the dominant cost/latency dial: 20s vs 194s per pass, 7× cost; output budget ≥ 24k for reasoning models (thinking counts inside max_tokens).
  5. Research rail stays hermes-native (chart-time deferral is moot under profiles).
  6. Model-dropdown sourcing (hermes model registry vs provider /models — endpoints in the factsheet) is #128's to decide, not re-asked here.
  • Settings page UI prototype: Variant C — sidebar + detail (System Settings shape); sidebar destinations Content · Pass 1 · Pass 2 · Chat (· Sessions) · Provider Keys; per-surface page = provider/model/effort, Provider Keys page = provider blocks (endpoint, z.ai key-type toggle, masked key, Test Connection). Free-text model entry is load-bearing — #132's seed claude-sonnet-5-5 is not in the registry cache. A's provider block and B's model-as-headline survive inside C. Prototype on main @ 2032534 (ref/prototypes/wf130-settings-ui-prototype.html).

Decisions so far

  • Default model + reasoning effort per surface: claude-sonnet-5-5 seeds all three surfaces (equal wall time to glm-low on passes, 1.1s ttft on chat; sharpest verdicts), reasoning_effort unset (Anthropic adaptive); GLM switch posture = low effort (high/max cost 8.5× wall, 11.9× tokens, no measured quality gain). Provisions write per-surface defaults explicitly (amends #128's copy-from-museion mechanic — museion runs glm-5.3-max); needs an Anthropic key in Settings before the first pass. Corrections: all six provider keys exist on this machine; the chart-time $ figures weren't repo-reproducible (cost now recorded as token multiples — sonnet 3.3× glm-low per pass pair); "P2 cheaper than P1" falsified (P2 = 1.42× P1 wall at same effort).

  • Writing skills per surface profile: per-surface curation (P1 9 · P2 8 · Chat 10 — personas split by surface, fiction-craft/titles-and-hooks structural-only, reader-psychology sentence-surgery-only) with ONE master copy at ~/Library/Application Support/Museion/skills/ symlinked per profile (human's architecture — no drift; symlink loading verified live + in production). Amends #128's same-payload fold; migration swaps copy-era dirs to symlinks only on payload byte-match.

  • Gate + provisioning UX under per-surface profiles: all three profiles provision at gate pass (gate stays binary-only; provisioner ×3 at onPass; #48 failure card names the failing profile); a Chat model change auto-restarts the resident engine in place (existing restart flow, deferred while a turn streams); backup widens to one stamp with three profile subdirs, any-live-skip-all, never the profiles root.

  • Multi-profile engine architecture + ADR-0014: on-demand pass engines (hermes acp -p museion-passN per run, teardown at verdict — model switch = next spawn reads fresh config; chat engine stays resident); provisioning copies museion's model block into fresh pass profiles via config set (create-time inheritance follows the ACTIVE profile, .env never inherits — both probed); Settings writes config via hermes CLI + keys via direct .env edit; model dropdown sources hermes' registry cache (~/.hermes/provider_models_cache.json) + free text; effort dropdowns for all three providers (zai low/high/max · OpenAI low/med/high/xhigh/max · Anthropic low/med/high/xhigh/max — one model.reasoning_effort key, hermes clamps per route). Landed: ADR-0014 + PRD/ADR-0008 amendments on main @ b11dd30.

  • Provider capability factsheet: docs/research/native-llm-providers.md merged to main @ 32f601d (branch research/native-llm-providers, factsheet @ 49a121c). Wire-verified 2026-10-23: reasoning tokens count inside max_tokens (cap ≥24k); OpenAI chat/completions rejects function tools with reasoning_effort (Responses API needed for typed-tool reasoning passes); Anthropic 5.x is thinking adaptive + output_config.effort with forced tool_choice removed (fix-card contract must be prompt-enforced); z.ai streams reasoning AND content live — the flush claim was corrected 2026-10-23 (factsheet @ 49a121c); coding-plan keys are distribution-restricted — standard PAAS keys are the shipped-Museion path. Corrections to charting seed claims: key/endpoint pairing is asymmetric (coding key worked on PAAS today); thinking.type=disabled was accepted on the wire despite the docs.

  • Engine topology: profiles-per-surface, native out of scope: chunk-timing probe falsified the z.ai content-flush claim (both channels stream live; the "flush" was tps arithmetic dividing reasoning-inclusive out_tok by the content window) — streaming was native's last differentiator. One Hermes profile per surface delivers per-surface models with the tool + research rails intact; #126/#128/#129 re-scoped, Keychain dropped.

  • Settings data model + surface inventory: v1 ships 3 surfaces — Pass 1, Pass 2, Chat; Sessions rides Chat's (additive later if a real split appears). Per-surface config IS the profile's model: block (provider, base_url, model, reasoning_effort; budget fixed 24k via extra_body.max_tokens, not a UI control). Keys per-provider in the UI, fan-out written to matching profiles' .env. No app-side settings store — static surface→profile mapping in code; state.json untouched. Migration: Chat adopts museion in place; museion-pass1/museion-pass2 provision fresh with model+key inherited. Glossary: "LLM Surface" in CONTEXT.md.

Not yet specified

  • (empty — the last fog patch, the build slices, graduated 2026-10-26 into Profiles S1–S4, linked in the closure comment; the way to the destination is clear)

Out of scope

  • Native direct-HTTP engine (the chart-time destination, superseded by #131): revisit when distribution without a hermes install becomes a goal, or hermes blocks a mentor feature. The provider factsheet (docs/research/native-llm-providers.md) keeps the wire knowledge for that day.
  • Local/open-weight engines (PRD's Glimmer local candidate) — separate effort.
  • Pi engine swap (ADR-0007 fallback) — untouched.
  • Provider usage/billing dashboards.

[Generated by AI]

## Destination Museion runs **one Hermes profile per LLM surface** (e.g. `museion-pass1` / `museion-pass2` / `museion-chat`), each carrying its own model + reasoning config, provisioned and seeded from the app. A real Settings page edits per-surface model + provider keys/endpoints (written into profile config) with model dropdowns. ADR-0014 records the multi-profile topology; affected PRD stories are amended. ## Notes - Swift 6 default-MainActor isolation; SwiftFairy before Swift edits; prototype skill for UI spikes (ref/prototypes/ house pattern). - Bench evidence (2026-10-23): `prototypes/model-bench/results/final/REPORT.md` + harness `prototypes/model-bench/bench.py` — measured speed/cost/quality across glm-5.3 efforts, flash, GPT-6-Sol ×2, grok-4.7, gemini-4-argon, claude opus/sonnet 5.5. Ground default recommendations there, not vibes. Settled — do not re-ask: 1. **One Hermes profile per LLM surface**; per-surface models via each profile's config (#131, 2026-10-23 — supersedes the chart-time native-engine destination; native had been chosen "A full" before the profile idea + streaming probe landed). 2. **Native direct-HTTP engine is out of scope** with a revisit trigger (see Out of scope) — the chunk-timing probe closed streaming as a differentiator: z.ai streams reasoning AND content live (≤15-char chunks, content starts as thinking ends). 3. Settings writes profile model/key config; keys + endpoints editable in-app (profile config — Keychain not required by this effort). 4. Reasoning effort exposed per surface for ALL three providers (zai low/high/max · OpenAI low/medium/high/xhigh/max · Anthropic low/medium/high/xhigh/max — one `model.reasoning_effort` key, hermes clamps per route; #128 amendment, 2026-10-23, supersedes the GLM-only framing). Effort is the dominant cost/latency dial: 20s vs 194s per pass, 7× cost; output budget ≥ 24k for reasoning models (thinking counts inside max_tokens). 5. Research rail stays hermes-native (chart-time deferral is moot under profiles). 6. Model-dropdown sourcing (hermes model registry vs provider /models — endpoints in the factsheet) is #128's to decide, not re-asked here. - [Settings page UI prototype](https://git.babylondreams.de/AlexKucera/museion/issues/130): **Variant C — sidebar + detail (System Settings shape)**; sidebar destinations Content · Pass 1 · Pass 2 · Chat (· Sessions) · Provider Keys; per-surface page = provider/model/effort, Provider Keys page = provider blocks (endpoint, z.ai key-type toggle, masked key, Test Connection). Free-text model entry is load-bearing — #132's seed `claude-sonnet-5-5` is not in the registry cache. A's provider block and B's model-as-headline survive inside C. Prototype on main @ 2032534 (`ref/prototypes/wf130-settings-ui-prototype.html`). ## Decisions so far - [Default model + reasoning effort per surface](https://git.babylondreams.de/AlexKucera/museion/issues/132): claude-sonnet-5-5 seeds all three surfaces (equal wall time to glm-low on passes, 1.1s ttft on chat; sharpest verdicts), reasoning_effort unset (Anthropic adaptive); GLM switch posture = low effort (high/max cost 8.5× wall, 11.9× tokens, no measured quality gain). Provisions write per-surface defaults explicitly (amends #128's copy-from-museion mechanic — museion runs glm-5.3-max); needs an Anthropic key in Settings before the first pass. Corrections: all six provider keys exist on this machine; the chart-time $ figures weren't repo-reproducible (cost now recorded as token multiples — sonnet 3.3× glm-low per pass pair); "P2 cheaper than P1" falsified (P2 = 1.42× P1 wall at same effort). - [Writing skills per surface profile](https://git.babylondreams.de/AlexKucera/museion/issues/133): per-surface curation (P1 9 · P2 8 · Chat 10 — personas split by surface, fiction-craft/titles-and-hooks structural-only, reader-psychology sentence-surgery-only) with ONE master copy at `~/Library/Application Support/Museion/skills/` symlinked per profile (human's architecture — no drift; symlink loading verified live + in production). Amends #128's same-payload fold; migration swaps copy-era dirs to symlinks only on payload byte-match. - [Gate + provisioning UX under per-surface profiles](https://git.babylondreams.de/AlexKucera/museion/issues/129): all three profiles provision at gate pass (gate stays binary-only; provisioner ×3 at onPass; #48 failure card names the failing profile); a Chat model change auto-restarts the resident engine in place (existing restart flow, deferred while a turn streams); backup widens to one stamp with three profile subdirs, any-live-skip-all, never the profiles root. - [Multi-profile engine architecture + ADR-0014](https://git.babylondreams.de/AlexKucera/museion/issues/128): on-demand pass engines (`hermes acp -p museion-passN` per run, teardown at verdict — model switch = next spawn reads fresh config; chat engine stays resident); provisioning copies museion's model block into fresh pass profiles via `config set` (create-time inheritance follows the ACTIVE profile, `.env` never inherits — both probed); Settings writes config via hermes CLI + keys via direct `.env` edit; model dropdown sources hermes' registry cache (`~/.hermes/provider_models_cache.json`) + free text; **effort dropdowns for all three providers** (zai low/high/max · OpenAI low/med/high/xhigh/max · Anthropic low/med/high/xhigh/max — one `model.reasoning_effort` key, hermes clamps per route). Landed: ADR-0014 + PRD/ADR-0008 amendments on main @ b11dd30. - [Provider capability factsheet](https://git.babylondreams.de/AlexKucera/museion/issues/127): `docs/research/native-llm-providers.md` merged to main @ 32f601d (branch research/native-llm-providers, factsheet @ 49a121c). Wire-verified 2026-10-23: reasoning tokens count inside max_tokens (cap ≥24k); OpenAI chat/completions rejects function tools with reasoning_effort (Responses API needed for typed-tool reasoning passes); Anthropic 5.x is thinking adaptive + output_config.effort with forced tool_choice removed (fix-card contract must be prompt-enforced); z.ai streams reasoning AND content live — the flush claim was corrected 2026-10-23 (factsheet @ 49a121c); coding-plan keys are distribution-restricted — standard PAAS keys are the shipped-Museion path. Corrections to charting seed claims: key/endpoint pairing is asymmetric (coding key worked on PAAS today); thinking.type=disabled was accepted on the wire despite the docs. - [Engine topology: profiles-per-surface, native out of scope](https://git.babylondreams.de/AlexKucera/museion/issues/131): chunk-timing probe falsified the z.ai content-flush claim (both channels stream live; the "flush" was tps arithmetic dividing reasoning-inclusive out_tok by the content window) — streaming was native's last differentiator. One Hermes profile per surface delivers per-surface models with the tool + research rails intact; #126/#128/#129 re-scoped, Keychain dropped. - [Settings data model + surface inventory](https://git.babylondreams.de/AlexKucera/museion/issues/126): v1 ships **3 surfaces — Pass 1, Pass 2, Chat; Sessions rides Chat's** (additive later if a real split appears). Per-surface config IS the profile's `model:` block (provider, base_url, model, reasoning_effort; budget fixed 24k via `extra_body.max_tokens`, not a UI control). Keys per-provider in the UI, fan-out written to matching profiles' `.env`. **No app-side settings store** — static surface→profile mapping in code; `state.json` untouched. Migration: Chat adopts `museion` in place; `museion-pass1`/`museion-pass2` provision fresh with model+key inherited. Glossary: "LLM Surface" in CONTEXT.md. ## Not yet specified - (empty — the last fog patch, the build slices, graduated 2026-10-26 into Profiles S1–S4, linked in the closure comment; the way to the destination is clear) ## Out of scope - Native direct-HTTP engine (the chart-time destination, superseded by #131): revisit when distribution without a hermes install becomes a goal, or hermes blocks a mentor feature. The provider factsheet (`docs/research/native-llm-providers.md`) keeps the wire knowledge for that day. - Local/open-weight engines (PRD's Glimmer local candidate) — separate effort. - Pi engine swap (ADR-0007 fallback) — untouched. - Provider usage/billing dashboards. [Generated by AI]
AlexKucera added the wayfinder:mapwayfinder:map labels 2026-10-23 10:12:15 +02:00
Author
Owner

Map complete — way found

All decision tickets closed (#126 surfaces/data model · #127 provider factsheet · #128 architecture + ADR-0014 · #129 gate/provisioning UX · #131 profiles topology, native out of scope · #132 defaults · #133 skills · #130 settings UI verdict C). Fog exhausted; the way to the destination is charted as four build slices, ready-for-agent:

Closing the map; execution lives in the slices. Out-of-scope rulings (native engine, local weights, Pi swap, billing dashboards) stay recorded in the body with their revisit triggers.

[Generated by AI]

## Map complete — way found All decision tickets closed (#126 surfaces/data model · #127 provider factsheet · #128 architecture + ADR-0014 · #129 gate/provisioning UX · #131 profiles topology, native out of scope · #132 defaults · #133 skills · #130 settings UI verdict C). Fog exhausted; the way to the destination is charted as four build slices, `ready-for-agent`: - [Profiles S1 — Profile registry + provisioning ×3](https://git.babylondreams.de/AlexKucera/museion/issues/134) — frontier, takeable now - [Profiles S2 — Settings page UI (sidebar + detail)](https://git.babylondreams.de/AlexKucera/museion/issues/135) — frontier, takeable now - [Profiles S3 — Settings→profile write path + Test Connection](https://git.babylondreams.de/AlexKucera/museion/issues/136) — blocked by S1 - [Profiles S4 — Per-surface engine lifecycle + model-switch UX](https://git.babylondreams.de/AlexKucera/museion/issues/137) — blocked by S1 + S2 Closing the map; execution lives in the slices. Out-of-scope rulings (native engine, local weights, Pi swap, billing dashboards) stay recorded in the body with their revisit triggers. [Generated by AI]
Sign in to join this conversation.