feat: support reasoning, text.format, and service_tier in /v1/responses API#6624
feat: support reasoning, text.format, and service_tier in /v1/responses API#6624vvagias wants to merge 1 commit into
Conversation
…es API Remove the 501 validation blocks for reasoning, text, and service_tier in the Responses API handler. Map these fields through to the underlying Chat Completions request (reasoning.effort -> reasoning_effort, text.format -> response_format, service_tier with enum conversion) and echo actual values back in the response instead of hardcoded defaults. Fix OutputMessage deserialization by making id and status fields default-able so that clients can send assistant messages without those fields in multi-turn conversations. Signed-off-by: Vasilis Vagias <vvagias@nvidia.com>
|
👋 Hi vvagias! Thank you for contributing to ai-dynamo/dynamo. Just a reminder: The 🚀 |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review infoConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro 📒 Files selected for processing (3)
WalkthroughThe changes extend OpenAI API response handling by adding support for reasoning, text, and service_tier fields in the Responses API. Default behaviors are introduced for OutputStatus and OutputMessage deserialization, while conversion logic maps these new fields between the Responses and Chat Completions API formats. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Tip Try Coding Plans. Let us write the prompt for your AI agent so you can ship faster (with fewer bugs). Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Superseded by a new PR that stacks on top of #6599 to avoid conflicts. |
Summary
reasoning,text, andservice_tierparameters in the/v1/responsesendpointreasoning.effort→reasoning_efforton the internal chat completions requesttext.format→response_format(text / json_object / json_schema) on the internal chat completions requestservice_tier→service_tieron the internal chat completions requestOutputMessagedeserialization: makeidandstatusfields#[serde(default)]so clients can send assistant messages ininputwithout these fieldsMotivation
The
/v1/responsesAPI currently rejects several valid OpenAI parameters with HTTP 501, even though the underlying chat completions backend already supports them. This PR removes those artificial gates and wires up the translation layer.Test plan
cargo test -p dynamo-llm— all new and existing tests passcargo clippy -p dynamo-llm— no warningsreasoning.effortaccepted and echoed backtext.formataccepted and echoed backservice_tieraccepted and echoed backOutputMessagedeserialization works for assistant messages withoutid/statusSummary by CodeRabbit
Release Notes
New Features
Improvements