Skip to content

feat: add reasoning parameters support (v0.8.0) - #21

Merged
Seb Duerr (sebastiand-cerebras) merged 5 commits into
mainfrom
feat/reasoning-parameters-v0.8.0
Nov 20, 2025
Merged

feat: add reasoning parameters support (v0.8.0)#21
Seb Duerr (sebastiand-cerebras) merged 5 commits into
mainfrom
feat/reasoning-parameters-v0.8.0

Conversation

@sebastiand-cerebras

Copy link
Copy Markdown
Collaborator

Summary

Adds support for reasoning parameters for Cerebras models with testing.

Changes

  • Add reasoning_effort parameter for gpt-oss-120b model (low/medium/high)
  • Add disable_reasoning parameter for zai-glm-4.6 model (bool)
  • Fix disable_reasoning to use extra_body for nonstandard parameter support
  • Add comprehensive test suite (10 tests, all passing)
  • Bump version to 0.8.0

Implementation Details

  • reasoning_effort is already supported by BaseChatOpenAI (for o1 models)
  • disable_reasoning is a Cerebras-specific nonstandard parameter that must be passed via extra_body
  • Both parameters are optional and default to None

Testing

  • 10/10 new reasoning parameter tests passing
  • 20/20 existing integration tests passing
  • Validated reasoning mode behavior (takes ~11% longer, more structured responses)

Usage Examples

# gpt-oss-120b with reasoning effort
chat = ChatCerebras(model="gpt-oss-120b", reasoning_effort="high")

# zai-glm-4.6 with reasoning disabled
chat = ChatCerebras(model="zai-glm-4.6", disable_reasoning=True)

janfeddersen-wq and others added 5 commits November 20, 2025 21:12
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)
@sebastiand-cerebras
Seb Duerr (sebastiand-cerebras) merged commit 6973bc4 into main Nov 20, 2025
11 checks passed
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.

2 participants