Auto-translate: add support for OpenCode Go (OpenAI-compatible, requires custom "x-opencode-session" header)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by locating the auto-translate engine implementations — the existing ChatGPT / OpenAI-compatible engine that already parses OpenAI-shaped responses — and the engine picker plus the settings model where the API key and endpoint URL are persisted. Reproduce the HTTP 400 by pointing that engine at https://opencode.ai/inference/go/openai/v1/chat/completions with an oc_sk_ key, then confirm the /v1/models list loads without auth. The cheapest path is the issue's option 2: a free-text "extra headers" field on the generic engine, appended to the outgoing request, with a generated x-opencode-session value saved in settings. Done looks like: any engine can send configured headers, the session id survives a restart, and a translation round-trip against the OpenCode Go endpoint succeeds.
索引モデルが issue の本文から書いたものです。
説明
Description
OpenCode Go is a low-cost subscription from OpenCode giving access to a curated set of strong open models (GLM-5.3(-Flash), DeepSeek V4, Kimi K3, MiniMax, Qwen, etc.) via standard OpenAI-compatible endpoints. It would work as an auto-translate provider, but requests fail because of one required custom HTTP header that Subtitle Edit cannot send.
Endpoint
- Chat Completions:
https://opencode.ai/inference/go/openai/v1/chat/completions - Model list (no auth):
https://opencode.ai/inference/go/v1/models - Auth:
Authorization: Bearer <key>(keys look likeoc_sk_..., from the Console)
The blocker
OpenCode Go requires a stable session id header on every request:
x-opencode-session: <stable id, e.g. a persisted GUID>
Without it the gateway answers HTTP 400:
{
"type": "error",
"error": {
"type": "MissingSessionID",
"message": "Request is missing x-opencode-session and cannot be routed efficiently."
}
}
Subtitle Edit's auto-translate engines cannot send custom HTTP headers, so the request fails even with URL, key and model configured correctly. With the header present, the endpoint returns a normal OpenAI-shaped response that SE's ChatGPT / OpenAI-compatible engines already parse fine.
Feature request
Any of these would enable it (in order of preference):
1. A dedicated "OpenCode Go" engine — fixed URL, API key field, model dropdown from /v1/models, and automatic x-opencode-session with a generated id persisted in settings.
2. Optional extra HTTP headers on the generic OpenAI-compatible / ChatGPT engine (one Name: value per line). Useful for other gateways requiring tenant/project headers too.
3. Minimal: send a generated x-opencode-session automatically from the OpenAI-compatible engine when the configured URL points at opencode.ai.
Docs: https://opencode.ai/docs/console/go/ · https://opencode.ai/docs/console/harnesses/
- 主要言語
- C#
- スター
- 15.1k
- フォーク
- 1.4k
- 平均マージ
- 1時間 58分
- マージ済み PR(30日)
- 564
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
SubtitleEdit/subtitleedit のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
SubtitleEdit/subtitleedit#17247 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
SubtitleEdit/subtitleedit#16699 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
SubtitleEdit/subtitleedit#16374 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
SubtitleEdit/subtitleedit#14510 · コメント 3 件 · リアクション 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 4/5 3〜5日 初心者へのやさしさ 44/100
SubtitleEdit/subtitleedit#17244 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
SubtitleEdit/subtitleedit の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
メンテナーはふだん 1 日以内に返信
-
Restore test cleanup fails on Windows when restored files are read-only対応中かも @JamBalaya56562 が今日担当しました。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
duplicati/duplicati#8046 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
メンテナーはふだん 1 日以内に返信
-
Bundles Documentation
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
pyrevitlabs/pyRevit#4285 ·
メンテナーはふだん 1 日以内に返信
-
customer-reported
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
メンテナーはふだん 2 日以内に返信