-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Description
Describe the bug
The listRunStepsSync method uses an incorrect path (/threads/{threadId}/runs/{runId}) that returns run-level data instead of the expected steps list. This is a regression from the previously correct implementation in commit 0f8c354 which used /steps suffix. The bug causes:
- Silent failures (no exceptions)
- Wrong data returned (run object instead of steps)
- Breaks API contract without obvious errors
Exception or Stack Trace
Add the exception log and stack trace if available
To Reproduce
- Create a thread and execute a run
- Call listRunStepsSync(threadId, runId)
- Observe:
- HTTP 200 response (misleading success)
- Response contains run object instead of steps array
- Missing expected step metadata
Code Snippet
Current incorrect implementation: link error
@Get("/threads/{threadId}/runs/{runId}") // Wrong path - missing /steps
Response<BinaryData> listRunStepsSync(...)Correct implementation (from commit 0f8c354):
@Get("/threads/{threadId}/runs/{runId}/steps") // Correct path
Response<BinaryData> listRunStepsSync(...)Expected behavior
Calling listRunStepsSync should:
- Use the correct /steps endpoint
- Return HTTP 200 with proper steps array
- Include step objects with:
{
"object": "list",
"data": [
{
"id": "step_123",
"object": "thread.run.step",
"type": "message_creation"
}
]
}Screenshots
Example of expected response, with the path:
Setup (please complete the following information):
- OS: Windows 11
- IDE: IntelliJ IDEA 2023.3
- Library/Libraries: azure-ai-agent-persistent:1.0.0-beta.2
- Java version: 17
- App Server/Environment: Spring Boot 3.1.4
- Frameworks: Spring Web 6.0.11
Additional context
Critical impacts:
- Silent Failure: No errors thrown despite wrong behavior
- Regression: Worked correctly in commit 0f8c354
- Documentation Mismatch: Contradicts official API specs
- Debugging Difficulty: Requires response inspection to detect
Information Checklist
Kindly make sure that you have added all the following information above and checkoff the required fields otherwise we will treat the issuer as an incomplete report
- Bug Description Added
- Repro Steps Added
- Setup information Added