windmill-labs/windmill · error
No code completion model selected
Error message
No code completion model selected
What it means
Thrown by autocompleteRequest before any HTTP call when `copilotInfo.codeCompletionModel` is unset — the instance or workspace has no code-completion (FIM) model configured, so there is nothing to send the prefix/suffix context to. Configuration is missing at the deployment level, not in the calling editor.
Source
Thrown at frontend/src/lib/components/copilot/autocomplete/request.ts:30
.map((line) => `${commentSymbol} ${line}`)
.join('\n')
}
export async function autocompleteRequest(
context: {
prefix: string
suffix: string
scriptLang: ScriptLang | 'bunnative' | 'jsx' | 'tsx' | 'json'
markers: editor.IMarker[]
libraries: string
workflowAsCode?: boolean
},
abortController: AbortController
) {
const providerModel = get(copilotInfo).codeCompletionModel
if (!providerModel) {
throw new Error('No code completion model selected')
}
// Only add context lines for native FIM providers - other providers use chat completion
// too much context degrades significantly the quality of the completion
if (providerModel.provider === 'mistral' || providerModel.provider === 'deepseek') {
let commentSymbol = getCommentSymbol(context.scriptLang)
let contextLines = comment(
commentSymbol,
'You are a code completion assistant. You are given three important contexts (<LANGUAGE CONTEXT>, <DIAGNOSTICS>, <LIBRARY METHODS>) to help you complete the code.\n'
)
contextLines += comment(commentSymbol, 'LANGUAGE CONTEXT:\n')
contextLines += comment(
commentSymbol,
getLangContext(context.scriptLang, { workflowAsCode: context.workflowAsCode }) + '\n'
)
contextLines += comment(commentSymbol, 'DIAGNOSTICS:\n')
contextLines += comment(commentSymbol, context.markers.map((m) => m.message).join('\n') + '\n')
contextLines += comment(commentSymbol, 'LIBRARY METHODS:\n')View on GitHub (pinned to e474e8803c)
Solutions
- Select a code completion model in the instance or workspace AI settings
- Verify the copilot info endpoint returns a non-empty codeCompletionModel
- Confirm the editor only invokes autocomplete after copilot info has loaded
Defensive patterns
Strategy: try-catch
When it happens
Trigger: Thrown at frontend/src/lib/components/copilot/autocomplete/request.ts:30 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of windmill-labs/windmill@e474e8803c (2026-09-03).
Data as JSON: /api/errors/03bc75b606964557.
Report an issue: GitHub.