* feat(docs): mirror every docs/ page in all 65 locales Extends the documentation mirrors from the 22-page core set (#13940) to every Markdown page under docs/: 152 sources x 65 locales = 9,880 mirrors (6,208 new), language bars rewritten for the full locale list, state adopted so the blocking drift gate now covers all 152 pages. run-translation.mjs: an oversized block made only of table rows or list items (PROVIDER_REFERENCE.md 244-row table, FREE_TIERS.md 71-item list) is cut at item boundaries and rejoined without a blank line — the single 16-40 KB request outlived the backend socket for verbose scripts. 48 older mirrors whose tables had lost rows were retranslated with --force. * docs(i18n): refresh mirrors for the sources the base changed since the branch cut Section-level retranslation of the 29 docs (and README.md) whose source or mirrors moved on release/v3.8.51 during the run, then state adoption; the drift gate is green again on the merged tree.
17 KiB
OpenCode Integration (မြန်မာ)
🌐 Languages: 🇺🇸 English · 🇪🇹 am · 🇸🇦 ar · 🇦🇿 az · 🇧🇬 bg · 🇧🇩 bn · 🇨🇿 cs · 🇩🇰 da · 🇩🇪 de · 🇬🇷 el · 🇪🇸 es · 🇪🇪 et · 🇮🇷 fa · 🇫🇮 fi · 🇫🇷 fr · 🇮🇪 ga · 🇮🇳 gu · 🇳🇬 ha · 🇮🇱 he · 🇮🇳 hi · 🇭🇷 hr · 🇭🇺 hu · 🇦🇲 hy · 🇮🇩 id · 🇳🇬 ig · 🇮🇹 it · 🇯🇵 ja · 🇬🇪 ka · 🇰🇭 km · 🇮🇳 kn · 🇰🇷 ko · 🇱🇹 lt · 🇱🇻 lv · 🇮🇳 ml · 🇮🇳 mr · 🇲🇾 ms · 🇲🇹 mt · 🇳🇵 ne · 🇳🇱 nl · 🇳🇴 no · 🇮🇳 or · 🇮🇳 pa · 🇵🇭 phi · 🇵🇱 pl · 🇵🇹 pt · 🇧🇷 pt-BR · 🇷🇴 ro · 🇷🇺 ru · 🇱🇰 si · 🇸🇰 sk · 🇸🇮 sl · 🇷🇸 sr · 🇸🇪 sv · 🇰🇪 sw · 🇮🇳 ta · 🇮🇳 te · 🇹🇭 th · 🇹🇷 tr · 🇺🇦 uk-UA · 🇵🇰 ur · 🇺🇿 uz · 🇻🇳 vi · 🇳🇬 yo · 🇨🇳 zh-CN · 🇹🇼 zh-TW
အခြေအနေ: ယေဘုယျအသုံးပြုနိုင်ပါသည်။ ရည်ရွယ်ထားသော စာဖတ်သူများ: OpenCode ကို OmniRoute deployment တစ်ခုနှင့် ချိတ်ဆက်တပ်ဆင်နေသော အော်ပရေတာများ။ အမှန်တရား၏ မူရင်းရင်းမြစ် (config schema):
src/shared/services/opencodeConfig.tsအမှန်တရား၏ မူရင်းရင်းမြစ် (npm package):@omniroute/opencode-provider/(ထုတ်ဝေနိုင်သော workspace)
OpenCode သည် agentic CLI/desktop AI client တစ်ခုဖြစ်သည်။ ၎င်းသည် provider catalog ကို ~/.config/opencode/opencode.json (သို့မဟုတ် opencode.jsonc) မှ ဖတ်ရှုပြီး https://opencode.ai/config.json ရှိ schema ကို လိုက်နာသည်။ OmniRoute သည် မိမိကိုယ်ကို အဆိုပါ provider များအနက် တစ်ခုအဖြစ် OpenCode သို့ ဖော်ပြပေးသည် — request တိုင်းသည် OmniRoute ၏ စံ OpenAI-compatible /v1 မျက်နှာပြင်မှတစ်ဆင့် စီးဆင်းသောကြောင့် OpenCode သည် Auto-Combo routing၊ circuit breaker များ၊ key policy များ၊ observability စသည်တို့၏ အကျိုးကျေးဇူးများကို အလိုအလျောက် ရရှိသည်။
ပံ့ပိုးထားသော integration နည်းလမ်း နှစ်မျိုး ရှိသည်။ တစ်မျိုးကို ရွေးချယ်ပါ — နှစ်မျိုးလုံးသည် တူညီသော config ကို ထုတ်ပေးသည်။
နည်းလမ်း 1 — CLI generator (npm install မလိုအပ်ပါ)
နောက်ဆုံးအသုံးပြုသူများအတွက် အကြံပြုထားသည်။ OmniRoute နှင့်အတူ ပါဝင်သည်။ opencode.json ကို မူလနေရာ၌ပင် ရေးသားသည်။
# OmniRoute ကို ထည့်သွင်းပြီးနောက် (npm i -g @omniroute/cli သို့မဟုတ် local clone)
omniroute config opencode \
--base-url http://localhost:20128 \
--api-key "$OMNIROUTE_API_KEY"
နောက်ကွယ်တွင် CLI သည် mergeOpenCodeConfigText() (src/shared/services/opencodeConfig.ts:104) ကို ခေါ်သုံးသောကြောင့် ရှိပြီးသား opencode.json ထဲရှိ အခြား provider များနှင့် comment များကို ဆက်လက်ထိန်းသိမ်းထားသည်။ OmniRoute entry ကို atomic နည်းဖြင့် ထည့်သွင်း/အစားထိုးသည်။
ရရှိလာသော file (မူလ model catalog):
{
"$schema": "https://opencode.ai/config.json",
"provider": {
"omniroute": {
"npm": "@ai-sdk/openai-compatible",
"name": "OmniRoute",
"options": {
"baseURL": "http://localhost:20128/v1",
"apiKey": "<your-key>",
},
"models": {
"claude-opus-4-5-thinking": { "name": "claude-opus-4-5-thinking" },
"claude-sonnet-4-5-thinking": { "name": "claude-sonnet-4-5-thinking" },
"gemini-3.1-pro-high": { "name": "gemini-3.1-pro-high" },
"gemini-3-flash": { "name": "gemini-3-flash" },
},
},
},
}
နည်းလမ်း 2 — npm package @omniroute/opencode-provider
Node/TS မှ config ကို script ရေးသားထုတ်လုပ်သည့်အခါ အကြံပြုထားသည် (CI pipeline များ၊ monorepo များ၊ စိတ်ကြိုက် installer flow များ)။
npm install --save-dev @omniroute/opencode-provider
import { writeFileSync } from "node:fs";
import { buildOmniRouteOpenCodeConfig } from "@omniroute/opencode-provider";
const config = buildOmniRouteOpenCodeConfig({
baseURL: "http://localhost:20128",
apiKey: process.env.OMNIROUTE_API_KEY ?? "sk_omniroute",
// ရွေးချယ်နိုင်သည်- OpenCode သို့ ဖော်ပြပေးသည့် model catalog ကို အစားထိုးသတ်မှတ်ရန်
models: ["auto", "claude-opus-4-7", "gpt-5.5"],
modelLabels: { auto: "Auto-Combo" },
});
writeFileSync("opencode.json", JSON.stringify(config, null, 2));
ရှိပြီးသား file နှင့် non-destructive merge ပြုလုပ်ရန် opencodeConfig.ts မှ mergeOpenCodeConfigText() ကို ပုံတူကူးယူအကောင်အထည်ဖော်ပါ သို့မဟုတ် CLI generator ကို ခေါ်သုံးပါ။
API အပြည့်အစုံအတွက် package README ကို ကြည့်ပါ။
Runtime က အမှန်တကယ် လုပ်ဆောင်ပုံ
နည်းလမ်းနှစ်မျိုးလုံးသည် တူညီသော provider.omniroute.npm: "@ai-sdk/openai-compatible" ကို ထုတ်ပေးသည်။ Runtime တွင် OpenCode သည် @ai-sdk/openai-compatible (OpenCode ၏ transitive dependency အဖြစ် ပါဝင်ပြီးသားဖြစ်သည်) ကို load လုပ်ပြီး baseURL + apiKey ဖြင့် configure လုပ်သည်။ ထို့နောက်-
OpenCode UI/agent
→ @ai-sdk/openai-compatible
→ HTTP POST {baseURL}/chat/completions (OmniRoute OpenAI မျက်နှာပြင်)
→ OmniRoute /v1/chat/completions handler (open-sse/handlers/chatCore.ts)
→ combo routing / Auto-Combo / executor
→ upstream provider
Plugin သည် HTTP ကို လုံးဝ မထိတွေ့ပါ။ ၎င်းသည် configuration ကိုသာ ထုတ်ပေးသည်။
မော်ဒယ်ကတ်တလောက် မူလသတ်မှတ်ချက်များ
export const OMNIROUTE_DEFAULT_OPENCODE_MODELS = [
"claude-opus-4-5-thinking",
"claude-sonnet-4-5-thinking",
"gemini-3.1-pro-high",
"gemini-3-flash",
] as const;
models: [...] မှတစ်ဆင့် မူလသတ်မှတ်ချက်များကို ပြောင်းလဲနိုင်သည်။ ထပ်ထည့်ရန် အကြံပြုထားသည့်အရာများမှာ-
"auto"— OmniRoute ၏ အပြင်အဆင်သတ်မှတ်ရန်မလိုသော Auto-Combo router ကို ဖော်ပြပေးသည်။ ကတ်တလောက်ကို သင်ကိုယ်တိုင် အတိအကျ သတ်မှတ်စရာမလိုဘဲ OpenCode အနေဖြင့် "ရရှိနိုင်သည့် အကောင်းဆုံးမော်ဒယ်" ကို ရွေးချယ်နိုင်စေသည်။"<combo-name>"— dashboard တွင် သင်သတ်မှတ်ထားသည့် မည်သည့် combo မဆိုဖြစ်ပြီး OmniRoute က ၎င်းကို နောက်ကွယ်တွင် အလိုအလျောက် ဖြေရှင်းပေးသည်။
URL ပုံစံစံညွှန်းသတ်မှတ်ခြင်း
helper သည် ပုံစံနှစ်မျိုးလုံးကို လက်ခံပြီး /v1 တစ်ခုတည်းသာ ထုတ်ပေးသည်-
| ထည့်သွင်းချက် | ထုတ်ပေးချက် (options.baseURL) |
|---|---|
http://localhost:20128 |
http://localhost:20128/v1 |
http://localhost:20128/ |
http://localhost:20128/v1 |
http://localhost:20128/v1 |
http://localhost:20128/v1 |
http://localhost:20128/v1/// |
http://localhost:20128/v1 |
ဤထပ်နေမှုဖယ်ရှားခြင်းသည် config အဟောင်းများတွင် တွေ့ရသည့် အဖြစ်အများဆုံး ပျက်စီးရသည့်အကြောင်းရင်း ဖြစ်သည်။ /v1/v1/... ကို ညွှန်ပြနေသော v3.8.0 မတိုင်မီက opencode.json ရှိပါက generator ကို ပြန်လည်လုပ်ဆောင်ပါ သို့မဟုတ် createOmniRouteProvider ကို ထပ်မံခေါ်ပါ။
အထောက်အထားစစ်ဆေးခြင်း နည်းလမ်းများ
| OmniRoute ဆက်တင် | အကြံပြုထားသည့် apiKey တန်ဖိုး |
|---|---|
REQUIRE_API_KEY=false (local အတွက် မူလသတ်မှတ်ချက်) |
sk_omniroute (ပုံသေ placeholder စာသား) |
REQUIRE_API_KEY=true |
Dashboard → API Keys မှ အသုံးပြုသူတစ်ဦးချင်းစီအတွက် တကယ့် API key တစ်ခု။ |
x-api-key + anthropic-version ကို ပေးပို့သည့် Anthropic ပုံစံ client များအတွက် OmniRoute ၏ extractApiKey သည် x-api-key မှ key ကိုလည်း အသိအမှတ်ပြုသည်။ OpenCode သည် OpenAI မျက်နှာပြင်ကို အသုံးပြုသောကြောင့် Authorization: Bearer ${apiKey} ကို အမြဲပေးပို့မည်ဖြစ်ပြီး ဤနေရာတွင် Anthropic သီးသန့်ကိုင်တွယ်မှု မသက်ဆိုင်ပါ။
ပြဿနာဖြေရှင်းခြင်း
| လက္ခဏာ | အကြောင်းရင်း | ဖြေရှင်းနည်း |
|---|---|---|
/v1/v1/ ပါဝင်သော URL ဖြင့် တောင်းဆိုမှုတိုင်းတွင် 404 ဖြစ်ခြင်း |
/v1 ကို နှစ်ကြိမ်နောက်ဆက်တွဲထည့်ထားသည့် v3.8 မတိုင်မီ plugin မှ config အဟောင်း။ |
လမ်းကြောင်း 1 သို့မဟုတ် 2 မှတစ်ဆင့် ပြန်လည်ဖန်တီးပါ။ |
401 Invalid API key |
OmniRoute တွင် REQUIRE_API_KEY=true ဖြစ်ပြီး key ကို မသိရှိပါ။ |
dashboard တွင် key ကို ဖန်တီးပါ၊ သို့မဟုတ် REQUIRE_API_KEY=false (local အတွက်သာ) ဟု သတ်မှတ်ပြီး sk_omniroute ကို အသုံးပြုပါ။ |
| OpenCode UI တွင် မော်ဒယ်စာရင်း ဗလာဖြစ်နေခြင်း | မူလမော်ဒယ် 4 ခုစလုံးကို OmniRoute ၏ provider visibility တွင် ဝှက်ထားသည်။ | သင်ဖွင့်ထားသည့် မော်ဒယ်များကို ဖော်ပြရန် models: ["auto", ...] ကို ပေးပါ။ |
cannot read property 'models' ပါသော OpenCode 500 |
OpenCode အဟောင်း (< 0.1.x) သည် inline models ကို လက်မခံခဲ့ပါ။ |
v1 schema (opencode.ai/config.json) ကို လိုက်နာသည့် OpenCode ဗားရှင်းသို့ အဆင့်မြှင့်ပါ။ |
ထပ်မံကြည့်ရှုရန်
- API ကိုးကားချက် — OmniRoute REST မျက်နှာပြင် အပြည့်အစုံ
- Auto-Combo —
model: "auto"၏ အဓိပ္ပာယ် @omniroute/opencode-providerREADME- အရင်းအမြစ်-
src/shared/services/opencodeConfig.ts,src/lib/cli-helper/config-generator/opencode.ts,@omniroute/opencode-provider/src/index.ts