-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
Description:
I am trying to run picoclaw on Windows 11 using the Google Gemini API. I have encountered two blocking issues:
Native Gemini Provider: Fails with a 404 error because it targets the deprecated v1main endpoint.
OpenAI Bridge Workaround: Fails with a "no API key configured" error when I try to use the openai provider with generativelanguage.googleapis.com as the base URL, even though the key is correctly defined in config.json.
Steps to Reproduce:
Scenario A: Native Gemini Provider
Configure config.json with provider: "gemini" and model: "gemini-1.5-flash" (or gemini-pro).
Run .\picoclaw.exe gateway.
Send a message via Telegram.
Result: Error 404 "models/gemini-1.5-flash is not found for API version v1main".
Scenario B: OpenAI Provider (Workaround)
Configure config.json with provider: "openai", api_base pointing to Google's OpenAI-compatible endpoint, and model: "gemini-1.5-flash".
Run .\picoclaw.exe gateway.
Result: Immediate crash on startup: Error creating provider: no API key configured for provider (model: gemini-1.5-flash).
Configuration (config.json):
(Note: I have tried api_key, apiKey, and token keys in the JSON, but none are detected).
{
"agents": {
"defaults": {
"workspace": "./workspace",
"provider": "openai",
"model": "gemini-1.5-flash",
"max_tokens": 8192,
"temperature": 0.7
}
},
"providers": {
"openai": {
"api_key": "AIzaSy...",
"api_base": "https://generativelanguage.googleapis.com/v1beta/openai/"
}
},
"channels": {
"telegram": {
"enabled": true,
"token": "YOUR_BOT_TOKEN",
"allow_from": ["YOUR_USER_ID"]
}
},
"gateway": {
"host": "0.0.0.0",
"port": 18790
}
}
Logs / Error Output:
Scenario A (Native Gemini):
API error: [{
"error": {
"code": 404,
"message": "models/gemini-1.5-flash is not found for API version v1main, or is not supported for generateContent...",
"status": "NOT_FOUND"
}
}]
Scenario B (OpenAI Provider):
PS D:\PicoClaw> .\picoclaw-windows-amd64.exe gateway
Error creating provider: no API key configured for provider (model: gemini-1.5-flash)
Environment:
OS: Windows 11
Version: Latest Release (picoclaw-windows-amd64.exe)
Model: Google Gemini 1.5 Flash / Pro
Expected Behavior:
The native Gemini provider should use the current Google API endpoints (v1beta/v1) instead of v1main.
Alternatively, the OpenAI provider should correctly read the API key from config.json even if the model name contains "gemini", allowing us to use Google's OpenAI-compatible endpoint.