Skip to content

Conversation

@UdeshyaDhungana
Copy link
Contributor

@UdeshyaDhungana UdeshyaDhungana commented Jan 23, 2026

Note

Introduces a small proxy behavior change to stabilize request handling.

  • In proxy_server.go, the reverse proxy Rewrite now deletes x-anthropic-billing-header from outbound requests while still setting Authorization and targeting openrouter.ai.
  • No changes to endpoint validation or server setup.

Written by Cursor Bugbot for commit fd0b396. This will update automatically on new commits. Configure here.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is ON. A Cloud Agent has been kicked off to fix the reported issue.

req.Out.Header.Set("Authorization", "Bearer "+apiKey)
// This is needed because the tests started randomly failing from
// 23 Jan 2026 (https://github.com/codecrafters-io/claude-code-tester/actions/runs/21276441088/job/61237125153?pr=5)
req.Out.Header.Del("x-anthropic-billing-header")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suspicious header name with redundant suffix

Medium Severity

The header name x-anthropic-billing-header ends with -header, which is redundant and non-standard in HTTP header naming conventions. Standard headers like Authorization, Content-Type, or custom headers like X-API-Key never include -header in their names. This header isn't documented or referenced elsewhere in the codebase, and no external documentation confirms this exact name. If the actual header has a different name (like X-Anthropic-Billing), this deletion won't work and the proxy fix will fail.

Fix in Cursor Fix in Web

@cursor
Copy link

cursor bot commented Jan 23, 2026

Bugbot Autofix determined the bug found in the latest run was a false positive.

  • ⚠️ False positive: Suspicious header name with redundant suffix
    • The API error message explicitly confirms 'x-anthropic-billing-header is a reserved keyword' - this exact header name is documented in the actual error from OpenRouter/Anthropic that caused the test failures, proving the header name in the code is correct.

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.

2 participants