rea
morluto
Reverse engineer anything with agents, from app behavior down to native binaries.
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:orfeomorello/dsh-localforge
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
A high-performance, MIT-licensed adapter that connects DeepSeek Harness (
dsh) to local LLM servers — primarily LM Studio, but also any other OpenAI-compatible or Anthropic-compatible endpoint (Ollama, vLLM, llama.cpp's HTTP server, text-generation-inference, etc.).
Three other LM Studio plugins for dsh exist (and we read all of them
carefully — see Inspirations and the
Comparison). LocalForge is the one that adds the
things missing from every other adapter:
/v1/models + native /api/v0/models fallback,
with TTL and explicit invalidation. The other plugins re-probe the server
on every resolveModel.POST /api/v0/models/{id}/load) and poll until
ready..pdf files and local
.pdf / .png / .jpg / .jpeg / .webp / .gif files or folders,
forwarding them directly to LM Studio Vision models as image_url /
image base64 blocks without requiring external Python setup in the chat.fallback: [primary, secondary]. If the primary
model returns a recoverable error, the next one is tried automatically.code, chat, creative, precise for sane
defaults that you can override per request./metrics with TTFT, TPS, queue depth, error
rates, and cache hits./metrics up gauge surfaces the state./v1/messages, useful for Claude-style system prompts and tool calls.strict + noUncheckedIndexedAccess, full
test coverage, GitHub Actions CI.dsh) with the web profile enabled.1234) is the most-tested target; any OpenAI- or
Anthropic-compatible server works.github:orfeomorello/dsh-localforge#main and install it.dsh web.The repository installer mounts community plugins immediately. This
repository also includes the compiled lib/ runtime because the repository
plugin manager imports that entrypoint directly; GitHub's installer does not
build TypeScript source for it. For a bundle-style installation from a
terminal instead, use:
dsh plugin --profile web add github:orfeomorello/dsh-localforge#main
dsh web --dump-config # verify the dsh-localforge bundle layer
# Restart dsh web after installing the bundle
In the model picker at the top of the page you'll now see
LocalForge as a provider; pick any model LM Studio has loaded. If the
UI still reports failed to import, capture the complete browser console
error or the dsh web terminal diagnostic: the short UI message does not
expose the underlying module-resolution error.
Minimal ~/.dsh/settings.yaml section:
llm-localforge:
defaultConnection:
baseURL: http://localhost:1234/v1
models:
- id: qwen/qwen3-8b
preset: code
fallback:
- qwen/qwen3-4b
- llama-3.1-8b
That's it. Point dsh at any conversation, select "LocalForge" as the provider, and traffic flows to LM Studio. Your DeepSeek API balance is untouched.
Unlike LM Studio's desktop GUI (which parses attached PDFs client-side before
sending the prompt), LM Studio's HTTP server endpoints (/v1/chat/completions
and /v1/messages) only accept text and base64-encoded images. Furthermore,
DeepSeek Harness converts uploaded files into read-only disk handles
([File "doc.pdf" (...): verbatim read-only copy saved at "/path/to/doc.pdf"]).
LocalForge bridges both gaps automatically:
resolveModel and request serialization):
Both localforge and localforge-anthropic advertise
inputModalities: ['text', 'image'] unless LM Studio reports the model as
text-only (type: 'llm') or you set vision: false. The same capability
gate decides whether image blocks are attached to the wire request, so a
text-only model never receives image_url / image parts..pdf
in dsh or reference a .pdf path on disk, LocalForge extracts selectable
page text and embedded/scanned page images (for Vision OCR on scanned
PDFs) and attaches them directly to the wire request..png, .jpg, .jpeg,
.webp, or .gif files — or a local folder containing PDFs and images —
automatically attaches their extracted text and base64 Vision blocks so the
model can read them immediately without trying to install Python packages.localforge_read_document tool: when you just ask the model to read a folder, it can call this tool to get PDF text and Vision images directly instead of using bash or pip install.See docs/CONFIGURATION.md for the full reference (every section, every field, every default).
See docs/ARCHITECTURE.md for the design notes — the per-request resolver trick, the dual-endpoint discovery, the SSE parsing, the Prometheus metric set, and the testing strategy.
LocalForge is a clean-room reimplementation. We read three existing plugins to learn the patterns, then wrote everything from scratch with our own license. The inspirations are:
No code was copied. See docs/COMPARISON.md for the full feature-by-feature matrix.
MIT © 2026 The LocalForge authors.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: deepseek、ollama、vllm、deepseek-harness。