Add ranked AI catalog mode#562
Open
needforseed1 wants to merge 1 commit into
Open
Conversation
Contributor
PR Guard
Maintainers may still close PRs that do not match project direction or review capacity. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
AI Catalog previously translated subjective prompts into provider discover filters, so prompts like "best sci-fi shows of all time" could collapse into the same deterministic TMDB/Simkl ordering across AI models. This PR adds an explicit Ranked List mode that asks the AI for an ordered title list, resolves titles to TMDB/Stremio IDs, stores that order, and serves it as ai.list.* catalogs. Existing Auto/provider-filter behavior remains unchanged.
Linked issue
Closes #563
Type of change
Why this approach
The existing provider-filter flow is still the right behavior for objective catalog prompts such as release windows, genres, providers, languages, and popularity/rating sorts. Subjective prompts need a different model because provider discover APIs do not preserve AI ranking intent.
A separate Ranked List mode keeps the existing Auto behavior stable while adding an opt-in curated-list path. The backend resolves AI-returned titles through TMDB before storing them, so runtime catalog serving uses stable metadata IDs instead of re-querying the AI. The tradeoff is that ranked mode requires TMDB for title resolution and may omit titles that cannot be resolved confidently.
Testing
Validated locally and in Docker with the patched image.
Commands run:
Also smoke-tested the built Docker image locally by creating ranked AI catalogs and confirming the deployed container was healthy.
Documentation
The UI exposes the feature through the AI Catalog mode dropdown and labels generated catalogs as AI LIST.
Author checklist
AI usage disclosure
If AI tools were used, briefly describe how:
Human idea and validation. GPT-5.5-assisted implementation.