mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #138] [Issue]: [BUG] Anthropic API fails with error 400: anthropic-version header is required #36
Labels
No labels
android
bug
bugfix
ci
client
code freeze pause
container
dependencies
docs
documentation
duplicate
enhancement
feature
feature
feature
feature-creep
fixed-in-refactor
fixed-in-staging
good first issue
help wanted
in-pr
in-pr
needs-codeowner-decision
normal-scope
old-codebase
old-codebase
pull-request
qol
question
refactor
regression
revisit later
roadmap
scope-risk
scope-risk
server
server
shared
soup
upstream
windows
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Pasta-Devs/Marinara-Engine#36
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @v374q72m93-ai on GitHub (Apr 20, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/138
Summary
Direct connection to Anthropic API fails because the mandatory anthropic-version header is missing in the request.
Expected behavior
The engine should include anthropic-version: 2023-06-01 in the headers when the Anthropic provider is selected.
Actual behavior
API returns error 400: {"type":"error","error":{"type":"invalid_request_error","message":"anthropic-version: header is required"}}
Steps to reproduce
Select Anthropic provider.
Enter a valid Anthropic API key.
Attempt to "Test Connection" or send a message.
Error 400 is returned.
Technical Details
I've investigated the source code and it seems that ProviderDefinition in packages/shared/src/constants/providers.ts does not account for mandatory extra headers like the one Anthropic requires. Manual patching of anthropic.provider.ts and api-client.ts didn't solve the issue, likely because headers are being filtered or reconstructed elsewhere based on the shared provider definitions.
@SpicyMarinara commented on GitHub (Apr 20, 2026):
Addressed in v1.5.3.
@v374q72m93-ai commented on GitHub (Apr 21, 2026):
"I've updated to v1.5.3 (official installer), but the error 400 persists.
I've analyzed the request using the Network Tab (F12). In the Request Headers, the anthropic-version is completely missing.
Only standard headers like Content-Type, Accept, and Host are being sent to the local server (127.0.0.1). It seems the client-side or the server-side wrapper is stripping away the mandatory Anthropic header before the final fetch.
Please verify why anthropic-version: 2023-06-01 isn't reaching the API even with the new provider logic."
@SpicyMarinara commented on GitHub (Apr 21, 2026):
I don't know what you expect me to do. I've been using the Official Claude API for Opus-4.7 tests since it came out, and it works for me. No reports from others either.
@v374q72m93-ai commented on GitHub (Apr 22, 2026):
Thanks for the reply. I'm a basic user and don't know much about
programming. I was trying to solve a problem I had using Google Gemini. If
you're interested, I created a Word file that shows two screenshots and
Google Gemini's response to them. Anyway, thank you for your project. Good
luck. P.S. Everything works fine for me through OpenRouter.
вт, 21 апр. 2026 г. в 20:16, Spicy Marinara @.***>: