Skip to content

ci(inference-providers): bump doc-builder pin to InferenceSnippet prerender fix#2531

Merged
hanouticelina merged 3 commits into
mainfrom
bump-doc-builder-inference-snippet-fix
Jun 4, 2026
Merged

ci(inference-providers): bump doc-builder pin to InferenceSnippet prerender fix#2531
hanouticelina merged 3 commits into
mainfrom
bump-doc-builder-inference-snippet-fix

Conversation

@hanouticelina

@hanouticelina hanouticelina commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Why

The inference-providers doc build has been red on main and every PR. Root cause is a @huggingface/inference version skew between the two halves of the pipeline:

  • Generator (CI runs @latest = 4.13.18) → together + automatic-speech-recognition is supported (added in 4.13.16), so it emits that section.
  • doc-builder kit (lockfile-pinned 4.13.15) → that combo is not supported → getInferenceSnippets returns []InferenceSnippet.svelte dereferences clients.length on undefinedTypeError → SvelteKit 500 → build fails on /providers/together.

The hub-docs generator guard (#2527) can't fix this: the generator is ahead of the renderer, so it correctly keeps the section while the renderer crashes. The fix had to be in doc-builder.

What

Bump the pinned doc-builder ref to bcff59f (doc-builder main, including huggingface/doc-builder#791), which defaults clients to [] so the prerender renders an unsupported combo as empty instead of crashing the build. All three inference-providers workflows are moved together to stay in sync:

  • api_inference_build_documentation.yml (main build)
  • api_inference_build_pr_documentation.yml (PR build)
  • api_inference_upload_pr_documentation.yml (upload step)

Verification

Reproduced the exact CI crash locally (docs with the together/ASR section + kit resolving @huggingface/inference@4.13.15):

  • Before the doc-builder fix: TypeError: Cannot read properties of undefined (reading 'length')Error: 500 /providers/together → exit 1.
  • After: build exit 0, providers/together prerenders, no TypeError.

Notes / follow-ups

  • fix(kit): don't crash prerender when a provider/task has no snippet doc-builder#791 is merged; all three workflows pin the resulting main commit bcff59fca682130d2e7271ca8589911b7ac0b8bf.
  • With the fix but the kit still on 4.13.15, the together/ASR section renders as an empty snippet widget. Bumping the kit's @huggingface/inference to a current release (which also moves @huggingface/tasks ^0.20.12^0.21.x) would make it render the actual snippet — a separate maintainer decision.

🤖 Generated with Claude Code

hanouticelina and others added 2 commits June 4, 2026 12:51
…render fix

The inference-providers doc build crashes when a provider/task section has no
snippet in the kit's `@huggingface/inference` (e.g. `together` +
`automatic-speech-recognition`, supported by the generator's 4.13.18 but not the
kit's pinned 4.13.15): the InferenceSnippet component dereferences
`clients.length` on undefined → SvelteKit 500 → build fails on main and every PR.

Bump the pinned doc-builder ref for both build workflows to the fix
(huggingface/doc-builder#791), which defaults `clients` to `[]` so the prerender
no longer crashes on an unsupported combo.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
#791 merged; point both build workflows at the resulting doc-builder main
commit (bcff59f) instead of the fix-branch head.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hanouticelina hanouticelina marked this pull request as ready for review June 4, 2026 11:03
@hanouticelina hanouticelina requested a review from Wauplin June 4, 2026 11:03
Keep all three inference-providers workflows on the same doc-builder main commit.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@hanouticelina hanouticelina merged commit a714d17 into main Jun 4, 2026
1 check passed
@hanouticelina hanouticelina deleted the bump-doc-builder-inference-snippet-fix branch June 4, 2026 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants