github / github/app

Add extended support for customizing custom HTTP Headers sent to custom Model Providers

Open
#3,493 0 comments 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
No language data
Stars
2.1k
Forks
157
PR merge metrics
No merged PRs in 30d

Description

Add support for reading session variables that can be read from configuration. To be specific, I want to be able to configure my custom Model Provider to always send the HTTP header x-opencode-session with a unique-per-session value. In the current setup, I can only specify a hard code version

The current UI for Model Providers in Settings looks like this:

Image

I want to be able to read out a session ID variable from this dialog so I can send a session ID to OpenCode. This is something that OpenCode will start to require from the 6th of September 2026. Failure to do so will result in failed requests

I'm hoping for a simple solution that allows me to read out system variables using ${{ session.id }} that I can use in the Custom Headers (JSON) field. Something like

{ "x-opencode-session": "${{ session.id }}" }
Image
Field Value
App version 1.1.14
OS Windows 10.0.26200
Theme GitHub
Path /chat
Tenure Week 23

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No source file, test, or entry point is named in the issue. Start by locating the Model Providers settings and the code that sends custom headers, then trace how session identifiers are available; done means the documented ${{ session.id }} value resolves to a unique session value in outgoing custom-provider headers.

Written by the indexing model from the issue text.

Assessment

Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.