chatboxai/chatbox · error · Error
Model provider must not be empty.
Error message
Model provider must not be empty.
What it means
Error "Model provider must not be empty." thrown in chatboxai/chatbox.
Source
Thrown at src/shared/providers/index.ts:70
export type { CreateModelConfig, ProviderDefinition, ProviderDefinitionInput }
export function isBuiltinProviderId(providerId: string): boolean {
return !!getProviderDefinition(providerId)
}
export function getBuiltinProviderIds(): string[] {
return getSystemProviders().map((provider) => provider.id)
}
/**
* Get provider settings from session and global settings.
* This is a helper function that extracts and formats provider-related settings.
*/
export function getProviderSettings(setting: SessionSettings, globalSettings: Settings) {
console.debug('getProviderSettings', setting.provider, setting.modelId)
const provider = setting.provider
if (!provider) {
throw new Error('Model provider must not be empty.')
}
const registryProviders = getSystemProviders()
const providerBaseInfo = [...registryProviders, ...(globalSettings.customProviders || [])].find(
(p) => p.id === provider
)
if (!providerBaseInfo) {
throw new Error(`Cannot find model with provider: ${setting.provider}`)
}
const providerSetting = mergeSharedOAuthProviderSettings(provider, globalSettings.providers)
// When OAuth is active, use the provider's default API host (OAuth tokens are issued for specific endpoints)
const isOAuthActive = providerSetting.activeAuthMode === 'oauth' && !!providerSetting.oauth?.accessToken
const formattedApiHost = (
(isOAuthActive ? '' : providerSetting.apiHost) ||
providerBaseInfo.defaultSettings?.apiHost ||
''
).trim()View on GitHub (pinned to 81571269ad)
Solutions
- Select a model/provider in the chat or session settings before sending a message.
- If settings were restored from a backup or older version, re-pick the model so settings.provider is populated.
- Check that no code path constructs SessionSettings without a provider field.
Example fix
const provider = setting.provider
if (!provider) {
// Open the model selector and choose a provider for this session
} When it happens
Trigger: Thrown at src/shared/providers/index.ts:70 when the library encounters an invalid state.
Common situations: Occurs in src/shared/providers/index.ts when a provider lookup is attempted with an empty or whitespace-only provider name.
AI-assisted analysis of chatboxai/chatbox@81571269ad (2026-08-12).
Data as JSON: /api/errors/3d03332aa659e024.
Report an issue: GitHub.