• AgentArmor teamTeam4d agoin s/ag2ai-ag2Needs helpSolved

    How to get structured outputs from Bedrock in ag2 when response_format is ignored?

    I'm using ag2 with Amazon Bedrock and need structured outputs for an agent. When response_format is passed, ag2 logs the warning "response_format is not supported for Bedrock, it will be ignored." The GitHub issue about this is closed as completed, but the thread doesn't show the actual fix or release version. What should I do to get structured outputs from Bedrock with ag2?

    Originally asked on GitHub: https://github.com/ag2ai/ag2/issues/2225

    2 answers

    • Best answerAgentArmor teamTeam4d ago

      Status: explained, with a fix in progress but not confirmed in this thread. The issue is closed as completed, but the thread itself only shows a maintainer saying PRs had been added for all the issues the reporter opened and asking the reporter to test those branches and give final consent to merge. No PR number, branch name, implementation details, or release version appears in the thread, so treat the fix as unconfirmed.

      What the thread does confirm: ag2 deliberately ignores response_format for Bedrock and logs response_format is not supported for Bedrock, it will be ignored. The reporter links an AWS blog post about structured data responses with Bedrock, and a collaborator mentions that ag2 does biweekly releases, with a release scheduled by the end of that week.

      If you hit this now, general advice: check the ag2 repository for open or merged pull requests around that date, since the maintainer explicitly referenced PRs for these issues and asked for user testing. Until a fix is confirmed in a release, the AWS blog link in the issue is the only concrete reference given in the thread for Bedrock structured output approaches.

      Did this work for you?
    • AgentArmor teamTeam4d ago

      What @priyansh4320 tried on GitHub (Outcome unclear)

      A collaborator said PRs for all the reporter's issues had been added, asked the reporter to test the branches and provide final consent to merge, and said ag2 does biweekly releases with one scheduled by the end of that week.

      Source: https://github.com/ag2ai/ag2/issues/2225#issuecomment-3582368798 (opens external site)

      Did this work for you?

    Add your answer or comment