Skip to content

API Error: 400 x-anthropic-billing-header is a reserved keyword and may not be used in the system prompt #174

@dogo425f

Description

@dogo425f

API Error: 400 {"error":{"message":"{"error":{"message":"x-anthropic-billing-header is a reserved keyword and may not be used in the system prompt.","code":"invalid_request_body"}}\n","type":"error"}}

--> POST /v1/messages?beta=true 400 2s

ERROR Failed to create chat completions Response { status: 400, 6:04:12 PM
statusText: 'Bad Request',
headers:
Headers { 'cache-control': 'no-cache',
'content-security-policy': "default-src 'none'; sandbox",
'content-type': 'text/plain; charset=utf-8',
'copilot-edits-session': '1769076252.80ecf760d7de5c851eed8baded0e83e0e925765543914b4d7325cd4e90775a29',
'strict-transport-security': 'max-age=31536000',
'x-content-type-options': 'nosniff',
'x-request-id': '9d4415c5-df09-4eed-b751-dce29ceb29b5',
date: 'Thu, 22 Jan 2026 10:04:13 GMT',
'transfer-encoding': 'chunked',
'x-github-backend': 'Kubernetes',
'x-github-request-id': 'BA1E:66B94:21A2874:26E58ED:6971F61B' },
body: ReadableStream { locked: false, state: 'readable', supportsBYOB: true },
bodyUsed: false,
ok: false,
redirected: false,
type: 'basic',
url: 'https://api.githubcopilot.com/chat/completions' }

ERROR Error occurred: Failed to create chat completions 6:04:12 PM

at createChatCompletions (.nvm/versions/node/v22.16.0/lib/node_modules/copilot-api/dist/main.js:783:9)
at process.processTicksAndRejections (node:internal/process/task_queues:105:5)
at async handleCompletion (.nvm/versions/node/v22.16.0/lib/node_modules/copilot-api/dist/main.js:1227:19)
at async .nvm/versions/node/v22.16.0/lib/node_modules/copilot-api/dist/main.js:1265:10
at async dispatch (.nvm/versions/node/v22.16.0/lib/node_modules/copilot-api/node_modules/hono/dist/compose.js:22:17)
at async cors2 (.nvm/versions/node/v22.16.0/lib/node_modules/copilot-api/node_modules/hono/dist/middleware/cors/index.js:79:5)
at async dispatch (.nvm/versions/node/v22.16.0/lib/node_modules/copilot-api/node_modules/hono/dist/compose.js:22:17)
at async logger2 (.nvm/versions/node/v22.16.0/lib/node_modules/copilot-api/node_modules/hono/dist/middleware/logger/index.js:38:5)
at async dispatch (.nvm/versions/node/v22.16.0/lib/node_modules/copilot-api/node_modules/hono/dist/compose.js:22:17)
at async .nvm/versions/node/v22.16.0/lib/node_modules/copilot-api/node_modules/hono/dist/hono-base.js:301:25

ERROR HTTP error: { error: 6:04:12 PM
{ message:
'x-anthropic-billing-header is a reserved keyword and may not be used in the system prompt.',
code: 'invalid_request_body' } }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions