Skip to content

Conversation

@friggeri
Copy link
Collaborator

  • Add reasoningEffort to SessionConfig and ResumeSessionConfig
  • Extend ModelCapabilities.supports with reasoningEffort flag
  • Add supportedReasoningEfforts and defaultReasoningEffort to ModelInfo
  • Update session create/resume to pass reasoningEffort to server

- Add reasoningEffort to SessionConfig and ResumeSessionConfig
- Extend ModelCapabilities.supports with reasoningEffort flag
- Add supportedReasoningEfforts and defaultReasoningEffort to ModelInfo
- Update session create/resume to pass reasoningEffort to server
Copilot AI review requested due to automatic review settings January 30, 2026 22:22
@friggeri friggeri requested a review from a team as a code owner January 30, 2026 22:22
Document the new reasoningEffort/reasoning_effort option in SessionConfig
for all SDK clients (Node.js, Python, Go, .NET).
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for reasoning effort configuration across all SDK clients (Python, Node.js, Go, and .NET). The reasoning effort feature allows users to specify the computational effort level (low, medium, high, xhigh) that models should use when generating responses, applicable only to models that support this capability.

Changes:

  • Added ReasoningEffort type definition and reasoningEffort field to SessionConfig and ResumeSessionConfig across all SDKs
  • Extended ModelCapabilities.supports with a reasoningEffort boolean flag to indicate model support
  • Added supportedReasoningEfforts and defaultReasoningEffort fields to ModelInfo for advertising supported values
  • Updated session creation and resumption methods to pass reasoningEffort parameter to the server
  • Bumped @github/copilot dependency from version 0.0.399 to 0.0.400 in package manifests

Reviewed changes

Copilot reviewed 14 out of 16 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
test/harness/package.json Updated @github/copilot dependency to version 0.0.400
test/harness/package-lock.json Updated lockfile with version 0.0.400 and integrity hashes for all platform-specific packages
python/copilot/types.py Added ReasoningEffort type, reasoning_effort fields to configs, and reasoning effort support to ModelInfo/ModelCapabilities
python/copilot/client.py Updated create_session and resume_session to pass reasoningEffort to server
nodejs/src/types.ts Added ReasoningEffort type, reasoningEffort fields to configs, and reasoning effort support to ModelInfo/ModelCapabilities
nodejs/src/client.ts Updated createSession and resumeSession to pass reasoningEffort to server
nodejs/package.json Updated @github/copilot dependency to version 0.0.400
nodejs/package-lock.json Updated lockfile with version 0.0.400 and integrity hashes for all platform-specific packages
go/types.go Added ReasoningEffort field to configs and reasoning effort support to ModelInfo/ModelSupports structs
go/client.go Updated CreateSession and ResumeSessionWithOptions to pass reasoningEffort to server
dotnet/src/Types.cs Added ReasoningEffort property to configs and reasoning effort support to ModelInfo/ModelSupports classes
dotnet/src/Client.cs Updated CreateSessionAsync and ResumeSessionAsync to pass ReasoningEffort in request records
Files not reviewed (2)
  • nodejs/package-lock.json: Language not supported
  • test/harness/package-lock.json: Language not supported
Comments suppressed due to low confidence (1)

nodejs/src/types.ts:936

  • The supportedReasoningEfforts field is typed as ReasoningEffort[] in TypeScript, but the corresponding field in Python, Go, and .NET SDKs uses a generic string array type. This creates an inconsistency across SDK implementations. Consider using string[] here to maintain consistency with other SDKs, as the server may support additional reasoning effort values beyond the four currently defined in the ReasoningEffort type.
    supportedReasoningEfforts?: ReasoningEffort[];

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@github-actions
Copy link

✅ Cross-SDK Consistency Review: PASSED

This PR adds reasoningEffort support across all four SDK implementations and maintains excellent consistency. Great work! 🎉

Summary of Changes

The PR adds reasoning effort configuration support to all SDKs with the following components:

  1. SessionConfig & ResumeSessionConfig - Added reasoningEffort parameter
  2. ModelCapabilities.supports - Added reasoningEffort boolean flag
  3. ModelInfo - Added supportedReasoningEfforts and defaultReasoningEffort fields
  4. Documentation - Updated all README files consistently

Consistency Analysis

✅ Naming Conventions (All Correct)

  • TypeScript: reasoningEffort (camelCase) ✓
  • Python: reasoning_effort (snake_case) ✓
  • Go: ReasoningEffort (PascalCase for public API) ✓
  • .NET: ReasoningEffort (PascalCase) ✓

✅ Valid Values (All Consistent)

All SDKs define the same four valid values:

  • "low"
  • "medium"
  • "high"
  • "xhigh"

✅ Type Safety

  • TypeScript: Uses type union "low" | "medium" | "high" | "xhigh"
  • Python: Uses Literal["low", "medium", "high", "xhigh"]
  • Go: Uses string with documentation
  • .NET: Uses string with XML documentation

✅ API Coverage

All SDKs consistently add reasoningEffort to:

  • SessionConfig (for createSession/CreateSession/etc.)
  • ResumeSessionConfig (for resumeSession/ResumeSession/etc.)

✅ Model Metadata

All SDKs consistently add:

  • ModelSupports.reasoningEffort (boolean flag)
  • ModelInfo.supportedReasoningEfforts (array of valid values)
  • ModelInfo.defaultReasoningEffort (default value)

✅ Documentation

All README files include:

  • Parameter description in SessionConfig section
  • Valid values listed
  • Reference to listModels()/ListModels() to check support

Implementation Details

The implementation correctly:

  • ✅ Passes reasoningEffort to the server in session.create and session.resume requests
  • ✅ Uses optional/nullable types (as not all models support this feature)
  • ✅ Documents that support should be checked via ModelCapabilities
  • ✅ Maintains backward compatibility (all fields are optional)

No consistency issues found. This PR is approved from a cross-SDK consistency perspective.

AI generated by SDK Consistency Review Agent

@github-actions
Copy link

✅ Cross-SDK Consistency Review

I've reviewed PR #302 for consistency across all four SDK implementations (Node.js, Python, Go, and .NET).

Summary

This PR successfully adds reasoningEffort support consistently across all four SDKs. Excellent work on maintaining feature parity! 🎉

What's Consistent ✅

  1. API Changes - All SDKs include:

    • reasoningEffort parameter in SessionConfig
    • reasoningEffort parameter in ResumeSessionConfig
    • reasoningEffort flag in ModelCapabilities.supports
    • supportedReasoningEfforts and defaultReasoningEffort in ModelInfo
  2. Naming Conventions - Properly follows language idioms:

    • Node.js/TypeScript: reasoningEffort (camelCase)
    • Python: reasoning_effort (snake_case)
    • Go: ReasoningEffort (PascalCase for exported fields)
    • .NET: ReasoningEffort (PascalCase)
  3. Valid Values - All SDKs document the same valid values: "low", "medium", "high", "xhigh"

  4. Documentation - All four README files document the new parameter for SessionConfig

Minor Observation (Pre-existing Pattern)

The Go README documents ResumeSessionConfig options including ReasoningEffort, while Node.js, Python, and .NET READMEs don't document their ResumeSessionConfig options at all.

This is a pre-existing documentation pattern, not specific to this PR. For full consistency, you might consider documenting ResumeSessionConfig options in all READMEs, but this is not a blocker for this PR.

Conclusion

No consistency issues found. This PR maintains excellent cross-SDK consistency and adds the reasoningEffort feature uniformly across all implementations. 👍

AI generated by SDK Consistency Review Agent

@friggeri friggeri merged commit c39a129 into main Jan 30, 2026
29 of 30 checks passed
@friggeri friggeri deleted the frg/reasoning-effort-sdk branch January 30, 2026 22:41
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.

4 participants