Commit ba108d6
Skip provider/task combos with no @huggingface/inference snippet helper
The inference-providers doc build prerenders an <InferenceSnippet> for every
(provider, task) section. The doc-builder generates those snippets via
@huggingface/inference's getProviderHelper(provider, task), which throws an
InferenceClientInputError when the provider has no helper for that task. The
uncaught error surfaces as a SvelteKit 500 and fails the whole build.
This happens whenever a provider's partner API advertises a live model for a
task that @huggingface/inference doesn't (yet) support as a snippet, e.g.
`together` + `automatic-speech-recognition` (added in #2507), which has been
breaking the inference-providers doc build on main since 2026-05-29.
Guard generate.ts so it never emits such a section: mirror the doc-builder's
helper lookup (resolving conversational text-generation / image-text-to-text to
the "conversational" task) and skip any combo getProviderHelper can't handle.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent ce1364d commit ba108d6
1 file changed
Lines changed: 23 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
478 | 478 | | |
479 | 479 | | |
480 | 480 | | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
481 | 494 | | |
482 | 495 | | |
483 | 496 | | |
| |||
498 | 511 | | |
499 | 512 | | |
500 | 513 | | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
501 | 517 | | |
502 | 518 | | |
503 | 519 | | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
504 | 526 | | |
505 | 527 | | |
506 | 528 | | |
| |||
0 commit comments