feat: add reasoning parameters support (v0.8.0) - #21
Merged
Seb Duerr (sebastiand-cerebras) merged 5 commits intoNov 20, 2025
Conversation
Add support for reasoning_effort parameter for gpt-oss-120b model with options: low, medium, and high. Also add disable_reasoning parameter for zai-glm-4.6 model to control reasoning capability.
…ests - Fix disable_reasoning to use extra_body for nonstandard parameter - Remove redundant reasoning_effort handling (already in BaseChatOpenAI) - Add comprehensive test suite with 10 test cases - Bump version to 0.8.0 - All tests passing (10/10 reasoning tests, 20/20 integration tests) The disable_reasoning parameter must be passed via extra_body since it's a Cerebras-specific nonstandard parameter not recognized by the OpenAI client.
Merge PR #20 with fixes: - Add reasoning_effort parameter for gpt-oss-120b (low/medium/high) - Add disable_reasoning parameter for zai-glm-4.6 (bool) - Fix disable_reasoning to use extra_body for nonstandard parameter - Add comprehensive test suite (10 tests, all passing) - Bump version to 0.8.0
- Fix line too long in chat_models.py - Remove unused imports and print statements from tests - Add pytest import for test main block - All linting checks passing
- Add -> None return type annotations to all test methods - Fix trailing whitespace issues - Add .mypy_cache_test to .gitignore - All linting checks passing (lint_package + lint_tests)
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
Adds support for reasoning parameters for Cerebras models with testing.
Changes
reasoning_effortparameter forgpt-oss-120bmodel (low/medium/high)disable_reasoningparameter forzai-glm-4.6model (bool)disable_reasoningto useextra_bodyfor nonstandard parameter supportImplementation Details
reasoning_effortis already supported byBaseChatOpenAI(for o1 models)disable_reasoningis a Cerebras-specific nonstandard parameter that must be passed viaextra_bodyNoneTesting
Usage Examples