mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8186] Anthropic-compatible retry leaves empty unsigned assistant history and omits final prompt debug logging #7601
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#7601
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 @SpicyMarinara on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8186
Originally assigned to: @SpicyMarinara on GitHub.
The Anthropic-compatible Chat Completions retry can strip unsigned reasoning yet leave an empty assistant history row, so the reshaped request is still invalid for an endpoint that rejects empty assistants. The same retry also omits debug logging of the final reshaped messages.
This is upstream provider code already published to staging, discovered during the staging integration review for #8153; it is separate from that PR's lorebook changes. Open issue/PR searches found no matching active follow-up.
Actual
OpenAIProvider.chatCompletereproduction over a local HTTP fixture:Begin.followed by an assistant withcontent: "", unsignedreasoning_content, no tools and model aliashouse-model.anthropicSafeWireMessagesremoves its reasoning payload but pushes the now-empty assistant row.[user, { role: "assistant", content: "" }]and receives the same local fixture rejection.The helper preserves empty rows after the tool-call conversion branch; it should omit a textless unsigned row while preserving real content, signed reasoning and correctly paired native/retold tools. The
postChatCompletionsAnthropic retry should also call the existing conditionallogDebugOverridewith its final message array, as the adjacent role-alternation retry already does. Keep API keys and non-debug prompts private.Code owner: Engine
packages/server/src/services/llm/providers/openai.provider.ts. Runnable local-HTTP probe and wire bodies, filesmarinara-upstream-empty-reasoning-probe.mtsand.log. All raw evidence files were byte-verified. This proves the emitted wire shape and fallback outcome against a controlled local contract; it does not claim validation with a live Anthropic/proxy account.Owner for triage: @SpicyMarinara. Implementation has not started; no extra branch or draft PR has been created.