continuedev/continue · warning · Error
Failed to fetch channels: ${response.statusText}
Error message
Failed to fetch channels: ${response.statusText} What it means
The adapter intentionally does not implement reranking for Vertex AI — the method is a hard stub that always throws. Vertex AI has no rerank endpoint exposed through this adapter.
Source
Thrown at core/context/providers/DiscordContextProvider.ts:80
if (!response.ok) {
throw new Error(`Failed to fetch messages: ${response.statusText}`);
}
return response.json();
}
async fetchChannels(fetch: FetchFunction): Promise<Array<DiscordChannel>> {
const url = this.getUrl(`/guilds/${this.options.guildId}/channels`);
const response = await fetch(url, {
headers: {
Authorization: `Bot ${this.options.discordKey}`,
"Content-Type": "application/json",
},
});
if (!response.ok) {
throw new Error(`Failed to fetch channels: ${response.statusText}`);
}
const channels = await response.json();
// Filter channels to only include text channels (type 0)
return channels.filter((channel: DiscordChannel) => channel.type === 0);
}
async getContextItems(
query: string,
extras: ContextProviderExtras,
): Promise<ContextItem[]> {
const channels = await this.fetchChannels(extras.fetch);
let channelId: string;
// Find the channel by ID or name in the query string. If not found, use the first channel
const selectedChannel = channels.find(
(channel) => channel.id === query || channel.name === query,
);View on GitHub (pinned to 5522c6f44c)
Solutions
- Route rerank requests to a provider that supports them (Cohere, Mistral, Jina)
- Conditionally skip rerank when the provider is vertexai in multi-provider setups
- File a feature request if Vertex adds a rerank API
Example fix
// before
await vertexApi.rerank({ query, documents });
// after
if (provider !== 'vertexai') await api.rerank({ query, documents });
else await cohereApi.rerank({ query, documents }); Defensive patterns
Strategy: type-guard
Validate before calling
const supportsRerank = (api: unknown): api is { rerank(b: RerankCreateParams): Promise<CreateRerankResponse> } => typeof (api as any)?.rerank === 'function' && !(api instanceof VertexAIApi); Type guard
const canRerank = (provider: string): boolean => provider !== 'vertexai';
Try / catch
try { return await api.rerank(body); } catch (e) { if ((e as Error).message.includes('not supported by VertexAI')) return fallbackRerank(body); throw e; } Prevention
- Feature-detect capabilities per provider in multi-provider abstractions
- Keep a secondary rerank provider configured
When it happens
Trigger: Any call to rerank() on the VertexAI adapter, regardless of arguments.
Common situations: Generic provider-agnostic code that calls rerank on every configured provider; migrating a rerank pipeline from Cohere/Mistral to Vertex.
Related errors
- LastXCommitsDepth must be a number
- Method not implemented.
- URL is not defined in params
- Response body is null
- Profile ${profileId} not found
AI-assisted analysis of continuedev/continue@5522c6f44c (2026-08-27).
Data as JSON: /api/errors/cbd6a51bcd66fbc6.
Report an issue: GitHub.