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

Closed

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

  1. added
    bugSomething isn't working
    on Aug 14, 2026
  2. added
    proxyHTTP proxy, routing, reverse-proxy / management auth
    on Aug 14, 2026
  3. coderabbitai commented on Aug 14, 2026

    @coderabbitai
    Contributor
    🔗 Related PRs

    #426 - feat(codex): add account-qualified model namespaces [open]
    #625 - [WRONG BRANCH] fix(claude): stabilize GPT/Codex prompt cache [open]
    #671 - feat(codex): add exact account routing [merged]
    #1087 - fix(gui): shadow-call selects save the canonical namespaced model id (#1075) [merged]
    #1089 - feat(shadow-call): drop gpt-5.4-mini from the default intercept source models [merged]


    📝 Issue Planner

    Check the box below or use the @coderabbitai plan command to generate an implementation plan and prompts that you can use with your favorite coding assistant.

    • Create Plan

    🧪 Issue enrichment is currently in open beta.

    To disable automatic issue enrichment, add the following to your .coderabbit.yaml:

    issue_enrichment:
      auto_enrich:
        enabled: false

    💬 Have feedback or questions? Drop into our discord!

  4. lidge-jun commented on Aug 14, 2026

    @lidge-jun
    Owner

    Fixed in ba10784 — shouldInterceptShadowCall now intercepts all shadow source models unconditionally, ignoring request_kind metadata.

  5. lidge-jun commented on Aug 14, 2026

    @lidge-jun
    Owner

    Fixed in ba10784 on dev. The commit message carries Closes #1684, so this issue will close automatically when dev is promoted to main.

  6. lidge-jun commented on Aug 14, 2026

    @lidge-jun
    Owner

    Confirmed fixed by merged PR #1685. The merged change blocks Luna-family helper requests from leaking to the public OpenAI endpoint and adds regression coverage for the affected helper path. Closing as completed. Please reopen with a post-fix OpenCodex version and a redacted route trace if any helper request still bypasses the configured OpenCodex route.

  7. added a commit that references this issue on Aug 14, 2026
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