Summary: We are developing an application by coding and previewing a single-page web app directly within the Gemini web app’s Canvas feature. During this process, we have identified a critical discrepancy. The officially documented Gemini preview model (gemini-2.5-flash-preview-09-2025) fails with a 403 Forbidden error, while an older, undocumented version (gemini-2.5-flash-preview-05-20) works successfully. This inconsistency is causing confusion and development roadblocks.
The Core Issue: Our investigation has revealed a direct conflict between the public documentation and the behavior of the Canvas development environment:
-
The Official Documentation: The Google AI for Developers site specifies
gemini-2.5-flash-preview-09-2025as the correct model for API calls. You can find the reference here: https://ai.google.dev/gemini-api/docs/models#gemini-2.5-flash-preview -
The Canvas Environment: In practice, using the officially documented
09-2025model results in a403 Forbiddenerror. However, API calls succeed when we use the oldergemini-2.5-flash-preview-05-20model.
Our Question: Could you please clarify this discrepancy? Is the requirement to use the older 05-20 model in the Canvas environment intentional? If so, we recommend updating the developer resources to reflect this, to avoid confusion for others. Any information on when the Canvas will support the officially documented 09-2025 model would also be greatly appreciated.