Skip to content

Conversation

@HavenDV
Copy link
Contributor

@HavenDV HavenDV commented Sep 16, 2025

Summary by CodeRabbit

  • New Features
    • Chat completion responses may now include an optional reasoning field in both full messages and streaming deltas. This field is nullable and only present when available.
    • No breaking changes: existing integrations continue to work unchanged.
    • Clients can optionally read and display reasoning content to enhance transparency, diagnostics, or UX where appropriate.

@coderabbitai
Copy link

coderabbitai bot commented Sep 16, 2025

Walkthrough

Adds 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

Cohort / File(s) Summary
OpenAPI schema updates
src/libs/Together/openapi.yaml
Added nullable string field reasoning to ChatCompletionChoiceDelta and ChatCompletionMessage in chat completion response objects.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I twitch my whiskers at the spec today,
A reasoning trail now joins the fray.
Two fields bloom where replies unfold,
Soft hints of thought in schemas told.
I thump approval—compact and clean,
Hopping through YAML, crisp and keen.

Pre-merge checks and finishing touches

❌ Failed checks (1 inconclusive)
Check name Status Explanation Resolution
Title Check ❓ Inconclusive The PR title "feat:@coderabbitai" is vague and does not describe the actual change (the openapi.yaml update adding nullable "reasoning" fields to ChatCompletionMessage and ChatCompletionChoiceDelta), so it does not communicate the primary intent to reviewers. Please rename the PR to a concise, descriptive title such as "feat(together): add nullable reasoning field to ChatCompletionMessage and ChatCompletionChoiceDelta in openapi.yaml" so the primary change is clear at a glance.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch bot/update-openapi_202509162117

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot enabled auto-merge September 16, 2025 21:18
@github-actions github-actions bot merged commit 6d5e333 into main Sep 16, 2025
3 of 4 checks passed
@github-actions github-actions bot deleted the bot/update-openapi_202509162117 branch September 16, 2025 21:19
@coderabbitai coderabbitai bot changed the title feat:@coderabbitai feat:Add optional nullable 'reasoning' to ChatCompletion response schemas Sep 16, 2025
Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between ee54a39 and 1a04546.

⛔ Files ignored due to path filters (2)
  • src/libs/Together/Generated/Together.Models.ChatCompletionChoiceDelta.g.cs is excluded by !**/generated/**
  • src/libs/Together/Generated/Together.Models.ChatCompletionMessage.g.cs is 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

Comment on lines +2688 to 2691
reasoning:
type: string
nullable: true
role:
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

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
                     - name

Committable 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.

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