Skip to content

Conversation

@AsadAhmedSaiyed
Copy link
Contributor

Fixes #146

  • Description:
    This PR fixes the issue where receipt processing using the Gemini API failed with a 404 error when using the gemini-1.5-flash-latest model.

  • Problem:
    The previous implementation used the old SDK @google/generative-ai, which defaults to the v1beta API. This caused errors like "gemini-1.5-latest model not found".

  • Solution:

  1. Migrated the project to the latest @google/genai SDK which uses the correct /v1 endpoint.
  2. Updated imports and client initialization according to the Gemini API Quickstart Docs
  3. Updated all generateContent() calls to use the new SDK.
  4. Ensured receipt uploads now successfully generate AI-extracted data.
  • Testing:
  1. npm test gives positive output.
  2. Receipt processing now works without errors.
  • Impact:
  1. Fixes the 404 error and ensures full compatibility with Gemini 1.5 Flash.
  2. Receipt processing and transaction creation are now reliable.

@netlify
Copy link

netlify bot commented Oct 21, 2025

Deploy Preview for paisable ready!

Name Link
🔨 Latest commit 9fa102e
🔍 Latest deploy log https://app.netlify.com/projects/paisable/deploys/68f7836c7af89900081ffa45
😎 Deploy Preview https://deploy-preview-151--paisable.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
Lighthouse
Lighthouse
1 paths audited
Performance: 94
Accessibility: 100
Best Practices: 100
SEO: 91
PWA: 80
View the detailed breakdown and full score reports

To edit notification comments on pull requests, go to your Netlify project configuration.

Copy link
Member

@archa8 archa8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Issue is fixed. LGTM!

@archa8 archa8 merged commit bd888cb into Code-A2Z:master Oct 21, 2025
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: models/gemini-1.5-flash-latest not found for API version v1beta

2 participants