Accept xhigh reasoning_effort and add grok-4.6 to ChatModel - #189
Merged
Conversation
shawnthapa
previously approved these changes
Aug 12, 2026
mark-xai
previously approved these changes
Aug 12, 2026
shawnthapa
approved these changes
Aug 12, 2026
mark-xai
approved these changes
Aug 12, 2026
shawnthapa
pushed a commit
to xai-org/xai-proto
that referenced
this pull request
Aug 12, 2026
# Changes - Add `EFFORT_XHIGH = 5` to the `ReasoningEffort` enum in `chat.proto`, matching the value already served by the API (`reasoning_effort=xhigh`, supported by models such as `grok-4.6`). - Clarify the `reasoning_effort` field comments: the default varies by model (e.g. `grok-4.5` and `grok-4.6` default to `EFFORT_HIGH`) rather than always being `EFFORT_MEDIUM`. Same shape as #49 (which added `EFFORT_NONE`). Companion SDK change: xai-org/xai-sdk-python#189 adds the `"xhigh"` literal and regenerated stubs.
gyang-xai
added a commit
that referenced
this pull request
Aug 13, 2026
Bump version from 1.17.1 to 1.18.0 (minor: additive changes only) to release the current `[Unreleased]` changes, including `xhigh` reasoning effort support and `grok-4.6` in `ChatModel` (#189). On merge, the auto-tag workflow will create `v1.18.0`; the Release workflow can then be dispatched against that tag to publish to PyPI.
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
The API accepts
reasoning_effort=xhighfor models such asgrok-4.6, but the SDK still rejects the string:This closes the gap:
"xhigh"to theReasoningEfforttype literal (types/chat.py)."xhigh"→EFFORT_XHIGHin_reasoning_effort_to_protoand update thereasoning_effortdocstring (chat.py).chat_pb2.py/chat_pb2.pyi(v5 + v6) carryingEFFORT_XHIGH = 5, generated withbuf generatefrom Add EFFORT_XHIGH to ReasoningEffort enum xai-proto#70 (which adds the enum value to the public proto).grok-4.6to theChatModelknown-model literal (types/model.py). Purely a typing/autocomplete aid — model params areUnion[ChatModel, str], so behavior is unchanged.[Unreleased] / Added.Test plan
uv run pytest -n auto— 767 passed.uv run ruff format --check,uv run ruff check,uv run pyright— clean.chat_pb2.ReasoningEffort.EFFORT_XHIGH == 5for both v5 and v6 stubs,_reasoning_effort_to_proto("xhigh")returns it, and'grok-4.6' in typing.get_args(ChatModel).