Summary
image_generate can fail with No image-generation provider registered for google even when the Google plugin is loaded and configured.
Repro
In a runtime where the active plugin registry has a cache key but no imageGenerationProviders, image generation provider lookup skips plugin reload and returns an empty provider list.
Observed symptoms in a live OpenClaw install:
openclaw plugins list showed google loaded with image-generation capability
- launchd environment contained
GEMINI_API_KEY / GOOGLE_API_KEY
openclaw models status showed Google auth as configured
image_generate still failed with:
No image-generation provider registered for google
- similarly for
openai / fal
Root cause
src/image-generation/provider-registry.ts currently does this:
const registry =
(active?.imageGenerationProviders?.length ?? 0) > 0 || getActivePluginRegistryKey() || !cfg
? active
: loadOpenClawPlugins({ config: cfg });
That getActivePluginRegistryKey() condition is too aggressive. If an active registry exists with a key but no image providers, lookup will not fall back to loadOpenClawPlugins({ config: cfg }), so the provider map stays empty.
Expected behavior
If the active registry has no image-generation providers and a config is available, provider lookup should fall back to loading plugins from config.
Proposed fix
Remove the getActivePluginRegistryKey() shortcut from image-generation provider resolution and add a regression test covering:
- active registry present
- cache key present
imageGenerationProviders = []
- config provided
- provider lookup falls back to
loadOpenClawPlugins(...)
Summary
image_generatecan fail withNo image-generation provider registered for googleeven when the Google plugin is loaded and configured.Repro
In a runtime where the active plugin registry has a cache key but no
imageGenerationProviders, image generation provider lookup skips plugin reload and returns an empty provider list.Observed symptoms in a live OpenClaw install:
openclaw plugins listshowedgoogleloaded withimage-generationcapabilityGEMINI_API_KEY/GOOGLE_API_KEYopenclaw models statusshowed Google auth as configuredimage_generatestill failed with:No image-generation provider registered for googleopenai/falRoot cause
src/image-generation/provider-registry.tscurrently does this:That
getActivePluginRegistryKey()condition is too aggressive. If an active registry exists with a key but no image providers, lookup will not fall back toloadOpenClawPlugins({ config: cfg }), so the provider map stays empty.Expected behavior
If the active registry has no image-generation providers and a config is available, provider lookup should fall back to loading plugins from config.
Proposed fix
Remove the
getActivePluginRegistryKey()shortcut from image-generation provider resolution and add a regression test covering:imageGenerationProviders = []loadOpenClawPlugins(...)