Skip to content

Commit a4e2cf6

Browse files
authored
Add incomplete enumeration member. (#54232)
* Add incomplete enumeration member. * Fix
1 parent 2d7d3ed commit a4e2cf6

File tree

6 files changed

+10
-9
lines changed

6 files changed

+10
-9
lines changed

sdk/ai/Azure.AI.Agents.Persistent/CHANGELOG.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,13 @@
11
# Release History
22

3-
## 1.2.0-beta.8 (Unreleased)
3+
## 1.2.0-beta.8 (2025-12-01)
44

55
### Features Added
66
- Added support for Computer usage.
7-
8-
### Breaking Changes
7+
- Improved handling of errors by `PersistentAgentsChatClient` in the streaming scenarios.
98

109
### Bugs Fixed
11-
12-
### Other Changes
10+
- Fix the issue with `PersistentAgentsChatClient` when the run in incomplete state is encountered [issue](https://github.com/microsoft/agent-framework/issues/2298).
1311

1412
### Sample updates
1513
- Added sample for Computer usage.

sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.net8.0.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,6 +2150,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer
21502150
public static Azure.AI.Agents.Persistent.RunStatus Completed { get { throw null; } }
21512151
public static Azure.AI.Agents.Persistent.RunStatus Expired { get { throw null; } }
21522152
public static Azure.AI.Agents.Persistent.RunStatus Failed { get { throw null; } }
2153+
public static Azure.AI.Agents.Persistent.RunStatus Incomplete { get { throw null; } }
21532154
public static Azure.AI.Agents.Persistent.RunStatus InProgress { get { throw null; } }
21542155
public static Azure.AI.Agents.Persistent.RunStatus Queued { get { throw null; } }
21552156
public static Azure.AI.Agents.Persistent.RunStatus RequiresAction { get { throw null; } }

sdk/ai/Azure.AI.Agents.Persistent/api/Azure.AI.Agents.Persistent.netstandard2.0.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2150,6 +2150,7 @@ protected virtual void JsonModelWriteCore(System.Text.Json.Utf8JsonWriter writer
21502150
public static Azure.AI.Agents.Persistent.RunStatus Completed { get { throw null; } }
21512151
public static Azure.AI.Agents.Persistent.RunStatus Expired { get { throw null; } }
21522152
public static Azure.AI.Agents.Persistent.RunStatus Failed { get { throw null; } }
2153+
public static Azure.AI.Agents.Persistent.RunStatus Incomplete { get { throw null; } }
21532154
public static Azure.AI.Agents.Persistent.RunStatus InProgress { get { throw null; } }
21542155
public static Azure.AI.Agents.Persistent.RunStatus Queued { get { throw null; } }
21552156
public static Azure.AI.Agents.Persistent.RunStatus RequiresAction { get { throw null; } }

sdk/ai/Azure.AI.Agents.Persistent/src/Custom/PersistentAgentsChatClient.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,6 @@ namespace Azure.AI.Agents.Persistent
2222
/// <summary>Represents an <see cref="IChatClient"/> for an Azure.AI.Agents.Persistent <see cref="PersistentAgentsClient"/>.</summary>
2323
internal partial class PersistentAgentsChatClient : IChatClient
2424
{
25-
private static readonly RunStatus s_incompleteRunStatus = new RunStatus("incomplete");
26-
2725
/// <summary>The name of the chat client provider.</summary>
2826
private const string ProviderName = "azure";
2927

@@ -96,7 +94,7 @@ public virtual async IAsyncEnumerable<ChatResponseUpdate> GetStreamingResponseAs
9694
{
9795
await foreach (ThreadRun? run in _client!.Runs.GetRunsAsync(threadId, limit: 1, ListSortOrder.Descending, cancellationToken: cancellationToken).ConfigureAwait(false))
9896
{
99-
if (run.Status != s_incompleteRunStatus &&
97+
if (run.Status != RunStatus.Incomplete &&
10098
run.Status != RunStatus.Completed &&
10199
run.Status != RunStatus.Cancelled &&
102100
run.Status != RunStatus.Failed &&

sdk/ai/Azure.AI.Agents.Persistent/src/Generated/RunStatus.cs

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
directory: specification/ai/Azure.AI.Agents
2-
commit: 40a4ef79c6ed624ba5f6f92354470b4c1b45705e
2+
commit: 7b7f3e03323b8bee808184e41e9906e9d8c2d8e9
33
repo: Azure/azure-rest-api-specs
44
additionalDirectories:

0 commit comments

Comments
 (0)