Skip to content

feat(systemone): support local LM Studio and Ollama decision endpoints - #4

Merged
overbit merged 6 commits into
mainfrom
feat/local-systemone-endpoints
Oct 25, 2026
Merged

overbit merged 6 commits into
mainfrom
feat/local-systemone-endpoints

Conversation

@overbit

@overbit overbit commented Oct 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

Add native local System One inference to OpenCode V2's fast-JEV compaction plugin.

  • New backend: "systemone" for LM Studio 0.4.26+, Ollama 0.35+, and compatible POST /v1/systemone servers.
  • One shared state and multiple noul retention decisions per request; split by 64 questions and a conservative 60 KiB UTF-8 JSON limit.
  • Configurable server URL, required local model identifier, and optional local/proxy bearer token. Never forwards the hosted TYPESAFE_API_KEY.
  • Conservative System One state/request budgets, with a smaller quick-start budget for Ollama tev1:0.8b.
  • Preserves existing hosted TypeSafe and legacy LM Studio chat-completions integrations.
  • Tests for LM Studio/Ollama URL resolution, batching, parsing, missing/out-of-range probabilities, partial failures, no-key access, authentication, fail-open behavior, and the V2 compaction hook.
  • Updated README and GitHub Pages quick starts.

Usage

LM Studio

{
  "plugins": [{
    "package": "github:overbit/fast-jev-compaction-opencode",
    "options": {
      "backend": "systemone",
      "localModel": "YOUR_LOADED_DECISION_MODEL_ID"
    }
  }]
}

Ollama

ollama pull tev1:0.8b
{
  "plugins": [{
    "package": "github:overbit/fast-jev-compaction-opencode",
    "options": {
      "backend": "systemone",
      "localBaseUrl": "http://127.0.0.1:11434/v1",
      "localModel": "tev1:0.8b",
      "maxStateTokens": 1200,
      "maxRequestTokens": 1800
    }
  }]
}

Verification

  • npm run typecheck
  • npm test (including plugin and static site checks)
  • npm run compile
  • Packaged server/TUI plugin load smoke test
  • GitHub Actions CI green on the PR head
  • Live inference against a user's running LM Studio/Ollama (CI does not have either model server)

This preserves the V2 limitation that the hook can return a deterministic summary string but not replace structured messages. No third-party dependency added.

Original design: tamaratran/fast-jev-compaction.

@overbit
overbit marked this pull request as ready for review October 25, 2026 08:16
@overbit
overbit merged commit 2ad02b5 into main Oct 25, 2026
3 checks passed
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.

1 participant