Skip to content

[BUG] #47417

@adjiandov-wh

Description

@adjiandov-wh

Describe the bug
com.azure.ai.agents.persistent.implementation.MessagesImpl.listMessages is not setting the continuation token.

Exception or Stack Trace
Add the exception log and stack trace if available

To Reproduce
From a MessagesClient try to list the messages for a given threadId in a paginated manner with the use of the continuation token.

Code Snippet
@ServiceMethod(returns = ReturnType.COLLECTION) public PagedIterable<BinaryData> listMessages(String threadId, RequestOptions requestOptions) { return new PagedIterable<>(() -> listMessagesSinglePage(threadId, requestOptions)); }

Expected behavior
Once the response from the service is returned, the "last_id" property of the response should be used to set the continuation token, since it is returned when the API endpoint is directly called.

Screenshots
If applicable, add screenshots to help explain your problem.

Setup (please complete the following information):

  • OS: [e.g. iOS]
  • IDE: [e.g. IntelliJ]
  • Library/Libraries: com.azure:azure-ai-agents-persistent:1.0.0-beta.2
  • Java version: 17
  • App Server/Environment: Tomcat
  • Frameworks: Spring Boot

If you suspect a dependency version mismatch (e.g. you see NoClassDefFoundError, NoSuchMethodError or similar), please check out Troubleshoot dependency version conflict article first. If it doesn't provide solution for the problem, please provide:

  • verbose dependency tree (mvn dependency:tree -Dverbose)
  • exception message, full stack trace, and any available logs

Additional context
Add any other context about the problem here.

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

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