continuedev/continue · error · Error
GitLab Private Token is required!
Error message
GitLab Private Token is required!
What it means
The WatsonX legacy streaming completion request failed at HTTP level (non-ok or missing body), with the response text embedded. Same failure surface as the chat streaming error but on the completions path.
Source
Thrown at core/context/providers/GitLabMergeRequestContextProvider.ts:90
static description: ContextProviderDescription = {
title: "gitlab-mr",
displayTitle: "GitLab Merge Request",
description: "Reference comments in a GitLab Merge Request",
type: "normal",
};
get deprecationMessage() {
return "The Gitlab Merge Request context provider is now deprecated and will be removed in a later version. Please consider using the GitLab MCP (https://continue.dev/docker/mcp-gitlab) instead.";
}
private async getApi(): Promise<AxiosInstance> {
const { default: Axios } = await import("axios");
const domain = this.options.domain ?? "gitlab.com";
const token = this.options.token;
if (!token) {
throw new Error("GitLab Private Token is required!");
}
return Axios.create({
baseURL: `https://${domain ?? "gitlab.com"}/api/v4`,
headers: {
"PRIVATE-TOKEN": token,
},
});
}
private async getRemoteBranchInfo(
extras: ContextProviderExtras,
): Promise<RemoteBranchInfo> {
const subprocess = await getSubprocess(extras);
const branchName = await subprocess("git branch --show-current");
const branchRemote = await subprocess(View on GitHub (pinned to 5522c6f44c)
Solutions
- Inspect the embedded response text for the WatsonX error detail
- Refresh credentials/token and confirm project id and model id
- Test the same payload with curl to isolate adapter vs account issues
- Add retry with backoff for transient failures before surfacing to users
Defensive patterns
Strategy: retry
Try / catch
try { for await (const c of api.completionStream(body, signal)) {} } catch (e) { const msg = (e as Error).message; if (/401|token/i.test(msg)) { await refreshToken(); return retry(); } if (/429|5\d\d/.test(msg)) await backoff(); else throw e; } Prevention
- Reuse the same token-refresh/retry wrapper for all WatsonX streaming calls
- Verify proxy environments forward SSE bodies (empty body also triggers this error)
When it happens
Trigger: completionStream hitting expired IAM token, wrong project id, unavailable model, or gateway/proxy errors returning non-2xx with no SSE body.
Common situations: Token expiry in long-running workers; WATSONX_PROJECT_ID misconfigured per environment; model deprecated/renamed in WatsonX catalog; corporate proxy stripping response bodies.
Related errors
- Depth must be a number
- Error getting prompt: MCP Connection ${serverName} not found
- Relace provider does not support streaming completion.
- Unsupported transport type: ${this.options.type}
- MCP Connection ${serverId} not found
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/bc7a9fc6e268cd83.
Report an issue: GitHub.