Skip to content

Commit ac1692e

Browse files
added workflows and expanded some points
1 parent 4a9bab4 commit ac1692e

File tree

1 file changed

+16
-6
lines changed

1 file changed

+16
-6
lines changed

docs/decisions/00XX-python-get-response-simplification.md

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
status: Proposed
33
contact: eavanvalkenburg
44
date: 2026-01-06
5-
deciders: markwallace-microsoft, dmytrostruk, taochenosu, alliscode, moonbox3
5+
deciders: markwallace-microsoft, dmytrostruk, taochenosu, alliscode, moonbox3, sphenry
66
consulted: sergeymenshykh, rbarreto, dmytrostruk, westey-m
77
informed:
88
---
@@ -112,7 +112,7 @@ The consolidation makes sense architecturally, but consider:
112112

113113
## Option 1: Status Quo
114114
- Good: Clear separation of streaming vs non-streaming logic
115-
- Good: Aligned with .NET design
115+
- Good: Aligned with .NET design, although it is already `run` for Python and `RunAsync` for .NET
116116
- Bad: Code duplication in decorators and middleware
117117
- Bad: More complex client implementations
118118

@@ -122,16 +122,26 @@ The consolidation makes sense architecturally, but consider:
122122
- Good: Smaller API footprint for users to get familiar with
123123
- Good: People using OpenAI directly already expect this pattern
124124
- Bad: Increased complexity in decorators and middleware
125-
- Bad: Less alignment with .NET design
125+
- Bad: Less alignment with .NET design (`get_response(stream=True)` vs `GetStreamingResponseAsync`)
126126

127-
## Option 3: Consolidate + Merge Agent Methods
128-
- Good: Further simplifies agent implementation
127+
## Option 3: Consolidate + Merge Agent and Workflow Methods
128+
- Good: Further simplifies agent and workflow implementation
129129
- Good: Single method for all chat interactions
130130
- Good: Smaller API footprint for users to get familiar with
131131
- Good: People using OpenAI directly already expect this pattern
132+
- Good: Workflows internally already use a single method (_run_workflow_with_tracing), so would eliminate public API duplication as well, with hardly any code changes
132133
- Bad: More breaking changes for agent users
133134
- Bad: Increased complexity in agent implementation
134-
- Bad: More extensive misalignment with .NET design
135+
- Bad: More extensive misalignment with .NET design (`run(stream=True)` vs `RunStreamingAsync` in addition to `get_response` change)
136+
137+
## Misc
138+
139+
Smaller questions to consider:
140+
- Should default be `stream=False` or `stream=True`? (Current is False)
141+
- Default to `False` makes it simpler for new users, as non-streaming is easier to handle.
142+
- Default to `False` aligns with existing behavior.
143+
- Streaming tends to be faster, so defaulting to `True` could improve performance for common use cases.
144+
- Should this differ between ChatClient, Agent and Workflows? (e.g., Agent and Workflow defaults to streaming, ChatClient to non-streaming)
135145

136146
## Decision Outcome
137147
TBD

0 commit comments

Comments
 (0)