[PR #3546] add optional headers field to model config #10688

Closed
opened 2026-02-16 18:15:25 -05:00 by yindo · 0 comments
Owner

Original Pull Request: https://github.com/anomalyco/opencode/pull/3546

State: closed
Merged: Yes


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"
          }
        }
      }
    }
  }
}
**Original Pull Request:** https://github.com/anomalyco/opencode/pull/3546 **State:** closed **Merged:** Yes --- 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" } } } } } } ```
yindo added the pull-request label 2026-02-16 18:15:25 -05:00
yindo closed this issue 2026-02-16 18:15:25 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: anomalyco/opencode#10688