fix(agent): fix the logic to select custom endpoints
Merge pull request #606 from virgo-agent-toolkit/fixes/logic_for_custom_endpoints

fix(agent): fix the logic to select custom endpoints