You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit was created on GitHub.com and signed with GitHub’s verified signature.
feat: fall back to a minimal supported file types set (#225)
## Summary
- `get_supported_file_types()` takes an optional `capabilities` list
(`ParserCapability.ASR`, `ParserCapability.VIDEO_LLM`), defaulting to
empty.
- On network failure or a missing endpoint, the local set is built from
that list: empty omits audio and video; known backends include the
formats they unlock.
- Check a file with
`get_supported_file_types(...).supports(filename=...)`.
## Test plan
- [ ] `poetry run pytest tests/test_content_types.py
tests/test_config_models.py tests/test_compass_client.py -k
supported_file`
- [ ] Confirm a 404 or timeout returns the empty-capability set (no
audio/video)
- [ ] Confirm `capabilities=[ParserCapability.ASR]` on fallback includes
mp3 but not mp4
- [ ] Confirm `fallback_on_failure=False` still raises on 404, and 401
is not swallowed
---------
Co-authored-by: Cursor <cursoragent@cursor.com>