Skip to content

Add ranked AI catalog mode#562

Open
needforseed1 wants to merge 1 commit into
cedya77:devfrom
needforseed1:feature/ai-ranked-catalogs
Open

Add ranked AI catalog mode#562
needforseed1 wants to merge 1 commit into
cedya77:devfrom
needforseed1:feature/ai-ranked-catalogs

Conversation

@needforseed1

@needforseed1 needforseed1 commented Jul 7, 2026

Copy link
Copy Markdown

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

  • Bug fix
  • New feature
  • Refactor
  • Tests only
  • Documentation only
  • CI / tooling

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.

  • I ran existing tests relevant to this change.
  • I added or updated tests where needed.
  • No tests were needed, and I explained why.

Commands run:

  • npm run build
  • npm run build:backend
  • node --check addon/index.js
  • git diff --check

Also smoke-tested the built Docker image locally by creating ranked AI catalogs and confirming the deployed container was healthy.

Documentation

  • I updated documentation or comments where needed.
  • No documentation updates were needed.

The UI exposes the feature through the AI Catalog mode dropdown and labels generated catalogs as AI LIST.

Author checklist

  • This PR is focused on one concern.
  • This PR is reasonably small and reviewable.
  • I read and followed CONTRIBUTING.md.
  • I can explain every code change in this PR.
  • I will respond to review feedback myself.

AI usage disclosure

  • No AI tools were used.
  • AI tools were used for part of this PR, and I personally reviewed and verified all changes.

If AI tools were used, briefly describe how:

Human idea and validation. GPT-5.5-assisted implementation.

@github-actions

github-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

PR Guard

  • All automated intake checks passed.

Maintainers may still close PRs that do not match project direction or review capacity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

AI catalog subjective prompts should support ranked lists

1 participant