You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: Shadow-call interception reroutes gpt-6-luna user turns to the helper model #6921
With shadow-call interception enabled, ordinary gpt-6-luna user turns go to the helper target instead of OpenAI. Title helpers should use the configured target; user turns should retain their selected model.
Related to #2706. The self-target guard does not fix this when the target is a different model.
Reproduction
Configure interception as shown below.
Send a /v1/responses request with model: "gpt-6-luna" and this header:
Both interception paths in request-prepare.ts exclude spawned agents but do not check thread_source. Matching the model alone captures user conversations.
A local patch checks metadata before both the combo-target and concrete-target rewrites:
Exempt explicit user and subagent conversations.
Give explicit helper headers precedence, so title calls remain intercepted even when labelled request_kind: "turn".
Preserve interception when metadata is missing or malformed.
The patch passed 12 metadata cases and 10 routing cases. Live checks confirmed Luna user turns reached OpenAI and title helpers still reached ninfer. Interception stayed enabled.
Checks
I searched existing issues and documentation.
I removed secrets, tokens, account details, request credentials, and personal data.
Confirmed by source inspection at trusted dev433764e9d8: both intercept sites in src/server/responses/request-prepare.ts exclude spawned children, but neither uses an explicit user-thread source before rewriting a matching bare Luna model. src/lib/shadow-call.ts deliberately stopped exempting every request_kind: "turn" after #1684, so reverting to a request-kind-only exemption would regress real helpers.
Your existing local fix/tests are useful evidence; please submit the focused patch as a PR against dev so we can review the actual header precedence and preserve your authorship. Keep user/subagent preservation and explicit helper detection together, with concrete-target and combo-target routing controls, missing/malformed metadata compatibility, and the existing self-target guard. Please name the exact helper headers/provenance in the PR rather than inferring helper identity from the slug alone.
Also cover per-turn WebSocket metadata, not only the HTTP header: the bridge can retain connection-level headers while individual frames carry different metadata. A stale handshake user marker must not exempt later helper frames (nor should a helper handshake capture later user turns). No live provider call or fresh runtime reproduction was performed in this review; the reported live receipts remain yours.
Fixed on dev by #6951 (b5f690b): explicit user turns and spawned children keep their selected model under shadow-call interception, and WebSocket uses per-frame turn metadata.
Activity
Ingwannu commentedon Oct 11, 2026
Confirmed by source inspection at trusted
dev433764e9d8: both intercept sites insrc/server/responses/request-prepare.tsexclude spawned children, but neither uses an explicit user-thread source before rewriting a matching bare Luna model.src/lib/shadow-call.tsdeliberately stopped exempting everyrequest_kind: "turn"after #1684, so reverting to a request-kind-only exemption would regress real helpers.Your existing local fix/tests are useful evidence; please submit the focused patch as a PR against
devso we can review the actual header precedence and preserve your authorship. Keep user/subagent preservation and explicit helper detection together, with concrete-target and combo-target routing controls, missing/malformed metadata compatibility, and the existing self-target guard. Please name the exact helper headers/provenance in the PR rather than inferring helper identity from the slug alone.Also cover per-turn WebSocket metadata, not only the HTTP header: the bridge can retain connection-level headers while individual frames carry different metadata. A stale handshake user marker must not exempt later helper frames (nor should a helper handshake capture later user turns). No live provider call or fresh runtime reproduction was performed in this review; the reported live receipts remain yours.
fix: preserve shadow-call user turns, honor ZCode dataBaseDir, forwar…
lidge-jun commentedon Oct 11, 2026
Fixed on dev by #6951 (b5f690b): explicit user turns and spawned children keep their selected model under shadow-call interception, and WebSocket uses per-frame turn metadata.
witherhoard99 commentedon Oct 11, 2026
Oh nice, I was still making the PR lol