fix(api): keep invoice catalog searchable on stream and DATA: URIs - #684
Closed
cursor[bot] wants to merge 2 commits into
Closed
fix(api): keep invoice catalog searchable on stream and DATA: URIs#684cursor[bot] wants to merge 2 commits into
cursor[bot] wants to merge 2 commits into
Conversation
Accept OpenAI text+image_url parts and record a 3NF image catalog (payload / placement / later recognition events) so a PNG under "Please pay invoice 1042" stays findable. Hash inline bytes; do not store raw base64. Grounded in ColPali, LayoutLM, and RFC 2397. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
Accept RFC 2397 case and whitespace, emit placement_id, persist the catalog on streamed runs, and redact credential shapes without hiding invoice numbers or AP mailboxes. Co-authored-by: Seongho Bae <seonghobae@users.noreply.github.com>
seonghobae
marked this pull request as ready for review
August 16, 2026 17:05
seonghobae
enabled auto-merge (squash)
August 16, 2026 17:05
Author
|
Bugbot is not enabled for your account, so this pull request was not reviewed. Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs. |
auto-merge was automatically disabled
August 16, 2026 18:23
Pull request was closed
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Unique slice on protected
main(6841b71..074d051)#663 records a 3NF
image_content_catalogso an invoice PNG stays next toPlease pay invoice 1042. This successor keeps that figure searchable when real clients send it:DATA:IMAGE/PNG;BASE64,...andHTTPS://schemes (RFC 2397 is case-insensitive)placement_idon each JSON placement so it matchesdocs/database_design.sql--state-dbafterstream_routeadjacent_textredacted; invoice numbers and AP emails stay searchablePrefer this PR over #663 for merge (this tip is #663 plus the honesty slice). Do not fold text.format (#666/#681), meaning-unit (#680), or mock-envelope (#679) work here.
Buyer next action
POST
/v1/chat/completionswithstream: trueand a wrappedDATA:image/png;base64,...part underPlease pay invoice 1042 to ap@acme.com. Readorchestration.image_content_catalogon the stop chunk. Confirminvoice 1042andap@acme.comare present, the PNG bytes are not, andplacement_idisimage_placement_0_1.Checks run locally
python3 tests/test_image_catalog_honesty.pypython3 tests/test_image_placement_catalog.pypython3 tests/test_streaming.pypython3 tests/test_true_streaming.pypython3 tests/test_security_hardening.pypython3 tests/test_persistence.pypython3 tests/test_paper_contracts.pypython3 tests/test_api_contract.pypython3 tests/test_conventions.pypython3 tests/test_self_check.pypython3 tests/test_admin_contract.pypython3 tests/test_product_planning_contract.pyIndependent non-author APPROVE required. This automation will not self-approve or merge.
References