Files
OmniRoute/docs/i18n/ga/docs/frameworks/OPENCODE.md
Diego Rodrigues de Sa e Souza 8feea123bb feat(docs): mirror every docs/ page in all 65 locales (#14106)
* 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.
2026-09-18 13:16:46 -03:00

12 KiB
Raw Blame History

OpenCode Integration (Gaeilge)

🌐 Languages: 🇺🇸 English · 🇪🇹 am · 🇸🇦 ar · 🇦🇿 az · 🇧🇬 bg · 🇧🇩 bn · 🇨🇿 cs · 🇩🇰 da · 🇩🇪 de · 🇬🇷 el · 🇪🇸 es · 🇪🇪 et · 🇮🇷 fa · 🇫🇮 fi · 🇫🇷 fr · 🇮🇳 gu · 🇳🇬 ha · 🇮🇱 he · 🇮🇳 hi · 🇭🇷 hr · 🇭🇺 hu · 🇦🇲 hy · 🇮🇩 id · 🇳🇬 ig · 🇮🇹 it · 🇯🇵 ja · 🇬🇪 ka · 🇰🇭 km · 🇮🇳 kn · 🇰🇷 ko · 🇱🇹 lt · 🇱🇻 lv · 🇮🇳 ml · 🇮🇳 mr · 🇲🇾 ms · 🇲🇹 mt · 🇲🇲 my · 🇳🇵 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


Stádas: Ar fáil go ginearálta. Lucht léitheoireachta: Oibreoirí atá ag nascadh OpenCode le himscaradh OmniRoute. Foinse na fírinne (scéimre cumraíochta): src/shared/services/opencodeConfig.ts Foinse na fírinne (pacáiste npm): @omniroute/opencode-provider/ (spás oibre infoilsithe)

Is cliant AI gníomhach CLI/deisce é OpenCode. Léann sé a chatalóg soláthraithe ó ~/.config/opencode/opencode.json (nó opencode.jsonc) agus leanann sé an scéimre ag https://opencode.ai/config.json. Cuireann OmniRoute é féin ar fáil do OpenCode mar cheann de na soláthraithe sin — téann gach iarratas trí chomhéadan caighdeánach OmniRoute atá comhoiriúnach le OpenAI, /v1, ionas go mbaineann OpenCode tairbhe go huathoibríoch as ródú Auto-Combo, scoradáin chiorcaid, beartais eochracha, inbhraiteacht, srl.

dhá chonair chomhtháthaithe a dtacaítear leo ann. Roghnaigh ceann amháin — gineann siad an chumraíocht chéanna.


Conair 1 — gineadóir CLI (ní gá npm a shuiteáil)

Molta dúsáideoirí deiridh. Tagann sé le OmniRoute. Scríobhann sé opencode.json san áit chéanna.

# Tar éis OmniRoute a shuiteáil (npm i -g @omniroute/cli nó clón áitiúil)
omniroute config opencode \
  --base-url http://localhost:20128 \
  --api-key "$OMNIROUTE_API_KEY"

Sa chúlra, glaonn an CLI ar mergeOpenCodeConfigText() (src/shared/services/opencodeConfig.ts:104), mar sin coinníonn opencode.json atá ann cheana a sholáthraithe agus a nótaí tráchta eile. Cuirtear iontráil OmniRoute leis nó cuirtear ceann nua ina háit go hadamhach.

An comhad a ghintear (catalóg réamhshocraithe samhlacha):

{
  "$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" },
      },
    },
  },
}

Conair 2 — pacáiste npm @omniroute/opencode-provider

Molta nuair atá tú ag scriptiú na cumraíochta ó Node/TS (píblínte CI, monorepos, sreafaí suiteálaí saincheaptha).

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",
  // Roghnach: sáraigh catalóg na samhlacha a nochtar do OpenCode
  models: ["auto", "claude-opus-4-7", "gpt-5.5"],
  modelLabels: { auto: "Auto-Combo" },
});

writeFileSync("opencode.json", JSON.stringify(config, null, 2));

Chun cumasc neamh-millteach a dhéanamh le comhad atá ann cheana, déan mergeOpenCodeConfigText() ó opencodeConfig.ts a mhacasamhlú nó glaoigh ar an ngineadóir CLI.

Féach ar README an phacáiste chun an API iomlán a fháil.


Cad a dhéanann an t-am rite i ndáiríre

Táirgeann an dá chonair an provider.omniroute.npm: "@ai-sdk/openai-compatible" céanna. Ag am rite, lódálann OpenCode @ai-sdk/openai-compatible (atá ina spleáchas trasdultach de chuid OpenCode cheana féin) agus cumraíonn sé é le baseURL + apiKey. As sin amach:

Comhéadan úsáideora/gníomhaire OpenCode
   → @ai-sdk/openai-compatible
      → HTTP POST {baseURL}/chat/completions          (comhéadan OpenAI OmniRoute)
         → láimhseálaí OmniRoute /v1/chat/completions (open-sse/handlers/chatCore.ts)
            → ródú teaglama / Auto-Combo / riteoir
               → soláthraí réamhtheachtach

Ní dhéanann an breiseán teagmháil riamh le HTTP. Ní dhéanann sé ach cumraíocht a astú.


Réamhshocruithe na catalóige samhlacha

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;

Is féidir leat iad a shárú trí models: [...]. Breiseanna molta:

  • "auto" — nochtann sé ródaire Auto-Combo OmniRoute nach dteastaíonn aon chumraíocht uaidh. Ligeann sé do OpenCode “an tsamhail is fearr atá ar fáil” a roghnú gan an chatalóg a chódú go crua.
  • "<combo-name>" — teaglaim ar bith atá sainithe agat sa deais; réitíonn OmniRoute í go trédhearcach.

Normalú URL

Glacann an cúntóir leis an dá fhoirm agus aschuireann sé /v1 amháin go díreach:

Ionchur Aschur (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

Is é an dí-dhúbailt seo an chúis bhriste is coitianta a fheictear i gcumraíochtaí níos sine. Má tá opencode.json agat ó leagan roimh v3.8.0 a dhíríonn ar /v1/v1/..., rith an gineadóir arís nó glaoigh ar createOmniRouteProvider arís.


Modhanna fíordheimhnithe

Socrú OmniRoute Luach molta apiKey
REQUIRE_API_KEY=false (réamhshocrú go háitiúil) sk_omniroute (ionadchoinneálaí litriúil)
REQUIRE_API_KEY=true Fíoreochair API in aghaidh an úsáideora ó Deais → Eochracha API.

I gcás cliant ar nós Anthropic a sheolann x-api-key + anthropic-version, glacann extractApiKey OmniRoute leis an eochair ó x-api-key freisin. Úsáideann OpenCode comhéadan OpenAI, mar sin seolfaidh sé Authorization: Bearer ${apiKey} i gcónaí — níl aon chás speisialta Anthropic i bhfeidhm anseo.


Fabhtcheartú

Siomptóm Cúis Réiteach
404 ar gach iarratas le URL ina bhfuil /v1/v1/ Cumraíocht as dáta ó bhreiseán réamh-v3.8 a chuir /v1 leis faoi dhó. Athghin trí Chonair 1 nó 2.
401 Invalid API key REQUIRE_API_KEY=true ag OmniRoute agus ní aithnítear an eochair. Cruthaigh an eochair sa deais, nó socraigh REQUIRE_API_KEY=false (go háitiúil amháin) agus úsáid sk_omniroute.
Liosta samhlacha folamh i gcomhéadan OpenCode Tá na 4 shamhlacha réamhshocraithe uile folaithe in infheictheacht soláthraí OmniRoute. Cuir models: ["auto", ...] ar aghaidh chun na cinn atá cumasaithe agat a nochtadh.
OpenCode 500 le cannot read property 'models' Níor ghlac leagan níos sine de OpenCode (< 0.1.x) le models inlíne. Uasghrádaigh OpenCode go leagan a leanann scéimre v1 (opencode.ai/config.json).

Féach freisin