moeru-ai/airi · error · Error
Vision provider/model not configured
Error message
Vision provider/model not configured
What it means
runVisionInference throws this pre-flight check before any provider instance is created: the vision store must have both activeProvider and activeModel set. It is a configuration error, not a network one — image inference cannot run until a vision provider and model have been selected in settings.
Solutions
- Open vision settings and select a provider and a model, then retry
- If invoking programmatically, seed visionStore activeProvider and activeModel before running
- Guard the call site so the UI routes to settings instead of surfacing a raw error
- Re-select the vision provider after any settings reset
Example fix
// before
await runVisionInference({ workloadId, imageDataUrl }) // throws: not configured
// after
if (!visionStore.activeProvider || !visionStore.activeModel) {
openSettingsPage('vision')
return
}
await runVisionInference({ workloadId, imageDataUrl }) Defensive patterns
Strategy: validation
Validate before calling
const ready = Boolean(visionStore.activeProvider && visionStore.activeModel)
if (!ready)
openSettingsPage('vision') Try / catch
try {
await runVisionInference(input)
}
catch (err) {
if (err instanceof Error && err.message === 'Vision provider/model not configured')
openSettingsPage('vision')
} Prevention
- Disable the run action until both store fields are set
- Persist the vision selection and verify it loads before first use
- Re-require selection after settings resets
When it happens
Trigger: Fresh install where vision settings were never configured; after resetSettingsState() cleared the persisted stores; calling runVisionInference programmatically (devtool, automation, or test) without seeding the store first.
Common situations: Onboarding not completed; user switched devices so settings storage is empty; a script or test invokes the composable without selecting a provider.
Related errors
- Failed to initialize speech provider
- Failed to initialize speech provider
- Failed to resolve chat provider
- Missing LLM configuration
- No active chat provider or model configured
AI-assisted analysis of moeru-ai/airi@438a067dde (2026-09-17).
Data as JSON: /api/errors/a87567c8f7d905aa.
Report an issue: GitHub.
Appendix: source
Thrown at packages/stage-ui/src/composables/vision/use-vision-inference.ts:47
const base64 = meta?.includes('base64') ? data : btoa(data)
return {
mimeType,
base64,
url: `data:${mimeType};base64,${base64}`,
}
}
export function useVisionInference() {
const llmStore = useLLM()
const providersStore = useProviderStore()
const visionStore = useVisionStore()
const { activeProvider, activeModel, ollamaThinkingEnabled } = storeToRefs(visionStore)
const lastText = ref('')
async function runVisionInference(input: VisionInferenceInput) {
if (!activeProvider.value || !activeModel.value)
throw new Error('Vision provider/model not configured')
const provider = await providersStore.getChatProviderInstance(activeProvider.value)
const workload = getVisionWorkload(input.workloadId)
const prompt = input.promptOverride ?? workload.prompt
const { url } = parseDataUrl(input.imageDataUrl)
const visionProvider: GenerationProvider = activeProvider.value === 'vision-ollama'
? {
generation(model) {
const request = provider.generation(model)
if (request.protocol !== 'chat-completions')
return request
return { ...request, config: { ...request.config, think: ollamaThinkingEnabled.value } }
},
}
: provider
const context: Conversation = { turns: [{
id: 'vision-input',View on GitHub (pinned to 438a067dde)