opencode-fkyah3
Health Warn
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Low visibility — Only 9 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
This tool is a personal research fork of the opencode agent, adapted specifically for Windows compatibility and the DeepSeek API. Its primary focus is demonstrating "Language Anchoring," a systematic method to force LLMs to consistently think and process instructions in a specific language (like Chinese) rather than their default English.
Security Assessment
Overall Risk: Low. The automated code scan analyzed 12 files and found no dangerous patterns, hardcoded secrets, or requests for excessive permissions. As an AI agent framework, it inherently makes network requests to communicate with LLM APIs (like OpenRouter and DeepSeek) and processes your text inputs. However, the base code appears to be standard, safe agent behavior without malicious execution or hidden data collection.
Quality Assessment
The project is extremely new and has very low community visibility, evidenced by only 9 GitHub stars. Despite this, it is actively maintained, with the most recent code pushed today. It uses a permissive and standard MIT license, making it safe for legal integration into other projects. A unique aspect of this tool is its development process: the developer claims that the codebase was almost entirely written by AI (DeepSeek V4 Flash) under human supervision. While this serves as a fascinating demonstration of AI-built software, it means you are ultimately trusting auto-generated code that has not yet been battle-tested by a large community.
Verdict
Safe to use, though the lack of community testing and its AI-generated nature warrant a quick personal review before integrating into critical workflows.
A research fork of opencode demonstrating Language Anchoring — making LLMs think consistently in your language. Verified: 95%+ Chinese thinking compliance.
fkyah3/opencode-fkyah3
DeepSeek 优化 · Windows 适配 · AI 实现
🚀 从零搭建指南(中文) · 简体中文 · 繁體中文
🧠 Language Anchoring — A Systematic Method for LLM Multilingual Adaptation
Key finding: The first active output from an LLM determines the thinking language for the entire session. Reading a language ≠ thinking in it.
| Stage | Compliance | Intervention |
|---|---|---|
| Prompt constraints only (4 language rules) | ~70% | Prompt text changes only |
| + Translate 16 tool descriptions | ~85% | Tool layer language alignment |
| + Translate 50+ source file comments (fresh session) | ~95%+ | Code layer reinforcement |
| + Anchoring instruction (7 lines) | ~100% | Leverages autoregressive inertia |
The anchoring instruction is minimal:
## Language Anchoring (Hard Requirement)
After receiving the user's first message, before executing any action or starting reasoning, you MUST first write a brief summary in the target language describing:
1. What the user is asking you to do
2. What steps you plan to take
3. What information is still missing
This output is your first response — it anchors the thinking language for the entire session.
Related academic work: Contextual Inertia (arXiv 2603.04783), Cognitive Inertia (arXiv 2503.01307) — these study "how to break harmful inertia". Our contribution is the positive utilization of the same mechanism.
📖 Discussion #1 — Language Anchoring RFC
💬 Discussion #2 — AI合作、信任、螺旋进化(中文)
🌐 Discussion #3 — How I Work with AI (English)
About This Fork
This is a personal fork of anomalyco/opencode. All fixes, optimizations, and features are implemented by AI — DeepSeek V4 Flash (thinking mode) / Sisyphus — under human supervision.
The upstream project is excellent. Windows and DeepSeek are not their priority. We handle them ourselves.
Implementation: DeepSeek V4 Flash (thinking mode) / Sisyphus (AI)
Review & direction: fkyah3 (human)
This fork is a live demonstration of what AI-built software looks like.
Seefkyah3_dev/for the full story.
What's Fixed
| Fix | Area |
|---|---|
reasoning_content loss on conversation replay — the root cause of API 400 errors with DeepSeek thinking mode |
Core |
OpenRouter @openrouter/ai-sdk-provider providerOptions key mismatch |
Provider |
| Multi-window crash cascade — added circuit breaker to OMO tool-pair-validator | Stability |
| Per-session log isolation (no more truncated dev.log on restart) | DX |
| Windows CJK encoding — 3-layer GBK/UTF-8 fix for subprocess pipes | Win32 |
| TUI plugin loading — Magic Context sidebar blank due to Zod strict mode | TUI |
MC tool truncation — [truncated] → [tool: N lines, MKB | preview] for compressed context |
MC |
| DeepSeek V4 architecture research → config alignment: 400K context, 90% MC threshold, CSA-aligned compression | V4 |
| Global session pool — all conversations visible from any directory (2.0) | Session |
| Full Chinese system prompt: Sisyphus, keyword-detector, system messages, environment info | i18n |
| Language Anchoring — systematic method for LLM multilingual adaptation (verified with dose-response data) | i18n |
Quick Start
cd packages/opencode
bun run --conditions=browser src/index.ts
Model Configuration Reference
Flash (daily driver — all agents)
"deepseek-v4-flash": {
"limit": { "context": 400000, "output": 393216 },
"options": {
"reasoningEffort": "max",
"thinking": { "type": "enabled" }
},
"interleaved": { "field": "reasoning_content" }
}
reasoningEffort:high(default) ormax. Per DeepSeek docs, agent tools auto-set tomaxanyway.interleaved: Required for DeepSeek thinking mode via@ai-sdk/openai-compatible. Without it,reasoning_contentis not forwarded.thinking: Must be{ type: "enabled" }for reasoning models.
Learn More
| Link | Content |
|---|---|
fkyah3_dev/ |
Fix details, analysis docs, issue tracking |
fkyah3_dev/internal/COMPLETION.md |
Completed work checklist & current state |
| Upstream issue #24104 | reasoning_content root cause discussion |
Upstream
Based on anomalyco/opencode (Apache 2.0). Changes merged periodically.
Crafted by AI. Curated by human. Built for the real world.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found