fix(provider): add xai to reasoning tag provider list (#27533)#28316
Open
zeron-G wants to merge 1 commit intoopenclaw:mainfrom
Open
fix(provider): add xai to reasoning tag provider list (#27533)#28316zeron-G wants to merge 1 commit intoopenclaw:mainfrom
zeron-G wants to merge 1 commit intoopenclaw:mainfrom
Conversation
xai/grok models (including grok-4-1-fast-non-reasoning) emit <think> tags in their text output. Without xai in isReasoningTagProvider(), these tags leak to the user as visible text instead of being stripped. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Contributor
Greptile SummaryAdds xAI to the reasoning tag provider list to fix an issue where Grok models were displaying raw Key changes:
Implementation quality:
No issues found - clean, minimal, well-tested bug fix. Confidence Score: 5/5
Last reviewed commit: c45d6e7 |
|
This pull request has been automatically marked as stale due to inactivity. |
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
xai/grok-4-1-fast-non-reasoningoutputs<think>tags as visible text to users.xaitoisReasoningTagProvider()so thinking tags are stripped for xAI models.Closes #27533
Change Type (select all)
Scope (select all touched areas)
Linked Issue/PR
User-visible / Behavior Changes
xAI/grok model responses no longer show raw
<think>...</think>tags.Security Impact (required)
Repro + Verification
Environment
Steps
xai/grok-4-1-fast-non-reasoning<think>...tags visible in response. After: tags stripped.Evidence
Human Verification (required)
isReasoningTagProvider("xai")returns true; case-insensitive"XAI"also returns true.Compatibility / Migration
Failure Recovery (if this breaks)
src/utils/provider-utils.ts.Risks and Mitigations
None — additive change to an existing allowlist.