Problem/Motivation
It appears Google implemented a network change related to the expect header. Submissions to the chatbot including images began failing this morning with:
417 Expectation Failed response:
<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"/><title>Sorry...</title><style> body { fo (truncated...)
Proposed resolution
Add 'expect' => FALSE, to the request options array.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | expectation-failed-3583566-2.patch | 466 bytes | cameron prince |
Issue fork ai_provider_google_vertex-3583566
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
cameron prince commentedComment #3
dmundraHey @cameron prince can you create a MR on this and also steps to recreate it? I tested it with /admin/config/ai/explorers/chat_generator and a tiny image and I got a response from the Gemini 2.5 Flash model
Comment #4
dmundraOkay I was able to recreate the 417 Expectation Failed with a 2.2 MB file and using the Chat Generation Explorer (/admin/config/ai/explorers/chat_generator). Trying the patch now.
Comment #5
dmundraPatched worked with the larger file test.
Comment #7
aolivera commentedThanks @cameron_prince for reporting this and submitting the fix, and @dmundra for testing and confirming the patch resolves the 417 error with larger image files.
Merged MR !22 into 2.x.