chore(provider): add Google AI Studio support#2805
chore(provider): add Google AI Studio support#2805amitksingh1490 merged 4 commits intotailcallhq:mainfrom
Conversation
Register google_ai_studio as a first-class provider using the OpenAI-compatible endpoint at generativelanguage.googleapis.com, allowing users to authenticate with GEMINI_API_KEY and access Gemini models directly without an OpenRouter intermediary. Closes tailcallhq#703
| "id": "google_ai_studio", | ||
| "api_key_vars": "GEMINI_API_KEY", | ||
| "url_param_vars": [], | ||
| "response_type": "OpenAI", |
There was a problem hiding this comment.
| "response_type": "OpenAI", | |
| "response_type": "Google", |
| "api_key_vars": "GEMINI_API_KEY", | ||
| "url_param_vars": [], | ||
| "response_type": "OpenAI", | ||
| "url": "https://generativelanguage.googleapis.com/v1beta/openai/chat/completions", |
There was a problem hiding this comment.
use this url https://generativelanguage.googleapis.com/v1beta/models/gemini-3-flash-preview:generateContent
refer vertex_ai
|
We have optimised the google response type for google models it will give you better & faster results |
|
I could not find any documentation on how to configure Gemini 3.1 models in |
Gemini 3.1 models don't require any special
Alternatively, you can set it in your [session]
provider_id = "google_ai_studio"
model_id = "gemini-3.1-pro-preview"
|
|
|
Seems to be weird behaviour coming from a previously configured Bedrock provider. After a successful login, forge tries to fetch models from all configured providers, and if Bedrock has stale/invalid credentials, it throws that error. You can fix it by logging out of Bedrock: Then retry |
|
That worked, which is weird because I have never used bedrock. Looks like additional error handling would help users. Thanks! |
|
No worries! Yeah that's definitely a bug in how forge handles multiple configured providers. I just submitted a fix for it in #2936. Thanks for identifying it, that helped track down the root cause. |

Add Google AI Studio as a first-class provider, giving users direct access to Gemini models using their
GEMINI_API_KEYwithout routing through OpenRouter.Changes
Provider registration (
provider.json):google_ai_studioentry using the native Google API endpoint (https://generativelanguage.googleapis.com/v1beta)GEMINI_API_KEY(standard API key flow)response_type: "Google"to use the native Google response format rather than the OpenAI-compatible shimDomain registration (
provider.rs):ProviderId::GOOGLE_AI_STUDIOconstantall_built_in()list"google_ai_studio"→"GoogleAIStudio")FromStrparsing for the"google_ai_studio"stringFromStrparsingTesting