Skip to content

Commit 0185f91

Browse files
Copilotstephentoub
andcommitted
Update migration docs to reflect ChatOptions.Reasoning and CreateResponseOptions
Co-authored-by: stephentoub <2642209+stephentoub@users.noreply.github.com>
1 parent bcbc24f commit 0185f91

1 file changed

Lines changed: 23 additions & 9 deletions

File tree

.github/upgrades/prompts/SemanticKernelToAgentFramework.md

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -863,27 +863,41 @@ if (!string.IsNullOrEmpty(generatedCode.ToString()))
863863
#### Provider-Specific Options Configuration
864864

865865
<configuration_changes>
866-
For advanced model settings not available in `ChatOptions`, use the `RawRepresentationFactory` property:
866+
For reasoning model settings, use the `ChatOptions.Reasoning` property:
867+
868+
```csharp
869+
var agentOptions = new ChatClientAgentRunOptions(new ChatOptions
870+
{
871+
MaxOutputTokens = 8000,
872+
Reasoning = new()
873+
{
874+
Effort = ReasoningEffort.High,
875+
Output = ReasoningOutput.Full
876+
}
877+
});
878+
```
879+
880+
For other advanced model settings not available in `ChatOptions`, use the `RawRepresentationFactory` property:
867881

868882
```csharp
869883
var agentOptions = new ChatClientAgentRunOptions(new ChatOptions
870884
{
871885
MaxOutputTokens = 8000,
872886
// Breaking glass to access provider-specific options
873-
RawRepresentationFactory = (_) => new OpenAI.Responses.ResponseCreationOptions()
887+
RawRepresentationFactory = (_) => new OpenAI.Responses.CreateResponseOptions()
874888
{
875-
ReasoningOptions = new()
876-
{
877-
ReasoningEffortLevel = OpenAI.Responses.ResponseReasoningEffortLevel.High,
878-
ReasoningSummaryVerbosity = OpenAI.Responses.ResponseReasoningSummaryVerbosity.Detailed
879-
}
889+
// Provider-specific settings here
880890
}
881891
});
882892
```
883893

884-
**Use this pattern when:**
894+
**Use the Reasoning property when:**
895+
1. Configuring reasoning effort level (Low, Medium, High)
896+
2. Configuring reasoning output format (None, Summary, Full)
897+
898+
**Use RawRepresentationFactory when:**
885899
1. Standard `ChatOptions` properties don't cover required model settings
886-
2. Provider-specific configuration is needed (e.g., reasoning effort level)
900+
2. Provider-specific configuration is needed beyond reasoning
887901
3. Advanced SDK features need to be accessed
888902
</configuration_changes>
889903

0 commit comments

Comments
 (0)