Skip to content

chat : clarify the meaning of reasoning_format #15408

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 19, 2025

Conversation

ngxson
Copy link
Collaborator

@ngxson ngxson commented Aug 18, 2025

Ref comment: #15404 (comment)

The long story is that the message.reasoning_content API response format is initially introduced by deepseek hosted API, hence the name deepseek

This enum was added so in case openai wants to have their own API schema, then we can select between either deepseek or openai. However, the meaning is lost in time due to a combination of bad naming and poor documentation.

auto was added as a no-brainer solution since deepseek reasoning_content is now supported by many applications, while OAI migrated to their new Response API.

This reasoning_format solely determines the API schema, it is unrelated to the notion of parser or anything at chat template layer. Parser is determined by the chat template itself.

For this reason, common_reasoning_format should not be touched anymore.

Copy link
Collaborator

@gabe-l-hart gabe-l-hart left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@github-actions github-actions bot added the testing Everything test related label Aug 18, 2025
@aldehir
Copy link
Collaborator

aldehir commented Aug 18, 2025

Judging by this determination, it seems reasonable to add an openai format to adhere to the recommendations by OpenAI.

I believe this is a critical piece missing in the gpt-oss implementation.

@ngxson
Copy link
Collaborator Author

ngxson commented Aug 18, 2025

If you are implementing a Chat Completions API, there is no official spec for handling chain of thought in the published OpenAI specs, as our hosted models will not offer this feature for the time being. We ask you to follow the following convention from OpenRouter instead.

To be fair, it's not even an official openai spec. They explicitly state that the spec was from OpenRouter.

While we can add it, I doubt if many applications actually support this format. It's better not to add until a subset of users explicitly ask for it, to avoid polluting the code base with features that most users won't use.

@ngxson
Copy link
Collaborator Author

ngxson commented Aug 18, 2025

Read along the same article:

For the Responses API we augmented our Responses API spec to cover this case. Below are the changes to the spec as type definitions

So it make more sense to add the Responses API instead of adding a new reasoning_format

@aldehir
Copy link
Collaborator

aldehir commented Aug 18, 2025

While we can add it, I doubt if many applications actually support this format. It's better not to add until a subset of users explicitly ask for it, to avoid polluting the code base with features that most users won't use.

Understood. I started a discussion to gather community feedback but so far there is no immediate desire from the community. Thank you for that clarification.

@ngxson ngxson merged commit e9288e8 into master Aug 19, 2025
47 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
testing Everything test related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants