-
-
Notifications
You must be signed in to change notification settings - Fork 0
feat:Add optional nullable 'reasoning' to ChatCompletion response schemas #152
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
Conversation
WalkthroughAdds an optional nullable string field reasoning to two response schemas in the OpenAPI spec for Together chat completions: ChatCompletionChoiceDelta and ChatCompletionMessage. No other structural changes. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 inconclusive)
✅ Passed checks (2 passed)
✨ Finishing touches🧪 Generate unit tests
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/libs/Together/openapi.yaml (1)
2688-2691: Document the new field (description)Add a short description so SDKs/docs render helpful tooltips and generated types stay self-explanatory.
reasoning: type: string nullable: true + description: Optional model-provided reasoning text; may be omitted or empty.Apply the same description in both places (ChatCompletionChoiceDelta and ChatCompletionMessage).
Also applies to: 2854-2857
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
src/libs/Together/Generated/Together.Models.ChatCompletionChoiceDelta.g.csis excluded by!**/generated/**src/libs/Together/Generated/Together.Models.ChatCompletionMessage.g.csis excluded by!**/generated/**
📒 Files selected for processing (1)
src/libs/Together/openapi.yaml(2 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Test / Build, test and publish
| reasoning: | ||
| type: string | ||
| nullable: true | ||
| role: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Streamed delta parity: add reasoning to ChatCompletionChunk.delta too
You added reasoning to ChatCompletionChoice.delta, but the streamed schema (ChatCompletionChunk -> choices[*].delta) doesn’t include it, creating response-shape inconsistency between non-stream and stream. Add it there as well.
Apply this patch in the ChatCompletionChunk delta properties:
properties:
content:
type: string
nullable: true
+ reasoning:
+ type: string
+ nullable: true
function_call:
required:
- arguments
- nameCommittable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In src/libs/Together/openapi.yaml around lines 2688-2691, the streamed response
schema ChatCompletionChunk -> choices[*].delta is missing the reasoning property
added to ChatCompletionChoice.delta; add a reasoning property under the delta
properties (type: string, nullable: true) for
ChatCompletionChunk.choices[].delta so the streamed and non-streamed response
shapes are consistent, and update any related examples or references if present.
Summary by CodeRabbit