opengrok README

The project's README from github.com/OnlyTerp/opengrok. As one markdown file: README.md.

open·grok — run any model in Grok Bot: pick a model, wire map applies, verified hop, survives updates. keys stay on your machine. now with the LiquidGlass Observatory.

setup license evidence verify deps platform

Pick a model per agent. Save. It talks native and survives Grok Bot updates.
Keys never leave your machine. Every wire claim in this repo is probe-verified, not vibed.


the LiquidGlass Observatory — swap any agent's model mid-chat, verified hops, live telemetry per bot, context guardian

✨ The LiquidGlass Observatory

The old picker was a dropdown. This is the deck it grew into — a frosted-glass mission-control panel that lives inside the Grok Bot window itself:

⚡ Quick start

What this repo is — and is not. opengrok is a config sidecar for an existing Grok Bot install: it writes model bindings, wire maps, and a health doctor next to your Grok Bot. It does not host or emulate Grok Bot, does not control your machine, and does not ship auth shims — your Grok Bot (desktop + optional cloud computer) stays exactly what it is; we only tell it which model to talk to. A "hop" here simply means any OpenAI-compatible base URL (the "OpenAI-compatible base URL" you'd paste in other tools).

Prerequisites: a working Grok Bot install (desktop app), Python 3.9+, Node 18+ (for the picker/maps), and API keys for any provider you bind.

git clone https://github.com/OnlyTerp/opengrok
cd opengrok
python setup.py

That's the whole install: it detects your Grok Bot install and live services, adopts existing bindings or asks 3 questions, writes its config, baselines your machine, and opens the picker. Then:

  1. pick a model for each agent in the dropdown
  2. test it live (one click, real request)
  3. save — done
python tools/doctor.py        # anytime: is everything still healthy?
python tools/qa.py            # repo self-check: leaks, refs, tests

🤖 What it gives each model

Dropping a foreign model into Grok Bot usually "works" and feels off — slower, dumber, token-hungry. That's harness mismatch: the model was RL-trained on its own harness's wire shape, and gets a generic prompt shape plus wrong reasoning knobs. opengrok fixes the wire:

Model family What goes wrong vanilla What opengrok does
Grok (xAI) effort knob is xhigh, not max; fast has no field literal token mapping, always-on reasoning documented
GLM (Zhipu) thinks by default — silence is expensive; max is real verified token table + true off-switch via thinking:disabled
Claude thinking is owned by the auth shim; body-painting it 400s shim-owned thinking, effort passes clean
Gemini "fast" was decorative — the knob is the slug, not a field fast lane rerouting, measured 1.5s → 0.9s first token
DeepSeek thinking lives in the model slug, not the body slug-owns-thinking mapping
local models context/recovery edges dedicated route, fail-closed

Every row of that table is backed by a capture in wire-captures/ (see glm-5.3-flash for the full ladder — bare request thinks by default, disabled really switches it off, max is a real token).

🧩 How it fits together

 Grok Bot agent
      │  modelId + parameters (thinking/effort/fast)
      ▼
 provider-maps ──► per-provider wire truth (verified, versioned, tested)
      │
      ▼
 upstream (xAI / Zhipu / Anthropic / Google / DeepSeek / local llama.cpp)

Two contracts, one story:

Cloud agents need one more step. Stock Grok Bot cloud hosts do not read model-bindings.json — a saved binding is ignored until you install the binding consumer into the host. tools/apply-box-patch.py does that (anchored, idempotent, backs up first), and tools/file-relay.py is the box-side file relay the picker pushes bindings to. See CLOUD-HOST for the full local → push → patch → bounce → verify flow.

🛡️ Update-proof by design

Grok Bot updates silently rewrite its bundle. Instead of hoping:

📚 The laws

Hard-won rules this repo encodes — each one earned by a real failure:

🧪 Testing (how we know it's true)

node tools/test-provider-maps.cjs       # 23/23 — Contract A
node tools/test-provider-maps-hop.cjs   #  6/6 — Contract B
python tools/qa.py                      # leak scan, ref integrity, suites

CI runs all three on every push and PR. The QA tool is itself negative-control-tested: plant a fake key or break a file and it fails loudly — a green that can't fail is decoration.

➕ Adding a provider

python tools/wire-probe.py --base https://api.example.com/v1 --model their-model --key-env THEIR_API_KEY

Run it, paste the verdict into a PR with the capture attached. CONTRIBUTING.md has the contract — no capture, no merge.

🧠 Codex Everywhere

Codex Everywhere is configured in OpenClaw as the OpenAI Responses API (openai-responses), while Grok Bot speaks Chat Completions. The repository ships a local, dependency-free bridge for this protocol boundary:

python3 tools/codex-everywhere-bridge.py \
  --api-key-env CE_API_KEY --port 18795

Provide CE_API_KEY through an OS-managed secret environment; never put it in model-bindings.json. Bind a CE model to the bridge with hopBaseUrl: "http://127.0.0.1:18795/v1" and the exact model ID, for example gpt-5.6-terra. The bridge converts /v1/chat/completions into /v1/responses, translates common tool, reasoning, and budget fields, and converts JSON/SSE Responses replies back to Chat Completions. See docs/CODEX-EVERYWHERE.md for the complete setup and the current compatibility boundary.

🎙️ Voice assistant (voice/)

A full local realtime voice assistant built on the same wire-truth philosophy:

Browser panel UI, zero native audio deps, all lanes localhost-only. Setup is a guided walkthrough (ElevenLabs key + Codex CLI login + Grok CLI login), with a doctor that tells you exactly what's missing:

node voice/doctor.js                      # pre-flight check
voice\scripts\start-voice.ps1             # start everything, open the panel

See voice/README.md · voice/SETUP.md.

🗺️ Status


not farming you, arming you.

opengrok (OnlyTerp/opengrok)

Searching Database…

这是什么?opengrok 让你在现有的 Grok Bot 桌面安装中运行其他 LLM(Claude、GLM、Qwen、Gemini、DeepSeek、本地模型),并提供基于证据的线协议映射,让每个模型获得正确的请求格式,而不是通用的提示词。
这是它自己的应用,还是接入 Grok Bot 使用的?它是一个配置伴生工具,不是独立应用:它把模型绑定和线协议映射写到现有 Grok Bot 安装旁边,告诉它该连接哪个模型,本身不托管也不模拟 Grok Bot。
怎么让它跑起来?运行安装器:它会检测你的 Grok Bot 安装和正在运行的服务,采用现有绑定或询问三个设置问题,写入配置和机器基线,然后打开模型选择器,让你为每个智能体挑选、实时测试并保存模型。
安装之前需要什么?一个可正常工作的 Grok Bot 桌面安装、Python 3.9+、供选择器和映射使用的 Node 18+,以及你打算绑定的模型服务商的 API 密钥。
在云版 Grok Bot 主机上模型绑定的表现一样吗?不一样——原版云 Grok Bot 主机会忽略已保存的绑定,除非你运行 box-patch 工具把绑定消费端安装到主机中;在那里必须走本地 → 推送 → 打补丁 → 重启 → 验证的流程。
我的服务商 API 密钥会去哪里?它们只留在你的机器上;opengrok 绝不会把你的密钥传出本机或写入已提交的配置。
LiquidGlass Observatory 是什么?它是 Grok Bot 内置的毛玻璃控制面板,让你在聊天中途无需重启即可切换模型、查看每次切换的已验证跳转证明、监控每个机器人的遥测数据(吞吐量、TTFT、token 流量、缓存命中率),并在 28 个机器人上跟踪上下文窗口守护条。
为什么不能直接把模型的 API 接到 Grok Bot 上?每个模型家族都是在自己运行框架的线协议格式(reasoning-effort 字段、思考开关、模型命名约定)上通过强化学习训练出来的。直接硬接入会导致框架不匹配——表面「能用」,但运行更慢、表现更差。opengrok 的服务商映射会修正每个模型家族的确切线协议字段,并辅以捕获的探测证据。
它包含语音助手吗?有——voice/ 文件夹里有一套仅限 localhost 的本地实时语音栈:流式语音转文字、OpenAI 实时大脑,以及支持插话的 ElevenLabs 文字转语音,通过引导式流程完成设置。
它如何应对 Grok Bot 的静默更新?doctor.py 在首次设置时为你的机器建立基线,并在更新后重新检查文件、服务和缓存,准确报告哪些内容发生了漂移;--quiet 模式在没有变化时保持静默,适合配合 cron 使用。
Creator
OnlyTerp
Size
5.6 MB
Stars
489
Updated
CommitSep 22
Age
1mo
Commits · 90 Days