Skip to content

fix: store stream usage as a dict so results can be saved - #70

Open
Iamsohungrynow wants to merge 1 commit into
MiniMax-AI:mainfrom
Iamsohungrynow:fix/stream-usage-json
Open

Iamsohungrynow wants to merge 1 commit into
MiniMax-AI:mainfrom
Iamsohungrynow:fix/stream-usage-json

Conversation

@Iamsohungrynow

@Iamsohungrynow Iamsohungrynow commented Oct 11, 2026 •

Copy link
Copy Markdown

since #56 stream mode keeps event.usage as a CompletionUsage object, so validate_file crashes on json.dumps and leaves results.jsonl empty. it's model_dump()ed now like the non-stream path, and the stream test checks the response serializes


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

since MiniMax-AI#56 the stream path keeps event.usage as a CompletionUsage object, so
validate_file's json.dumps raises TypeError on any --stream run where the
provider sends usage, leaving results.jsonl empty and no summary. model_dump()
it like the non-stream path does
@Iamsohungrynow

Copy link
Copy Markdown
Author

hi @wumingxiami, could you take a look at this and #71 when you have time? both still apply cleanly after #75 and #76

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.

1 participant