* feat: allow per-request file parser selection with fallback chains Clients can now specify which parser(s) to use when calling the file retain endpoint, instead of being locked to the server-side default. Changes: - `parser` field added to `FileRetainRequest` (request-level default) and `FileRetainMetadata` (per-file override); accepts a single name or an ordered fallback chain (list) - Resolution priority: per-file > request-level > server default - `HINDSIGHT_API_FILE_PARSER` now accepts a comma-separated fallback chain (e.g. `iris,markitdown`); fully backward-compatible - New `HINDSIGHT_API_FILE_PARSER_ALLOWLIST` env var restricts which parsers clients may request (defaults to all registered parsers) - Invalid/disallowed parser names are rejected with HTTP 400 - `FileParserRegistry.convert_with_fallback()` tries each parser in order, falling back on UnsupportedFileTypeError, empty content, or any other error - Worker updated to use the fallback chain stored per-task - OpenAPI spec and all generated clients regenerated * fix: handle on_file_convert_complete hook and rebase onto main - Return ConvertResult dataclass from convert_with_fallback() instead of a plain str, carrying both the content and the winning parser name - Use winning_parser_name in the on_file_convert_complete hook so parser_name reflects the parser that actually succeeded, not the chain - Update all test calls to submit_async_file_retain() to use the new per-item parser field instead of the removed top-level parser= kwarg * docs: document HINDSIGHT_API_FILE_PARSER fallback chain and ALLOWLIST |
||
|---|---|---|
| .. | ||
| .openapi-generator | ||
| hindsight_client | ||
| hindsight_client_api | ||
| tests | ||
| .openapi-generator-ignore | ||
| openapi-generator-config.yaml | ||
| pyproject.toml | ||
| README.md | ||