The GitHub Actions job "Backport Approval Check" on texera.git/gh-readonly-queue/main/pr-9603-871b1775896135dec67e165a2a897557be3ccd3d has succeeded. Run started by GitHub user bobbai00 (triggered by bobbai00).
Head commit for run: 6eab74829f6074da64ca36bc45db050d4b434597 / Jiadong Bai <[email protected]> feat(agent-service): lower the default step limit to 25 and cap it at 50 (#9603) ### What changes were proposed in this PR? Lowers the agent's default limit on model calls (steps) per message from 100 to 25 (`maxSteps` in `agent-service/src/types/agent.ts`). It also caps the limit at 50, the settings dialog's maximum, so a request sent straight to the API can no longer go past it (`agent-service/src/server.ts`). A looping agent stops only at this limit, so a runaway turn now costs a quarter of the calls. 25 is about twice the largest of 60 measured turns (13 model calls, median 3), so ordinary turns are not cut. Users can still raise it per agent in the settings, up to 50. ### Any related issues, documentation, discussions? Closes #9602 Part of #9576 ### How was this PR tested? `bun test` in `agent-service`. A new test drives a model that never stops calling tools, without setting `maxSteps`, and expects the turn to stop after 25 calls. Two route tests send a limit of 51: the creation test expects a 400 and no new agent, and the settings test expects a 400 and an unchanged limit. Both accept 50. All three fail on `main`. ### Was this PR authored or co-authored using generative AI tooling? Generated-by: Claude Code (Claude Fable 5.2, Claude Opus 5.5) Report URL: https://github.com/apache/texera/actions/runs/45579700442 With regards, GitHub Actions via GitBox
