### What problem does this PR solve? add legacy agent completion API compatibility ### Type of change - [x] Bug Fix (non-breaking change which fixes an issue)