Skip to content
Source
Sign inSign up
TanStack/schemas

Keep the Hugging Face models poll going when the chat guide drops its recommended models #674

Mergedtombeckenhammerged 1 commit intomain fromrefs/pull/674/headmerged by tombeckenham View on GitHub

tombeckenhamcommented

Fixes #673

The Hugging Face models poll died on huggingface: native recommendation section missing after the chat guide dropped id="recommended-models". listModels loaded that page outside tryDocs, so one docs change failed the whole listing.

The guide load now goes through tryDocs. The parser still throws when the section is missing. That failure is reported in docsFailures, every row is marked reasoning: unavailable (the stored reasoning object stays), and the router listing still writes. Checked the live guide, the Inference Providers index, and the Hub API on 2026-11-17: none of them name which hosted models reason. reasoning_effort says support is provider and model-dependent. The three models the old section declared are recorded as source-silent in docs/source-silent/huggingface.md.

A page with no recommended-models section still lists models and reports the docs failure (huggingface.test.ts).

Summary by CodeRabbit

  • Bug Fixes

    • Model listings remain available when the Hugging Face chat guide is missing or invalid, with existing pricing information preserved.
    • Reasoning availability is reported as unavailable when the guide cannot be read, rather than advertising unsupported reasoning capabilities.
    • Documentation lookup failures are recorded and surfaced alongside other catalog documentation issues.
  • Documentation

    • Updated reasoning guidance for selected models to clarify that the chat guide does not declare model-specific reasoning controls.
    1. tombeckenham linked this to fix #673

    2. tanstack-source added labelsbug

    3. ⚠️ No Changeset found

      Latest commit: ab3d69106543313f7bbbbf8104c4a049cc31c4fc

      Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

      This PR includes no changesets

      When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

      Click here to learn what changesets are, and how to add one.

      Click here if you're a maintainer who wants to add a changeset to this PR

    4. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Explain Change →

      No actionable comments were generated in the recent review.

      Walkthrough

      Hugging Face model listing now reports failures from the reasoning guide and continues to return catalog models when the guide is unavailable. In that case, reasoning is marked unavailable. Tests and documentation reflect these changes.

      Changes: Hugging Face model listing

      Layer / File(s)Summary
      Reasoning guide failure handling
      src/server/providers/adapters/huggingface.ts, src/server/providers/adapters/huggingface.test.ts, docs/source-silent/huggingface.md
      The listing reports guide and catalog documentation failures together. If the guide is unavailable or invalid, it returns catalog models with reasoning marked unavailable. Tests cover a missing Recommended models section. Documentation updates the model-specific reasoning claims.

      Estimated code review effort: 2 (Simple) | ~12 minutes

      Change: Bug fix · Severity of issue fixed: Medium

      Merge Risk: Minimal · up to ab3d6

      The Hugging Face poll now keeps listing models when the chat guide no longer has its recommended-models section. It records the failure in the docs report and marks reasoning unavailable, keeping the stored values. The change is narrow and tested, and no merge-blocking risk remains.

      Pre-merge checks: Passed 4

      Check nameStatusExplanation
      Description CheckPassedCheck skipped - CodeRabbit’s high-level summary is enabled.
      Title checkPassedThe title names the main change: the Hugging Face models poll keeps running when the chat guide no longer lists recommended models. The changeset wraps the guide load in tryDocs, records the missing-s…
      Linked Issues checkPassed[#673] Coding requirements, checked against the whole-PR diff from merge base to head:

      1. Guide load wrapped in tryDocs. listModels in huggingface.ts now calls `tryDocs(guide, HF_CHAT_GUIDE, ..…
      Out of Scope Changes checkPassedAll changed files relate to #673. huggingface.ts contains the tryDocs wrapper, the docsFailures merge, and the unavailable-reasoning fallback. huggingface.test.ts tests the new failure path. `…
      Full details: Title check

      Explanation

      The title names the main change: the Hugging Face models poll keeps running when the chat guide no longer lists recommended models. The changeset wraps the guide load in tryDocs, records the missing-section failure in docsFailures, marks reasoning unavailable, and adds a test for a page without the section. The title is short, specific, and uses no vague terms.

      Full details: Linked Issues check

      Explanation

      [#673] Coding requirements, checked against the whole-PR diff from merge base to head:

      1. Guide load wrapped in tryDocs. listModels in huggingface.ts now calls tryDocs(guide, HF_CHAT_GUIDE, ...) around cached(...). The parseHfHostedReasoning throw is caught there. The catalog fetch and parseHuggingFaceModels stay outside this wrapper.
      2. Failure reporting. The failure is merged into docsFailures (failed, skipped, and first capped at 5). When the guide is unavailable, every model gets absent.reasoning set through unavailable('reasoning'). The existing reasoning object is kept by spreading model.absent.
      3. Source check. docs/source-silent/huggingface.md lists the three previously declared models with #673 and the checked date 2026-11-17. The claim that the live guide, the Inference Providers index, and the Hub API omit per-model reasoning data is author-reported. I could not verify those live pages, so this part rests on the PR description.
      4. Parser stays fail-closed. native-host-reasoning.ts is not in the diff, so the parser behavior is unchanged.
      5. Test. huggingface.test.ts adds a case with a guide that has no recommended-models section. It asserts all fixture models are listed, docsFailures.failed is 1 with the missing-section error, reasoning is unavailable, reasoning is not advertised, and pricing stays readable.

      No unmet coding requirement is found.

      Full details: Out of Scope Changes check

      Explanation

      All changed files relate to #673. huggingface.ts contains the tryDocs wrapper, the docsFailures merge, and the unavailable-reasoning fallback. huggingface.test.ts tests the new failure path. docs/source-silent/huggingface.md records the source-silent facts required by #673. The cachedDocs import was replaced by the unavailable and tryDocs imports used by the new code. No unrelated change was found in the inspected diffs.

      Finishing Touches

      Generate unit tests (beta)

      • Commit to this branch
      • Create a new PR
      • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

      Warning

      Some tools did not complete. Review the errors below.

      LanguageTool

      docs/source-silent/huggingface.md

      LanguageTool could not check every text chunk; analysis is incomplete

      Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

      Share

      Recent review info

      Run configuration

      • Source mode: Auto
      • Repository: Unavailable
      • Branch: Unavailable
      • File: No configuration file from this repository applied
      • Commit: Unavailable
      • Layers: defaults
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 940b40aa-7aeb-4837-a73a-0da169def1fd
      Commits

      Reviewing files that changed from the base of the PR and between 4ed228c59ded3a66339fad332f7e43faddf3f2d9 and ab3d69106543313f7bbbbf8104c4a049cc31c4fc.

      Files selected for processing: 3

      • docs/source-silent/huggingface.md
      • src/server/providers/adapters/huggingface.test.ts
      • src/server/providers/adapters/huggingface.ts

      Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

    5. tombeckenham merged this157715a

    6. tombeckenham closed this

Sign in to join this conversation.