Skip to content

BYOK custom inference forwarding requests should send or allow configuring User-Agent #11607

@makoMakoGo

Description

@makoMakoGo

Describe the bug

When Warp uses a BYOK / custom inference OpenAI-compatible endpoint, the server-side forwarding request to the custom endpoint does not send a usable User-Agent header, and Warp does not provide a way to configure one.

This causes HTTPS OpenAI-compatible endpoints behind Cloudflare or another gateway to fail with HTTP 403 when the gateway requires or filters by User-Agent.

The same endpoint works when called directly with curl and an accepted User-Agent header. It also works through an intermediate proxy if that proxy adds a User-Agent header before forwarding the request upstream. Without that proxy-level header injection, Warp's BYOK / custom inference flow cannot use the endpoint directly.

Warp custom inference provider settings currently expose only:

  • endpoint URL
  • API key
  • models

There is no configuration for:

  • User-Agent
  • custom HTTP headers
  • extra request headers

To reproduce

  1. Configure a BYOK / custom inference OpenAI-compatible endpoint in Warp.
  2. Use an HTTPS endpoint behind Cloudflare or another gateway that requires a User-Agent header.
  3. Send a request from Warp.
  4. The request fails with HTTP 403.
  5. Send the same request with curl and explicitly include an accepted User-Agent header.
  6. The request succeeds.

Example:

curl https://example.com/v1/chat/completions \
  -H "Authorization: Bearer <redacted>" \
  -H "Content-Type: application/json" \
  -H "User-Agent: <accepted-user-agent>" \
  -d '{
    "model": "gpt-5.5",
    "messages": [
      {
        "role": "user",
        "content": "hello"
      }
    ]
  }'

Expected behavior

Warp should do one of the following for BYOK / custom inference forwarding requests:

  1. Send a stable default User-Agent header, such as a Warp-specific value; or
  2. Allow users to configure outbound HTTP headers for custom inference providers, at minimum User-Agent.

For example:

User-Agent: Warp/1.0

or user-configurable provider headers:

{
  "User-Agent": "custom-client/1.0"
}

Actual behavior

Warp's BYOK / custom inference flow does not provide a way to configure request headers, and the forwarded request to the custom endpoint does not send a usable User-Agent header.

This makes otherwise OpenAI-compatible endpoints fail with HTTP 403 when they are behind gateways that require or filter by request headers.

Workaround

I had to put another proxy in front of the target endpoint and configure that proxy to add a User-Agent header when forwarding the request upstream.

This works, but it should not be necessary. Warp should either send a default User-Agent for BYOK forwarding requests or allow users to configure one.

Additional context

This is not about HTTPS versus HTTP. The endpoint is served over HTTPS; the problem is the HTTP request headers inside the HTTPS connection.

I searched existing issues for BYOK/custom inference and User-Agent/custom headers and did not find a duplicate for this specific problem.

Operating system (OS)

Cross-platform / server-side BYOK forwarding behavior.

Current Warp version

Not version-specific from my testing; this is about the current BYOK custom inference forwarding behavior.

Regression

No, this issue appears to be present in the current BYOK custom inference flow.

Does this block you from using Warp daily?

Yes, this prevents using Warp directly with otherwise-compatible OpenAI-compatible custom endpoints behind gateways that require User-Agent.

Is this an issue only in Warp?

Yes. The same endpoint succeeds with curl when the required User-Agent header is included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:agentAgent workflows, conversations, prompts, cloud mode, and AI-specific UI.bugSomething isn't working.repro:mediumThe report suggests a plausible repro path, but some uncertainty remains.triagedIssue has received an initial automated triage pass.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions