mirror of
https://github.com/Pasta-Devs/Marinara-Engine.git
synced 2026-12-03 19:00:50 +07:00
[GH-ISSUE #8275] OpenAI and ChatGPT (Codex) connections get no prompt cache hits #8214
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#8214
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 @kolacheee on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Pasta-Devs/Marinara-Engine/issues/8275
Originally assigned to: @kolacheee on GitHub.
On an OpenAI-through-ChatGPT (Codex login) connection, two consecutive Game Master turns reported 0 cached tokens and 0 cache writes (about 18.5k and 18.9k prompt tokens), even though the first ~7k tokens of both prompts were byte-identical.
Cause: Marinara never sends
prompt_cache_key. OpenAI uses that key to send requests to the machine that already holds a prompt's prefix, and Codex CLI sends one for each conversation. Without the key, the turns of one chat land on different machines.Expected: every request in a chat carries the same
prompt_cache_key, on chat completions and on the Responses API, but only for OpenAI's own endpoints, since a compatible endpoint may reject a field it doesn't know. Debug mode should also log the provider's raw usage object and the Responses request body as sent, so the next cache miss can be diagnosed from the log.