-
Notifications
You must be signed in to change notification settings - Fork 3.2k
1.25.0: WARNING: Message content type could not be rendered on stdout for reasoning content #7302
Description
Describe the bug
goose 1.25.0 introduced support for reasoning content. This is an additional MessageContent type. However, #6322 seems to have missed a few occurrences of content type match/if blocks which have to be updated if a new content type is added. One of those is render_message(). This prints the string WARNING: Message content type could not be rendered on stdout since ReasoningContent is missing there. I use goose to get structured JSON output from my model in a CI context, and it's of course not good to have stray strings in there since it breaks my CI. (I know --output-format, but I still think there should only be the model response on stdout when using --quiet --text.)
My suggestion, despite the obvious fix of adding ReasoningContent support everywhere it's needed (render_message() might not be the only one), is that for such warnings, stderr is used. It is convention (not sure if it's POSIX, but it is widespread) that stdout is only used for actual output data of programs, and stderr is used for all logging, debugging, and error messages.
To Reproduce
Steps to reproduce the behavior:
- Run some prompt with a reasoning model using
goose run --quiet --text <PROMPT>
Expected behavior
Both of the following:
- No warning is printed at all.
- If anything aside from the model response is printed, it is printed to stderr, not stdout.
Actual behavior
A lot of WARNING: Message content type could not be rendered lines are printed to stdout before the actual model response.
- OS & Arch: Windows 11
- Interface: CLI
- Version: 1.25.0
- Extensions enabled: none
- Provider & Model:
openai& internal