diff --git a/docs/en/guides/01-configuration.md b/docs/en/guides/01-configuration.md index 9395362d2..7d746eea8 100644 --- a/docs/en/guides/01-configuration.md +++ b/docs/en/guides/01-configuration.md @@ -752,6 +752,7 @@ For OpenAI-compatible providers (e.g., OpenRouter), you can add custom HTTP head Common use cases: - **OpenRouter**: Requires `HTTP-Referer` and `X-Title` to identify your application - **Kimi Coding**: Override or extend the default subscription headers when you need a custom user agent +- **OpenCode Go** (`https://opencode.ai/zen/go/v1`): Requests without `x-opencode-session` fail with HTTP 400 `MissingSessionID`. Set a fixed id, e.g. `"extra_headers": {"x-opencode-session": "openviking-"}`. A fixed id works; OpenCode Go only uses it for routing and prompt-cache hints - **Custom proxies**: Add authentication or tracing headers - **API gateways**: Add version or routing identifiers diff --git a/docs/zh/guides/01-configuration.md b/docs/zh/guides/01-configuration.md index a59888154..d70df743d 100644 --- a/docs/zh/guides/01-configuration.md +++ b/docs/zh/guides/01-configuration.md @@ -720,6 +720,7 @@ LiteLLM 的 Bedrock bearer-token API-key 鉴权,请设置 `forward_api_key=tru 常见使用场景: - **OpenRouter**: 需要 `HTTP-Referer` 和 `X-Title` 来标识应用 - **Kimi Coding**: 需要自定义 user agent 或追加订阅请求头时可以在这里覆盖 +- **OpenCode Go**(`https://opencode.ai/zen/go/v1`): 请求不带 `x-opencode-session` 会返回 HTTP 400 `MissingSessionID`。配置一个固定值即可,例如 `"extra_headers": {"x-opencode-session": "openviking-"}`。OpenCode Go 只用这个 id 做路由和 prompt cache 优化,固定值不影响使用 - **自定义代理**: 添加认证头或追踪头 - **API 网关**: 添加版本或路由标识