fix(showcase): remove trailing slash from ms-agent-python hitl-in-app agent URL#4486
Merged
Conversation
… 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.
jpr5
requested review from
marthakelly,
mme,
ranst91 and
tylerslaton
as code owners
April 30, 2026 07:35
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
📣 Social Copy GeneratorGenerate social media copies (Twitter/X, LinkedIn, Blog Post) for this PR using Claude.
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
hitl-in-appagent URL in ms-agent-python's CopilotKit route handlerWhy
The
hitl-in-appagent 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 defaultredirect_slashes=Truereturns a 307 redirect for POST requests to the trailing-slash variant, and the AG-UIHttpAgentdoes not follow POST redirects during streaming. This caused the agent to appear completely unresponsive — the D5hitl-approve-denyprobe timed out at 60s withbaseline=0, current=0(zero assistant messages).Verified via container:
POST /hitl-in-app/returns 307 →POST /hitl-in-appreturns 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
hitl-approve-denypasses for ms-agent-python (showcase test ms-agent-python --d5)