Skip to content

chore: reduce OpenAI vision costs for receipts - #538

Open
marioommg wants to merge 1 commit into
spliit-app:mainfrom
marioommg:chore/economize-openai-vision
Open

chore: reduce OpenAI vision costs for receipts#538
marioommg wants to merge 1 commit into
spliit-app:mainfrom
marioommg:chore/economize-openai-vision

Conversation

@marioommg

Copy link
Copy Markdown

Summary

  • Compress/downscale receipt images in the browser before S3 upload to cut vision tokens and bandwidth.
  • Send receipt images with detail: "low" and cap max_tokens on extraction responses.
  • Switch title→category extraction from gpt-3.5-turbo to gpt-5-nano.
  • Update README: document GPT-5 nano (no longer GPT-4 Vision) and the cost-saving behavior.

Test plan

  • Enable NEXT_PUBLIC_ENABLE_RECEIPT_EXTRACT and upload a receipt photo; confirm amount/date/title/category still extract correctly.
  • Upload a large photo (>2MB / high res) and confirm it is compressed before upload (smaller file / JPEG).
  • Enable NEXT_PUBLIC_ENABLE_CATEGORY_EXTRACT and verify category suggestion from title still works.
  • Confirm README describes GPT-5 nano and cost notes accurately.

Use low image detail, compress uploads client-side, and switch category extraction to gpt-5-nano; update README accordingly.

Co-authored-by: Cursor <cursoragent@cursor.com>
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.

1 participant