-
Notifications
You must be signed in to change notification settings - Fork 4
Description
Description
When running genlayer init and selecting Gemini as the LLM provider, the initialization fails with the following error:
Error: Requested providers '{'geminiai'}' do not match any stored providers.
Please review your stored providers.
This prevents users from using Gemini as their LLM provider in GenLayer.
Root Cause
Provider name mismatch between CLI and backend:
- CLI sends:
geminiai - Database expects:
google
The backend's llm_provider table (populated by database migrations) uses provider = 'google' for Gemini, but the CLI is configured to send geminiai.
Steps to Reproduce
-
Install and set up genlayer-cli:
npm install -g genlayer
-
Run initialization:
genlayer init --numValidators 3
-
When prompted "Select which LLM providers do you want to use:", choose Gemini
-
Enter a valid Gemini API key
-
Error occurs during validator initialization:
Initializing validators... Error: Error: Requested providers '{'geminiai'}' do not match any stored providers.
Expected Behavior
- CLI should successfully create validators with Gemini provider
- Gemini should work as an LLM provider option
Actual Behavior
- Initialization fails immediately after provider selection
- Error message indicates provider name mismatch
Environment
- CLI Version: genlayer@0.32.8
- Localnet Version: v0.65.0
- Docker Images:
yeagerai/simulator-jsonrpc:v0.65.0yeagerai/database-migration:v0.65.0
- OS: Linux (Ubuntu 22.04)
Evidence
Database Query
-- From running postgres container
psql -U postgres -d genlayer_state -c "SELECT provider, model FROM llm_provider;"
id | provider | model
----+-----------+-----------------------------------
1 | heuristai | mistralai/mixtral-8x22b-instruct
2 | heuristai | meta-llama/llama-3.3-70b-instruct
3 | anthropic | claude-3-7-sonnet-20250219
4 | openai | gpt-4o
5 | google | gemini-2.0-flash-lite-001 <-- Backend uses "google"The backend database clearly uses google as the provider name for Gemini.
CLI Behavior
When selecting "Gemini" from the CLI prompt, it appears to send geminiai to the backend RPC endpoint (sim_createRandomValidators), which then fails validation against the database.
Proposed Solution
Update the CLI's provider name mapping from geminiai to google to match the backend's expected value.
Expected change location: Likely in src/commands/init.ts or similar provider configuration file.
// BEFORE
'Gemini': 'geminiai'
// AFTER
'Gemini': 'google'Impact
- Severity: High
- Affected users: Anyone trying to use Gemini as their LLM provider
- Workaround: None (must use OpenAI, Heurist, or other supported providers)
Related Components
genlayer-cli- Frontend (where the fix is needed)genlayer-studio- Backend (already correctly configured withgoogle)- Docker containers:
simulator-jsonrpc,database-migration