Skip to content

In Codex 0.147.0, background helper requests use gpt-5.6-luna. Even with OpenCodex's Shadow Call Intercept enabled, some Luna requests still reached OpenAI. #1684

Description

@w384

Client or integration

Codex App

Area

Proxy and routing

Summary

The cause was the logic in:
src/lib/shadow-call.ts
OpenCodex skipped interception when the request metadata contained:
{"request_kind": "turn"}
Codex 0.147.0 can mark Luna helper calls this way, causing OpenCodex to misclassify them as normal user turns.
Fix

Reproduction

Change shouldInterceptShadowCall() from the metadata-based logic to:
export function shouldInterceptShadowCall(
modelId: string,
configured: unknown,
headers: Headers,
): boolean {
return isShadowSourceModel(modelId, configured);
}
This makes OpenCodex intercept every configured shadow source model such as:
gpt-5.6-luna
Then configure the interception target, for example:
"shadowCallIntercept": {
"enabled": true,
"model": "ollama/qwen3.5:9b"
}
Restart OpenCodex and the Codex app-server.
Result
Before:
Codex helper call
→ gpt-5.6-luna
→ OpenAI
After:
Codex helper call
→ gpt-5.6-luna
→ OpenCodex intercept
→ ollama/qwen3.5:9b
After applying this change, the unwanted gpt-5.6-luna requests to OpenAI stopped.

Version

2.15.1

Operating system

win11

Provider and model

No response

Logs or error output

Screenshots and supporting files

No response

Redacted configuration

Checks

  • I searched existing issues and documentation.
  • I removed secrets, tokens, account details, request credentials, and personal data.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingproxyHTTP proxy, routing, reverse-proxy / management auth

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions