Skip to content

Add support for Verbosity introduced in GPT-5 - #100

Merged
kzu merged 2 commits into
mainfrom
dev/verbosity
Aug 20, 2025
Merged

Add support for Verbosity introduced in GPT-5#100
kzu merged 2 commits into
mainfrom
dev/verbosity

Conversation

@kzu

@kzukzu commented Aug 20, 2025

Copy link
Copy Markdown
Member

@kzu
kzu requested a review from CopilotAugust 20, 2025 20:46
@kzukzu added the enhancement New feature or request label Aug 20, 2025

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull Request Overview

This pull request adds support for the new Verbosity feature introduced in GPT-5 models, allowing control over the number of output tokens to reduce latency. The implementation follows the same pattern as the existing ReasoningEffort feature.

  • Adds a Verbosity enum with Low, Medium, and High levels
  • Integrates verbosity support into the OpenAI chat client with proper JSON serialization
  • Extends ChatOptions with a Verbosity property for easy configuration

Reviewed Changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

FileDescription
src/AI/Verbosity.csDefines the new Verbosity enum with Low, Medium, and High options
src/AI/OpenAI/OpenAIChatClient.csImplements verbosity support in the OpenAI client with VerbosityOptions class
src/AI/ChatExtensions.csAdds Verbosity property to ChatOptions for configuration
src/AI.Tests/OpenAITests.csAdds comprehensive test coverage for the verbosity feature

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Comment threadsrc/AI/Verbosity.cs Outdated
Comment threadsrc/AI/OpenAI/OpenAIChatClient.cs
Comment threadsrc/AI/OpenAI/OpenAIChatClient.cs
@kzu

kzu commented Aug 20, 2025

Copy link
Copy Markdown
MemberAuthor

1 passed1 passed17 skipped

🧪 Details on Ubuntu 24.04.2 LTS

from dotnet-retest v0.7.2 on .NET 9.0.8 with 💜 by @devlooped

@kzu
kzu enabled auto-merge (rebase) August 20, 2025 20:50
@kzu
kzu merged commit 116b152 into mainAug 20, 2025
7 checks passed
@kzu
kzu deleted the dev/verbosity branch August 20, 2025 20:52
@devloopeddevlooped locked and limited conversation to collaborators Sep 20, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

enhancementNew feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@kzu