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
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