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
[FEATURE]: Support custom HTTP body fields in provider configuration #29592
I have verified this feature I'm about to request hasn't been suggested before.
Describe the enhancement you want to request
opencode supports adding custom HTTP headers to provider requests via provider..options.headers in the config. This is useful for API gateways, proxies, and providers that require additional authentication or routing metadata.
However, there is no equivalent mechanism for injecting custom fields into the HTTP request body.
For our internal gateway, it requires to pass extra body to make the response work correctly, currently isn't possible.
Proposed solution
Add a body option under the provider options config, parallel to the existing headers option:
// opencode.json
I’ve created a patch that attempts to resolve this issue in commit 7a81ea0.
Please note that I’m new to the OpenCode codebase, and the patch was generated by an automated agent. I’m not fully certain if it follows all the project conventions or is the optimal approach, but it does work for our specific use case.
Activity
timxx commentedon May 27, 2026
I’ve created a patch that attempts to resolve this issue in commit 7a81ea0.
Please note that I’m new to the OpenCode codebase, and the patch was generated by an automated agent. I’m not fully certain if it follows all the project conventions or is the optimal approach, but it does work for our specific use case.
github-actions commentedon Jul 27, 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.