cant get gemini-2.0-flash-exp with AI GATEWAY
Existing documentation URL(s)
https://developers.cloudflare.com/ai-gateway/providers/google-ai-studio/
ERROR 404 not found when use: models/gemini-2.0-flash-exp https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-ai-studio/v1/models/{model}:{generative_ai_rest_resource}
What changes are you suggesting?
i wanna know how to use gemini-2.0
Additional information
No response
Hey @Vikinghyx gemini-2.0-flash-exp is marked as beta in google studio, so you need to replace the v1/models with v1beta/models
The final url should look like this: https://gateway.ai.cloudflare.com/v1/{account_id}/{gateway_id}/google-ai-studio/v1beta/models/{model}:{generative_ai_rest_resource}
it works ! thanks
so you need to replace the
v1/modelswithv1beta/models
https://ai.google.dev/gemini-api/docs/api-versions
https://github.com/cloudflare/ai/blob/68aaf47e2f456b4976c6ec9ef79af1682650e03c/packages/ai-gateway-provider/test/endpoint.test.ts#L23