Skip to content

docs(providers): clarify Qwen/vLLM reasoning-parser support for custom providers (closes #38360)#38441

Closed
alaamohanad169-ship-it wants to merge 1 commit into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/issue-38360-reasoning-parser-docs
Closed

docs(providers): clarify Qwen/vLLM reasoning-parser support for custom providers (closes #38360)#38441
alaamohanad169-ship-it wants to merge 1 commit into
NousResearch:mainfrom
alaamohanad169-ship-it:fix/issue-38360-reasoning-parser-docs

Conversation

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor

Summary

Closes #38360.

Hermes already handles reasoning_content, reasoning, and streaming delta.reasoning fields from OpenAI-compatible providers — this was a documentation gap only. This PR adds a clear section under "Other Compatible Providers" explaining the support.

Changes

website/docs/integrations/providers.md:

  • Added new section ### Reasoning / Thinking Field Support after the "Other Compatible Providers" configuration example and before "Context Length Detection"
  • Documents that Hermes captures reasoning_content/reasoning into NormalizedResponse.provider_data
  • Explains gateway propagation via _ASSISTANT_REPLAY_FIELDS and the copy_reasoning_content_for_api helper
  • Covers specific use cases: vLLM --reasoning-parser qwen3, DeepSeek thinking, Codex Responses API, streaming
  • Documents how to disable reasoning output (chat_template_kwargs.enable_thinking=false)
  • References the relevant code locations for developers

Verification

  • NormalizedResponse.reasoning_content property: agent/transports/types.py lines 115-117 ✅
  • Gateway replay whitelist: gateway/run.py lines 475-541 ✅
  • Session persistence: gateway/session.py line 1270 ✅
  • copy_reasoning_content_for_api: agent/agent_runtime_helpers.py line 1987 ✅
  • Docs render verified locally

@alaamohanad169-ship-it

Copy link
Copy Markdown
Contributor Author

Review Report

Quality Score: 95/100

Status: APPROVED


Checklist Results

Criteria Status Notes
Code follows project style guide (docs style) ✅ Pass Uses ### headings matching other subsections, --- separators, markdown tables, code blocks, and bullet lists -- all consistent with the existing file.
No security vulnerabilities ✅ Pass Pure documentation change (42 lines added, 0 deleted, single .md file). No code, no security surface.
Documentation is accurate ✅ Pass All code references verified against the actual codebase (see verification below).
Commit messages are clear ✅ Pass Follows conventional commits format with scope. References the issue.
PR description explains the change ✅ Pass Has Summary, Changes, and Verification sections. Clearly explains the documentation gap and what was added.
No unrelated changes bundled in ✅ Pass Single file changed, 42 additions, 0 deletions. No unrelated changes.

Code Reference Verification

Claim in Docs Actual Code Verdict
NormalizedResponse.reasoning field at line 107 agent/transports/types.py L107: reasoning: str or None = None Correct
reasoning_content property at lines 115-117 agent/transports/types.py L115-117: property reads provider_data["reasoning_content"] Correct
Gateway session persistence at line 1270 gateway/session.py L1270: reasoning_content=message.get("reasoning_content")... Correct
_ASSISTANT_REPLAY_FIELDS at lines 475-541 gateway/run.py L473-541: whitelist def + _build_replay_entry Correct
copy_reasoning_content_for_api at line 1987 agent/agent_runtime_helpers.py L1987: function definition Correct

Issues

None. The documentation is accurate, well-placed, and follows the existing style.

Suggestions (Minor / Optional)

  1. Line number volatility: The docs reference specific line numbers (e.g. "line 107", "lines 115-117", "line 1987"). These are accurate today but will drift as the codebase evolves. Consider whether the team wants to commit to keeping these in sync, or prefers general descriptions without line numbers. This is a pre-existing pattern in the docs, so it is consistent -- just worth being aware of.

  2. Minimum Hermes version section: This is a useful addition for users, but no other section in this file has a version note. Consider moving this into the introductory paragraph (e.g. "This support is shipped and stable in the current Hermes release") to keep the section structure uniform.


Summary

This PR closes a genuine documentation gap identified in issue #38360. All code references are accurate, the documentation is clearly written, and it fits naturally between the Other Compatible Providers and Context Length Detection sections. No issues found -- ready to merge.

@alt-glitch alt-glitch added type/docs Documentation improvements P3 Low — cosmetic, nice to have provider/qwen Qwen / Alibaba Cloud (OAuth) provider/vercel Vercel AI SDK provider labels Jun 3, 2026
@alaamohanad169-ship-it alaamohanad169-ship-it marked this pull request as ready for review June 5, 2026 06:41
@alaamohanad169-ship-it alaamohanad169-ship-it deleted the fix/issue-38360-reasoning-parser-docs branch June 6, 2026 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P3 Low — cosmetic, nice to have provider/qwen Qwen / Alibaba Cloud (OAuth) provider/vercel Vercel AI SDK provider type/docs Documentation improvements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Clarify support for Qwen/vLLM reasoning-parser output in custom OpenAI-compatible providers

2 participants