fix: add claude code headers for oauth

This commit is contained in:
aedes
2026-04-20 18:16:27 +03:00
parent 9a4f656c96
commit 05e3c927e3

View File

@@ -48,7 +48,9 @@ app.post('/api/chat', async (req, res) => {
'Content-Type': 'application/json',
'Authorization': `Bearer ${accessToken}`,
'anthropic-version': '2023-06-01',
'anthropic-beta': 'oauth-2025-04-20',
'anthropic-beta': 'claude-code-20250219,oauth-2025-04-20,interleaved-thinking-2025-05-14,fine-grained-tool-streaming-2025-05-14',
'x-app': 'cli',
'User-Agent': 'claude-cli/2.1.114',
},
body: JSON.stringify({
model: modelId,