Skip to content

feat(huggingface): support reasoning tokens - #558

Merged
njbrake merged 3 commits into
mainfrom
284-huggingface-completion-api-reasoning-support
Oct 17, 2025
Merged

njbrake merged 3 commits into
mainfrom
284-huggingface-completion-api-reasoning-support

Conversation

@njbrake

@njbrake njbrake commented Oct 17, 2025 •

Copy link
Copy Markdown
Contributor

Description

PR Type

🆕 New Feature ## Relevant issues

Checklist

  • I have added unit tests that prove my fix/feature works
  • New and existing tests pass locally
  • Documentation was updated where necessary
  • I have read and followed the contribution guidelines```

@njbrake njbrake linked an issue Oct 17, 2025 that may be closed by this pull request
@njbrake

njbrake commented Oct 17, 2025

Copy link
Copy Markdown
Contributor Author

@codecov

codecov Bot commented Oct 17, 2025 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 79.16667% with 25 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/any_llm/providers/huggingface/utils.py 65.90% 7 Missing and 8 partials ⚠️
src/any_llm/providers/huggingface/huggingface.py 86.30% 6 Missing and 4 partials ⚠️
Files with missing lines Coverage Δ
src/any_llm/constants.py 100.00% <100.00%> (ø)
src/any_llm/providers/openai/utils.py 55.26% <100.00%> (+1.20%) ⬆️
src/any_llm/providers/huggingface/huggingface.py 82.78% <86.30%> (+11.53%) ⬆️
src/any_llm/providers/huggingface/utils.py 71.76% <65.90%> (+31.33%) ⬆️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

"chain_of_thought",
]
possible_fields = REASONING_FIELD_NAMES
value: Any | None = None

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Note that the only change here is that now "think" is also a possible field name. It seemed reasonable to me to add it.

@njbrake
njbrake merged commit 8d06bf3 into main Oct 17, 2025
10 checks passed
@njbrake
njbrake deleted the 284-huggingface-completion-api-reasoning-support branch October 17, 2025 14:58
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.

Huggingface Completion API Reasoning Support

1 participant