Skip to content

fix(showcase): remove trailing slash from ms-agent-python hitl-in-app agent URL#4486

Merged
jpr5 merged 1 commit into
mainfrom
fix/ms-agent-python-hitl-approve-deny
Apr 30, 2026
Merged

fix(showcase): remove trailing slash from ms-agent-python hitl-in-app agent URL#4486
jpr5 merged 1 commit into
mainfrom
fix/ms-agent-python-hitl-approve-deny

Conversation

@jpr5

@jpr5 jpr5 commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Remove trailing slash from the hitl-in-app agent URL in ms-agent-python's CopilotKit route handler

Why

The hitl-in-app agent was the only agent registered with a trailing slash in the URL (/hitl-in-app/). The FastAPI backend mounts the endpoint at /hitl-in-app (no slash). FastAPI's default redirect_slashes=True returns a 307 redirect for POST requests to the trailing-slash variant, and the AG-UI HttpAgent does not follow POST redirects during streaming. This caused the agent to appear completely unresponsive — the D5 hitl-approve-deny probe timed out at 60s with baseline=0, current=0 (zero assistant messages).

Verified via container: POST /hitl-in-app/ returns 307 → POST /hitl-in-app returns 422 (correct routing, body validation).

The fix uses the shared createAgent("/hitl-in-app") helper (which does not append a trailing slash) for consistency with every other agent registration in the file.

Test plan

  • D5 hitl-approve-deny passes for ms-agent-python (showcase test ms-agent-python --d5)
  • No regression in other ms-agent-python D5 features (10/11 → 11/11)

… agent URL

The hitl-in-app agent was registered with a trailing slash in the URL
(`/hitl-in-app/`), while the FastAPI backend mounts the endpoint at
`/hitl-in-app` (no trailing slash). FastAPI's default redirect_slashes
behavior returns a 307 redirect for POST requests to the trailing-slash
variant, and the AG-UI HttpAgent does not follow POST redirects. This
caused the agent to appear completely unresponsive — the D5
hitl-approve-deny probe timed out at 60s with zero assistant messages.

Use the shared `createAgent()` helper (which does not append a trailing
slash) for consistency with every other agent registration in the file.
@vercel

vercel Bot commented Apr 30, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
chat-with-your-data Ready Ready Preview, Comment Apr 30, 2026 7:37am
docs Ready Ready Preview, Comment Apr 30, 2026 7:37am
form-filling Ready Ready Preview, Comment Apr 30, 2026 7:37am
research-canvas Ready Ready Preview, Comment Apr 30, 2026 7:37am
travel Ready Ready Preview, Comment Apr 30, 2026 7:37am

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

📣 Social Copy Generator

Generate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.

  • Generate social media copies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant