Skip to content

add optional headers field to model config - #3546

Merged
rekram1-node merged 4 commits into
anomalyco:devfrom
neriousy:feat/custom-headers-per-model
Oct 31, 2025
Merged

rekram1-node merged 4 commits into
anomalyco:devfrom
neriousy:feat/custom-headers-per-model

Conversation

@neriousy

@neriousy neriousy commented Oct 29, 2025 •

Copy link
Copy Markdown
Member

closes #3499

example on the config:

{
  "provider": {
    "anthropic": {
      "api": "https://api.anthropic.com",
      "models": {
        "claude-sonnet-4": {
          "id": "claude-sonnet-4",
          "headers": {
            "anthropic-beta": "my-experimental-feature",
            "x-trace-id": "session-42"
          }
        }
      }
    },
    "opencode": {
      "models": {
        "claude-sonnet-4": {
          "headers": {
            "x-custom-routing": "gold-tier"
          }
        }
      }
    }
  }
}

Comment thread packages/opencode/src/session/prompt.ts Resolved
@neriousy
neriousy requested a review from rekram1-node October 30, 2025 09:00
@rekram1-node rekram1-node changed the title feat: custom model headers feat: allow models to specify headers Oct 31, 2025
@rekram1-node rekram1-node changed the title feat: allow models to specify headers add optional headers field to model config Oct 31, 2025
@rekram1-node
rekram1-node merged commit 51e4c9f into anomalyco:dev Oct 31, 2025
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request May 5, 2026
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
Rwanbt pushed a commit to Rwanbt/unifia that referenced this pull request Jun 14, 2026
meSingh pushed a commit to meSingh/opencode that referenced this pull request Sep 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]: Allow custom model headers

2 participants