FEAT: Support PDF and file inputs via `binary_path` in OpenAI chat and response targets
Les mainteneurs répondent en général sous 2 jours
@PranavD2905 y travaille déjà.
Depuis le 17/10/2026.
Évaluation
- Difficulté
- 4/5
- Temps estimé
- 3-5 jours
- Accessibilité débutants
- 35/100
Piste de recherche
Start from the binary_path message pieces that PDFConverter already produces, then read how OpenAIChatTarget and OpenAIResponseTarget build their request payloads and declare input capabilities. Reading the storage abstraction used to load files is also needed. Done means a request containing a PDF plus text serializes correctly for both targets, passes capability validation, survives history rebuilding, and has regression tests and a documented example.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Is your feature request related to a problem? Please describe.
PyRIT represents files such as PDFs using binary_path, and converters such as PDFConverter already produce this type. However, OpenAIChatTarget and OpenAIResponseTarget do not currently support sending these files as native file inputs.
This leaves a gap between generating a file and submitting it to a model for document-based testing.
Describe the solution you'd like
Support binary_path message pieces in both targets, starting with PDFs and extending to other file formats where the selected API and model support them.
Expected behavior:
- Read the referenced file through PyRIT's storage abstraction and serialize it into the appropriate Chat Completions or Responses API file-input format.
- Support file-only messages, files alongside text instructions, and multiple files where supported by the API.
- Update target input capabilities so requests containing
binary_pathpass validation. - Preserve file inputs when rebuilding conversation history.
- Surface clear errors for unreadable files and unsupported inputs. Document API/model-specific format and size restrictions rather than implying that all binary files are supported.
Include request-serialization and regression tests for both targets, plus a documented example that sends a PDF with a text instruction.
Describe alternatives you've considered, if relevant
Extracting text from the PDF or converting its pages to images can work for some use cases, but changes how the model receives the document and does not exercise native file handling.
Manually building API requests outside these targets requires users to duplicate request-building logic.
Additional context
Related issues #423, #415, and #541 cover file generation and injection. This request covers the separate target responsibility of sending those files to the model.
- Langage dominant
- Python
- Étoiles
- 4.7k
- Forks
- 1k
- Merge moyen
- 2 j 2 h
- PR mergées (30 j)
- 439
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de microsoft/PyRIT
-
BUG: LLMGenericTextConverter identifier changes between processes for set-valued template parametersOuverteBug: triage
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
Les mainteneurs répondent en général sous 2 jours
-
Bug: triage
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 2 jours
-
Description-only preset edits split comma-containing exact goals into separate goalsPeut-être pris @MRX-72 l’a pris il y a 1 jour. Ouvertehelp wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 2 jours
-
GUI rejects valid empty-string SearchReplaceConverter settings, preventing deletion convertersPeut-être pris @Darshika140 l’a pris aujourd’hui. Ouvertehelp wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
microsoft/PyRIT#3749 · 3 commentaires · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
HTML scenario export replaces an intentionally empty converted message with the original textPeut-être pris @VISHNU0906 l’a pris il y a 1 jour. Ouvertehelp wanted
Difficulté 2/5 1-3 heures Accessibilité débutants 77/100
microsoft/PyRIT#3741 · 1 commentaire · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de microsoft/PyRIT
Issues similaires
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
earthtojake/text-to-cad#758 ·
Les mainteneurs répondent en général sous 1 jour
-
domain:upgrades enhancement needs-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 66/100
gke-labs/kube-agents#4634 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
agardnerIT/opamp-server-py#116 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
Les mainteneurs répondent en général sous 1 jour
-
enhancement good first issue
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
elviskahoro/sdk-python-attio#144 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour