feat(huggingface): add text generation provider#183
Merged
Kamilbenkirane merged 3 commits intomainfrom Feb 24, 2026
Merged
Conversation
… router Add HuggingFace as a text generation provider using their inference router at router.huggingface.co, which serves 127+ models across 15 inference providers. Follows the ChatCompletionsClient pattern (same as Groq/DeepSeek). Closes #165 Co-Authored-By: Léo Lejeune <61250444+Leo-le-jeune@users.noreply.github.com>
Code reviewNo issues found. Checked for bugs and CLAUDE.md compliance. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
router.huggingface.co)ChatCompletionsClientpattern (same as Groq/DeepSeek)HUGGINGFACE_TOKEN→HF_TOKENto match HuggingFace's official env varQwen/Qwen3-4B-Instruct-2507,google/gemma-3n-E4B-it)Changes
New files (11): Provider layer (
src/celeste/providers/huggingface/) + modality layer (src/celeste/modalities/text/providers/huggingface/)Modified files (5):
credentials.py,.env.example,providers/__init__.py, textproviders/__init__.py, textmodels.pyTest plan
test_stream_generate[huggingface-Qwen/Qwen3-4B-Instruct-2507]passedtest_stream_analyze[huggingface-google/gemma-3n-E4B-it]passed (vision)MiniMaxAI/MiniMax-M2.5:novita— text generation worksopenai/gpt-oss-120b:cerebras— text generation worksQwen/Qwen2.5-72B-Instruct— text generation works/v1/modelsendpoint returns 127 models (98 text, 29 vision)Closes #165
@Leo-le-jeune ready for review 👀