Files
openclaw/src/agents/tools
JC 85ded4d444 pdf: add Codex instructions for extraction fallback (#51329)
* Fix Codex PDF extraction fallback missing instructions

- add a Codex-specific systemPrompt on the PDF extraction fallback path
- keep non-Codex PDF fallback requests unchanged
- add regression coverage proving openai-codex-responses requests include instructions for PDF tool calls

* test: cover Codex text-only extraction fallback

- add regression coverage for the branch where PDF extraction includes images
  but the selected Codex model only accepts text input
- assert Codex-specific extraction instructions are still attached in that path

* test: fix extracted image mock shape

- add the required `type: "image"` field to the text-only fallback regression mock
- keep the new Codex coverage test aligned with PdfExtractedImage

* test: align Codex PDF fallback tests

* docs(changelog): note PDF Codex fallback fix

---------

Co-authored-by: Dr JCai <jingxiao.cai@gmail.com>
Co-authored-by: anyech <8743351+anyech@users.noreply.github.com>
2026-05-06 09:34:42 +01:00
..