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.

CommentFileSizeAuthor
#2 expectation-failed-3583566-2.patch466 bytescameron prince
Command icon 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

cameron prince created an issue. See original summary.

cameron prince’s picture

Issue summary: View changes
StatusFileSize
new466 bytes
dmundra’s picture

Status: Active » Needs work

Hey @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

dmundra’s picture

Status: Needs work » Active

Okay 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.

dmundra’s picture

Status: Active » Reviewed & tested by the community

Patched worked with the larger file test.

aolivera’s picture

Status: Reviewed & tested by the community » Fixed

Thanks @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.

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.