diegosouzapw/OmniRoute · error
direct_access exchange rejected (401); falling back to…
Error message
direct_access exchange rejected (401); falling back to public completions endpoint
What it means
The GitLab Duo direct_access token exchange returned 401, so the executor abandons the direct-access path and falls back to the public completions endpoint using the existing access token. Expected degradation mode for tokens/scopes that lack direct-access eligibility; the request continues on the monolith endpoint instead of failing.
Solutions
- No immediate action — fallback keeps the request flowing
- Refresh GitLab credentials if the public endpoint also starts failing
- Verify OAuth token scopes if direct-access mode is required
Defensive patterns
Strategy: fallback
When it happens
Trigger: Thrown at open-sse/executors/gitlab.ts:586 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of diegosouzapw/OmniRoute@a179ffed5b (2026-08-25).
Data as JSON: /api/errors/65c3706db0fdc7bf.
Report an issue: GitHub.
Appendix: source
Thrown at open-sse/executors/gitlab.ts:586
errorResponse: null,
};
}
if (!response) {
return {
target: {
mode: "monolith",
url: endpoints.publicCompletionsUrl,
headers: buildMonolithHeaders(credentials.accessToken),
},
credentials,
errorResponse: null,
};
}
if (response.status === 401) {
if (input.log) {
input.log.warn(
"GITLAB-DUO",
"direct_access exchange rejected (401); falling back to public completions endpoint"
);
}
return {
target: {
mode: "monolith",
url: endpoints.publicCompletionsUrl,
headers: buildMonolithHeaders(credentials.accessToken || null),
},
credentials,
errorResponse: null,
};
}
if (response.status === 403 && !isGitLabDirectAccessDisabled(response.status, bodyText)) {
return {
target: null,View on GitHub (pinned to a179ffed5b)