Repository navigation
Conversation
|
Opus 5.5 Max wrote this: |
|
Opus 5.5 Max rebase, fixes and tests: Thanks @strzibny! Rebased onto main 993b281 with 4 fixes on top: Your commit, now 5ce3edd, keeps your authorship and changed only where main had moved on: the upload shares main's response handling (
Questions:
Whichever of this and #16 merges second won't build until Label GPT-6 Astra Max advised. |
image and search --image built their client with api.New, so --timeout and SERPAPI_TIMEOUT didn't apply to uploads and tests couldn't point them at a fake API, and they read os.Stdin rather than the command's stdin. They now use newClient and cmd.InOrStdin(), as search and login do; of 6 new tests against the fake API, 4 failed before, sending to serpapi.com. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Image API takes up to 500 KB, but image and search --image read the file or stdin whole and uploaded it, empty too, for the API to reject (exit 1). The read now stops one byte past 500 KiB, and an empty or larger image is a usage error, exit 2, before any request: of 5 such cases in the new tests, all 5 were uploaded before, none now. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
image - read stdin with nothing watching for the signal, so Ctrl-C ended it only at the forced exit 3s later, "the output may be cut off". The read now stops on the signal as login's does: exit 130 after 0.0s instead of 3.1s on a terminal. The README says an image given as - reads stdin too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A timed-out upload got the search advice: slow engines such as google_ai_mode, and that the search may still finish, count against your searches and be in the archive. An upload has no engine, search or archive entry, so /image now says only how to retry with a higher --timeout. Searches and every other endpoint keep the message byte for byte. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Nothing else checks that an upload shows up in --debug at all: this asserts it is traced as POST /image with its connection timings, never as a GET, and without the API key.
Documentation: https://serpapi.com/image-api