[FEATURE] Add custom headers support (x-opencode-session) for OpenCode Go compatibility
Is your feature request related to a problem? Please describe.
OpenCode Go requires a mandatory custom header (x-opencode-session) and specific User-Agent handling for all requests to its OpenAI-compatible endpoint (https://opencode.ai/zen/go/v1).
Currently, Strix fails during connection verification with Error code: 400 - MissingSessionID when using OpenCode Go via LiteLLM because these extra headers are not injected.
Describe the solution you'd like
- Pass through custom HTTP headers from environment variables (e.g.,
LITELLM_EXTRA_HEADERS) directly into LiteLLM completion calls. - Alternatively, add native header injection support for
x-opencode-sessionwhen connecting to OpenCode base URLs.
Describe alternatives you've considered
Currently, the only working workaround is running a local Flask/mitmproxy reverse proxy to manually inject x-opencode-session and User-Agent headers into outgoing requests.
Additional context Example configuration that currently fails due to missing headers:
export LLM_API_KEY="sk-..."
export LLM_API_BASE="[https://opencode.ai/zen/go/v1](https://opencode.ai/zen/go/v1)"
export STRIX_LLM="openai/kimi-k2.6"
Source: usestrix/strix