Skip to content

Add Verbosity parameter to Chat Completion Request #1064

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

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

azdaev
Copy link

@azdaev azdaev commented Aug 11, 2025

Add Verbosity parameter to Chat Completion Request

Verbosity - Constrains the verbosity of the model's response. Lower values will result in more concise responses, while higher values will result in more verbose responses. Currently supported values are low, medium, and high.

OpenAI Docs - https://platform.openai.com/docs/api-reference/chat/create#chat_create-verbosity

Testing

✅ All existing tests pass

Copy link

codecov bot commented Aug 11, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.59%. Comparing base (f71d1a6) to head (bd1cc52).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1064   +/-   ##
=======================================
  Coverage   99.59%   99.59%           
=======================================
  Files          34       34           
  Lines        2206     2206           
=======================================
  Hits         2197     2197           
  Misses          6        6           
  Partials        3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@sashabaranov
Copy link
Owner

Hey @azdaev, thank you for the PR! I don't see the verbosity in the OpenAI docs link you've provided, and if I search for it I get to this page: https://platform.openai.com/docs/guides/latest-model#verbosity

This page says that it's supported in the client.responses.create API, which we haven't implemented in this library yet.

Please lmk if this parameter is supported in the chat completions API and is not documented.

Also, is this option only available for GPT-5?

@azdaev
Copy link
Author

azdaev commented Aug 19, 2025

@sashabaranov This is weird, but the verbosity parameter is now gone from the API Reference of Chat Completion. I've attached the link in my first message but now verbosity just isn't there. However, it still is working.
image

Verbosity definitely works with "gpt-5-mini", "gpt-5", "gpt-5-nano" as I have tested. It definitely isn't supported by "gpt-4.1-mini". Docs are too vague about Verbosity, so I had to check for myself.

@sashabaranov
Copy link
Owner

@azdaev got it, thanks! Could we please add a note about that in the comment for this field?

@azdaev
Copy link
Author

azdaev commented Aug 19, 2025

@sashabaranov no problem! done! feel free to edit the noe if it doesn't satisfy you

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