ruvnet/ruflo · error · Error
No LLM provider available
Error message
No LLM provider available
What it means
SamplingManager.createMessage() asked selectProvider() for a provider matching the request's model preferences and got null — no LLM provider is registered (or none satisfies the preferences). Sampling cannot proceed without a backend; register a provider via registerLLMProvider before sampling.
Source
Thrown at v3/@claude-flow/mcp/src/sampling.ts:117
}
/**
* Create a message (sampling/createMessage)
*/
async createMessage(
request: CreateMessageRequest,
context?: SamplingContext
): Promise<CreateMessageResult> {
const startTime = Date.now();
this.requestCount++;
// Validate request
this.validateRequest(request);
// Select provider
const provider = this.selectProvider(request.modelPreferences);
if (!provider) {
throw new Error('No LLM provider available');
}
// Apply defaults
const fullRequest = this.applyDefaults(request);
if (this.config.enableLogging) {
this.logger.debug('Sampling request', {
provider: provider.name,
messageCount: request.messages.length,
maxTokens: fullRequest.maxTokens,
sessionId: context?.sessionId,
});
}
this.emit('sampling:start', { provider: provider.name, context });
try {
// Call provider with timeoutView on GitHub (pinned to fa13ee4ad6)
Solutions
- Configure at least one LLM provider (e.g. set ANTHROPIC_API_KEY) before enabling sampling.
- Check provider initialization logs at startup and fail fast if no provider registers.
- Return a clear capability advertisement so clients know sampling is unavailable.
Defensive patterns
Strategy: fallback
When it happens
Trigger: A sampling/createMessage request reaches the MCP server but no LLM provider has been configured or registered.
Common situations: Happens when the server is started without an API key for any provider, or when provider initialization failed silently at startup.
AI-assisted analysis of ruvnet/ruflo@fa13ee4ad6 (2026-08-18).
Data as JSON: /api/errors/fd4b5edb2fbea33c.
Report an issue: GitHub.