* Add file upload API with parser selection and conversion hooks - Add FileRetainRequest.parser field for per-request parser selection - Add FileConvertResult dataclass and on_file_convert_complete extension hook - Fire hook after file-to-markdown conversion with output text for metering - Fix obstore.Bytes incompatibility with httpx in Iris parser (GCS returns obstore.Bytes instead of plain bytes) - Export new types from extensions __init__ * remove parser field from FileRetainRequest API Parser selection remains server-side only via HINDSIGHT_API_FILE_PARSER config. * test: add tests for on_file_convert_complete extension hook Verifies that the hook is called with correct parameters on success, called once per file for multi-file uploads, and not called when file conversion fails. * test: verify tenant_id propagation to on_file_convert_complete hook --------- Co-authored-by: Nicolò Boschi <boschi1997@gmail.com> |
||
|---|---|---|
| .. | ||
| builtin | ||
| __init__.py | ||
| base.py | ||
| context.py | ||
| http.py | ||
| loader.py | ||
| mcp.py | ||
| operation_validator.py | ||
| tenant.py | ||