Repository navigation
Description
Area
Proxy and routing
What are you trying to accomplish?
When an admitted request triggers an Advisor consultation, the consultation runs as an internal loopback request. #7718 makes that hop carry the originating caller's provider/model admission scope. I would like the same consultation to follow the originating caller's other routing policy as well, so that an Advisor consultation and a direct request from the same caller make the same routing decisions.
What prevents this today?
Two caller-level settings are evaluated against the internal hop's own admission rather than the originating request's:
- paid-combo consent (
allowMeteredComboTargetson an API key, and the combo-levelallowMeteredTargetsopt-in), and - device-scoped fallback policy (
fallback.devices.<id>).
#7718 was intentionally narrowed to the model-scope part so it could land on its own.
What should OpenCodex do?
An Advisor consultation should apply the originating caller's paid-combo consent and device-scoped fallback policy together with the host's own limits, for every combo pick, nested decision turn, child invocation and fallback hop inside the consultation. If those rules leave no allowed destination, the consultation should return the existing "advisor unavailable" notice to the worker.
Example usage or interface
// config.json
{
"apiKeys": [{ "id": "laptop", "allowMeteredComboTargets": false }],
"fallback": { "devices": { "laptop": { "provider": false } } }
}A request admitted with the laptop key that triggers an Advisor consultation should resolve the consultation's combo picks and fallback hops exactly as a direct laptop request would: no metered combo target and no provider fallback.
Alternatives or workarounds
A carried implementation existed on the #7718 branch (captured, immutable caller policy registered per consultation behind the internal-call capability) and was reverted to keep #7718 limited to model scope. It can serve as a starting point.
Additional context
Follow-up to #7718.
Checks
- I searched existing issues and documentation.
- This request describes a concrete OpenCodex workflow rather than merely naming a desired technology.
- I removed secrets and personal data.
Activity
coderabbitai commentedon Oct 28, 2026
🔗 Related PRs
#7718 - fix(advisor): preserve captured caller admission scope [open]
📝 Issue Planner
Check the box below or use the
@coderabbitai plancommand to generate an implementation plan and prompts that you can use with your favorite coding assistant.🧪 Issue enrichment is currently in open beta.
To disable automatic issue enrichment, add the following to your
.coderabbit.yaml:💬 Have feedback or questions? Drop into our discord!
fix(advisor): preserve captured caller admission scope (#7718)
test(server): pin the Messages route call with its captured Advisor p…
fix(advisor): apply the caller's paid-combo consent and device fallba…
lidge-jun commentedon Oct 30, 2026
Resolved on
devby #7894 (297f29939c). PRs intodevdo not auto-close linked issues, so this was closed manually. The fix ships with the next release cut fromdev; please reopen if it still reproduces on a build that contains it.