Merged
Conversation
Contributor
Author
|
🧪 Testing |
|
|
||
| class CompletionTokensDetails(BaseModel): | ||
| reasoning_tokens: int | ||
| """Number of tokens used for reasoning (for reasoning models).""" |
There was a problem hiding this comment.
Bug: Incorrect Field Requirement Breaks Validation
The reasoning_tokens field in CompletionTokensDetails is defined as required but should be optional since it's only present for reasoning models. This causes validation errors when parsing responses from non-reasoning models that don't include this field.
c40fc4d to
647af84
Compare
647af84 to
f55512e
Compare
f55512e to
ba8f9f1
Compare
gradenr
approved these changes
Nov 18, 2025
Contributor
Author
|
🤖 Release is at https://github.com/groq/groq-python/releases/tag/v0.35.0 🌻 |
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.
Automated Release PR
0.35.0 (2025-11-18)
Full Changelog: v0.34.1...v0.35.0
Features
Bug Fixes
Chores
This pull request is managed by Stainless's GitHub App.
The semver version number is based on included commit messages. Alternatively, you can manually set the version number in the title of this pull request.
For a better experience, it is recommended to use either rebase-merge or squash-merge when merging this pull request.
🔗 Stainless website
📚 Read the docs
🙋 Reach out for help or questions
Note
Release 0.35.0 with expanded chat completion/streaming types (Groq-specific metadata, MCP tool listing, usage breakdown) and detailed token usage metrics.
XGroq(incl.debug,seed,usage),usage_breakdown, andservice_tiertochat_completion(x_groq,UsageBreakdown*).McpListTool*) andChatCompletion.mcp_list_tools.chat_completion_chunk:XGroq(defaults,debug,seed,usage_breakdown, improvederror).x_groqon chunks andUsageBreakdown*models.CompletionUsagewithcompletion_tokens_detailsandprompt_tokens_details.0.35.0, update OpenAPI spec refs, and updateCHANGELOG.md.Written by Cursor Bugbot for commit ba8f9f1. This will update automatically on new commits. Configure here.