A lean terminal coding agent forked from opencode and rebuilt around China-focused model routing, smart compaction, sliding output budgets, RMB cost tracking, LSP diagnostics, and Playwright browser testing.
Subagents pick GLM, Kimi, DeepSeek, or GLM-5V by job type.
Profile judge + active-task extraction + raw recent tail.
Model-aware max tokens with overflow-safe triggers.
OpenChinaCode keeps the terminal-first opencode workflow, then narrows the default model surface to GLM, Kimi, and DeepSeek with model-aware request transforms, task routing, compaction, testing, and RMB cost display.
Architecture, complex planning, heavy refactors, and compaction routes favor GLM-5.2 variants for deep reasoning.
Implementation, review, and common coding subagents use fast Kimi K2.7 routes when the task fits.
Debug and quick exploration routes are tuned for DeepSeek speed, with sliding max-token behavior.
Plan, architecture, refactor, review, implement, explore, debug, test_fix, summarize, compaction, and visual_check each have quick/medium/complex routes.
Manual or automatic compaction keeps a general summary, extracts the active task at higher granularity, and can retain raw recent turns with /compact keep N.
/auto-maxtokens uses official model windows, task signals, and overflow checks so complex coding turns can request large outputs without needless compression.
GLM, Kimi, and DeepSeek use direct official OpenAI-compatible APIs with provider-specific max-token, reasoning, sampling, and tool-call behavior.
/test-mcp, /browser-check, and /integration-test wire Playwright MCP and test reports into the agent workflow.
The TUI shows RMB cost, model-aware context usage, route details, LSP diagnostics, and compaction debug stages so behavior is inspectable.