You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
User-Agent in custom provider options.headers is overridden #24594
For custom openai-compatible providers (any provider where providerID doesn't start with opencode), opencode hardcodes User-Agent: opencode/${InstallationVersion} in streamText({ headers }) at packages/opencode/src/session/llm.ts:381. The AI SDK merges call-level headers after provider.getHeaders(), so this silently overrides any User-Agent the user set via provider.<name>.options.headers.
This breaks corporate gateways that allowlist on User-Agent and surprises anyone relying on documented options.headers.
OpenCode version
1.14.28
Steps to reproduce
Configure a custom openai-compatible provider with a User-Agent in options.headers:
Activity
github-actions commentedon Apr 27, 2026
This issue might be a duplicate of existing issues. Please check:
github-actions commentedon Jul 4, 2026
To stay organized issues are automatically closed after 60 days of no activity. If the issue is still relevant please open a new one.