test(openai): point image extra_headers coverage at with_raw_response

Main now reads provider headers off the raw response, so the proxy
credential cases mock that call and pass a real ImageResponse.

Co-authored-by: Zsanz3 <Zsanz3@users.noreply.github.com>
This commit is contained in:
Cursor Agent 2026-10-26 13:37:12 +00:00
parent f1c047d082
commit a3da59f2be
No known key found for this signature in database

View file

@ -275,7 +275,7 @@ class TestImageGenerationExtraHeaders:
await openai_chat_completions.aimage_generation(
prompt="A white cat",
data={"model": "gpt-image-2", "prompt": "A white cat", **optional_params},
model_response=MagicMock(),
model_response=ImageResponse(),
timeout=60.0,
logging_obj=mock_logging_obj,
api_key="test-key",