mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8584] Professor Mari fails on an OpenAI-typed Anthropic-backend proxy: Unexpected role "tool" #8413
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#8413
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 @ylli-selmani on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8584
Originally assigned to: @ylli-selmani on GitHub.
Summary
Professor Mari fails on an OpenAI-typed connection that is really an Anthropic-backed proxy (LinkAPI): the first
tool round works, then the run dies with
OpenAI API error 429: messages: Unexpected role "tool". Allowed roles are "user", "assistant" or "system".Same reporter as #8564, different cause. #8576 fixed tools being dropped for uncatalogued models; this is the
history shape the endpoint cannot take.
Expected behavior
Mari keeps reading and writing lorebooks on that connection, the way she does on every other model.
Actual behavior
Round 1:
toolsare sent, the model returnstool_calls, Mari runs them ("Looked at 2 things"). Round 2 replaysthe results as a
{role:"tool"}message. Anthropic's Messages API has onlyuserandassistant, so the proxyrejects the request. Because the rejection arrives as HTTP 429, it is classified as a rate limit and retried with
backoff (two different
request ids in the banner, "Worked for 24s") before the task fails.Steps to reproduce
Verified without LinkAPI by a local fixture that accepts
tools, returnstool_calls, and rejects any{role:"tool"}message with the same 429 body: the second round is rejected exactly as reported.Environment
1403a9818506; provider code identical onstaging)Logs, screenshots, or video
Additional context
Ties to #8564. Not a duplicate of it: #8576 is merged and tools are now sent.
Switching the connection to provider type Custom does not help (the
toolrole is emitted the same way);that workaround only covered the dropped-tools bug.
Affects every tool-calling surface on such a connection, not only Mari.
If the proxy exposes an Anthropic-compatible endpoint, connecting as provider type Anthropic should work;
untested.
I DID NOT read this template and provide the requested details.