Skip to content

[InferenceSnippets] Document model:provider syntax #1636

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 17, 2025

Conversation

Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Jul 17, 2025

This PR updates the inference snippets to take showcase https://router.huggingface.co/v1 "auto" route + the new syntax to select a model+provider e.g. model="meta-llama/Llama-3.1-8B-Instruct:together".

Many details to take into account but I reviewed all the examples one by one and I think they're good now. Once merged, we won't need any modification in moon-landing code.

Copy link
Member

@julien-c julien-c left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

conceptual lgtm

@Wauplin
Copy link
Contributor Author

Wauplin commented Jul 17, 2025

(merging as failing test is unrelated)

@Wauplin Wauplin merged commit de3c8c8 into main Jul 17, 2025
4 of 5 checks passed
@Wauplin Wauplin deleted the document-auto-path-in-snippets branch July 17, 2025 11:24
Wauplin added a commit that referenced this pull request Jul 17, 2025
follow-up after #1636

Better to review commits individually. This PR:
- adds a snippet using JS fetch for conversational model
(e2f6c6f)
- adds tests for existing snippets using "auto" provider
(conversational)
(4356373)
- adds snippets for "auto" + "conversational" for cURL, Python openai,
Python requests, JS openai, JS requests.
(33d3094).
Before that, only snippets for huggingface_hub/huggingface.js were
displayed.
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.

3 participants