Перейти к содержимому

ADR-0026 — Classifier on OpenRouter (not local Ollama) until Mac Studio lands

Status: Accepted Date: 2026-05-01 Supersedes: §5 of docs/superpowers/specs/2026-05-01-project-chat-agent-multi-agent-addendum.md Related: ADR-0023 (local AI infra plan)

Addendum §5 mandated that the OIYNUP chat-agent classifier always run on a local Ollama Gemma model, regardless of agent tier, so that raw chat content never enters an API context window. The constraint was written under the assumption Mac Studio (the local-Ollama host) was imminent.

Reality at 2026-05-01:

  • Mac Studio is not yet ordered/landed. No local Ollama host runs reliably enough for production traffic.
  • OpenClaw runtime already operates without local Ollama; classifier has been the only blocker to fully removing the dependency.
  • OIYNUP team chat is tier: api per agent.yaml. Substantive content (proactive_eval prompts, persona, full SOT/ADR canon) already flows to OpenRouter. Marginal exposure of classifier-only message text is ~0.
  • gpt-5.4-mini on OpenRouter at $0.15/M input is ~$0.015/day at typical OIYNUP volume — cost is a non-issue.

The classifier (classify_with_llm) runs on OpenRouter (openai/gpt-5.4-mini by default) until Mac Studio is in production. The vision describer (describe_image) likewise runs on OpenRouter (openai/gpt-5.4-nano).

Reasoning paths (responder, proactive_eval, research_scan) run on openai/gpt-5.5 per the same spec.

  • Privacy: Raw OIYNUP team-chat content for classification flows through OpenRouter. This is tier: api data — acceptable per Airlock policy.
  • Cost: ~$0.015/day classifier + ~$0.0004/day vision. Trivial.
  • Reliability: Eliminates a hard dependency on local Ollama for the chat agent. One fewer thing that can break.
  • Future revert path: When Mac Studio lands and local Ollama is stable, flip model.classifier and model.vision in agent.yaml to local-prefixed slugs (e.g. local:gemma4:26b). Wrap LLM construction in a small router that picks the local Ollama HTTP path for local: slugs. File a follow-up ADR.
  • gpt-5.4-nano-only classifier — rejected. Nano is documented to be weaker at strict-JSON-output discipline (per OpenAI/OpenRouter model card comparisons); cost saving (~$0.005/day vs mini) is not worth the risk of silently bad classifications. Spot-check before promoting nano if ever reconsidered.
  • Defer the swap until Mac Studio lands — rejected. Indefinite hold blocks gpt-5.5 swap on the reasoning paths (which is the primary lift this session) and keeps a non-functional Ollama codepath in production.
  • Keep classifier on Ollama, swap reasoning paths only — rejected. Mac Studio not present means no Ollama host means classifier silently breaks message intake. Worse than the current state.
  • Spec: docs/superpowers/specs/2026-05-01-gpt55-and-web-search-design.md
  • Plan: docs/superpowers/plans/2026-05-01-gpt55-and-web-search.md
  • Addendum being superseded: docs/superpowers/specs/2026-05-01-project-chat-agent-multi-agent-addendum.md §5
  • ADR-0023: Local AI infrastructure plan (still aspirational)