FEAT: Support PDF and file inputs via `binary_path` in OpenAI chat and response targets
Los mantenedores suelen responder en 2 días
@PranavD2905 ya está trabajando en esto.
Desde el 16/10/2026.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- Python
- Estrellas
- 4.6k
- Forks
- 944
- Merge medio
- 2 d 18 h
- PR fusionados (30 d)
- 369
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Sin guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de microsoft/PyRIT
-
BUG: label queries only return the final conversation of an attackPosiblemente ocupada @u7k4rs6 la tomó hace 3 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
microsoft/PyRIT#3095 · 4 comentarios · 1 asignado ·
Los mantenedores suelen responder en 2 días
-
BUG Configuration keeps runtime-status errors after polling recoversPosiblemente ocupada @joeyvictorino la tomó hace 7 días. AbiertoBug: triage GUI help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
microsoft/PyRIT#2868 · 6 comentarios ·
Los mantenedores suelen responder en 2 días
-
feature-request
Dificultad 5/5 Más de una semana Aptitud para principiantes 18/100
Los mantenedores suelen responder en 2 días
-
FEAT: Add supports_prefill capability and PrefillAttack strategyPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
Los mantenedores suelen responder en 2 días
-
Dificultad 4/5 3-5 días Aptitud para principiantes 34/100
Los mantenedores suelen responder en 2 días
Todos los issues de microsoft/PyRIT
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 77/100
lidofinance/diffyscan#239 ·
Los mantenedores suelen responder en 1 día
-
docs: the dev-setup table and AGENTS.md name the reviewed_by guard that CI's Changelog job runsAbiertoarea: tools documentation good first issue ready for a contributor
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
eyalgolan/statecraft-israel#873 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
GET rooms API returns 500 due to nonexistent Room.is_active attributePosiblemente ocupada @Mars-60 la tomó hoy. Abiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Add cover art to song rowsAbiertoenhancement
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 5 días
-
Harmony OPeNDAP SubSetter (HOSS) Geographic production rssmif16d 7 XYZ_PROV
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
nasa/harmony-autotester#341 ·