Skip to content

[BUG] Incorrect API path in listRunStepsSync returns run data instead of steps (regression from commit 0f8c354) #45921

@jvaldiviab

Description

@jvaldiviab

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

  1. Create a thread and execute a run
  2. Call listRunStepsSync(threadId, runId)
  3. 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:

  1. Use the correct /steps endpoint
  2. Return HTTP 200 with proper steps array
  3. 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:

Image

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:

  1. Silent Failure: No errors thrown despite wrong behavior
  2. Regression: Worked correctly in commit 0f8c354
  3. Documentation Mismatch: Contradicts official API specs
  4. 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

Metadata

Metadata

Assignees

Labels

AI AgentsbugThis issue requires a change to an existing behavior in the product in order to be resolved.customer-reportedIssues that are reported by GitHub users external to the Azure organization.needs-team-attentionWorkflow: This issue needs attention from Azure service team or SDK team

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions