Repository navigation
fix: stop A2A answers truncating at 30s, and ground/cite agent replies - #234
Merged
google-oss-prow[bot] merged 7 commits intoAug 21, 2026
Conversation
kmr-rohit
force-pushed
the
fix/a2a-stream-timeout-and-citations
branch
from
August 18, 2026 22:08
6eaf669 to
fe91d93
Compare
…t off The single 30s cap on the catch-all route also governed /a2a/, where the response streams for the whole generation rather than returning at once. A grounded answer on the 7B model routinely runs past 30s, so Envoy closed the SSE stream mid-token and the chatbot rendered a sentence that stopped in the middle of a word — indistinguishable from the model truncating. Route /a2a/ separately at 300s, matching the Knative revision timeout on the predictor, and leave the catch-all capped so an ordinary hung request still can't pin a worker. Signed-off-by: Rohit Kumar <rr7433446@gmail.com>
Three faults showed up in the same set of answers: The ModelConfig set no sampling params, so vLLM fell back to Qwen's packaged generation config (temperature 0.7 / top_p 0.8). At that setting the model drifted mid-sentence into Chinese inside a code block, claimed Katib is not part of Kubeflow, and ignored the prompt's length guidance. Pin near-greedy decoding instead, and set an explicit client timeout — the default cut generation mid-token and left the turn with no final aggregated message. The docs agent could not see manifests at all: search_kubeflow_code was attached only to the debug agent, so YAML questions had nothing to ground on and the model invented schemas. Attach it here and route manifest questions to it first. The index holds install manifests and CRDs rather than example workloads, so point the model at the relevant CRD for the authoritative field layout. Citations were requested by the prompt but never produced. Require a Sources list built from the "**Source:**" URLs the tools return, restricted to URLs actually retrieved. Signed-off-by: Rohit Kumar <rr7433446@gmail.com>
.main-content is a flex item with flex:1, which leaves min-width at auto, so it refused to shrink below the intrinsic width of its widest line. One long unwrappable line in a code block therefore pushed it wider than the panel: the persona sidebar next to it absorbed all the shrinkage and squeezed down to a sliver, and the overflow past the container was silently clipped by overflow:hidden. Let the column shrink, hold the sidebar at its declared width, and keep the code block's own scrollbar visible so a wide sample reads as scrollable rather than cut off. Signed-off-by: Rohit Kumar <rr7433446@gmail.com>
Signed-off-by: Rohit Kumar <rr7433446@gmail.com>
Signed-off-by: Rohit Kumar <rr7433446@gmail.com>
Signed-off-by: Rohit Kumar <rr7433446@gmail.com>
kmr-rohit
force-pushed
the
fix/a2a-stream-timeout-and-citations
branch
from
August 18, 2026 22:10
fe91d93 to
c60b9a3
Compare
kmr-rohit
marked this pull request as ready for review
August 18, 2026 22:12
Contributor
Author
|
Hi @tarekabouzeid , Please review and merge. Most of changes are on widget ui fixes , prompt changes to give citations , few changes on Tests suit. |
Address review feedback on kubeflow#234: embedding vector dimensions vary by model, and docs TEI truncation should not be a hardcoded constant. Expose embedding_dim and max_tei_chars as pipeline params (with shared defaults), and keep chunk_size/chunk_overlap defaults wired through the same constants. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Rohit Kumar <kmr-rohit@users.noreply.github.com>
Contributor
Author
|
@tarekabouzeid , Addressed issues , Please review and merge. |
Member
|
Thanks so much @kmr-rohit ! |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: tarekabouzeid The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Sharkyii
pushed a commit
to Sharkyii/docs-agent
that referenced
this pull request
Aug 28, 2026
kubeflow#234) * fix(gateway): give A2A streaming its own timeout so answers aren't cut off The single 30s cap on the catch-all route also governed /a2a/, where the response streams for the whole generation rather than returning at once. A grounded answer on the 7B model routinely runs past 30s, so Envoy closed the SSE stream mid-token and the chatbot rendered a sentence that stopped in the middle of a word — indistinguishable from the model truncating. Route /a2a/ separately at 300s, matching the Knative revision timeout on the predictor, and leave the catch-all capped so an ordinary hung request still can't pin a worker. Signed-off-by: Rohit Kumar <rr7433446@gmail.com> * fix(kagent): settle decoding, add manifest search, and require citations Three faults showed up in the same set of answers: The ModelConfig set no sampling params, so vLLM fell back to Qwen's packaged generation config (temperature 0.7 / top_p 0.8). At that setting the model drifted mid-sentence into Chinese inside a code block, claimed Katib is not part of Kubeflow, and ignored the prompt's length guidance. Pin near-greedy decoding instead, and set an explicit client timeout — the default cut generation mid-token and left the turn with no final aggregated message. The docs agent could not see manifests at all: search_kubeflow_code was attached only to the debug agent, so YAML questions had nothing to ground on and the model invented schemas. Attach it here and route manifest questions to it first. The index holds install manifests and CRDs rather than example workloads, so point the model at the relevant CRD for the authoritative field layout. Citations were requested by the prompt but never produced. Require a Sources list built from the "**Source:**" URLs the tools return, restricted to URLs actually retrieved. Signed-off-by: Rohit Kumar <rr7433446@gmail.com> * fix(widget): stop a wide code block collapsing the persona sidebar .main-content is a flex item with flex:1, which leaves min-width at auto, so it refused to shrink below the intrinsic width of its widest line. One long unwrappable line in a code block therefore pushed it wider than the panel: the persona sidebar next to it absorbed all the shrinkage and squeezed down to a sliver, and the overflow past the container was silently clipped by overflow:hidden. Let the column shrink, hold the sidebar at its declared width, and keep the code block's own scrollbar visible so a wide sample reads as scrollable rather than cut off. Signed-off-by: Rohit Kumar <rr7433446@gmail.com> * fix: improve retrieval quality and widget citations Signed-off-by: Rohit Kumar <rr7433446@gmail.com> * test: align retrieval checks with CI Signed-off-by: Rohit Kumar <rr7433446@gmail.com> * test: skip KFP component checks without SDK Signed-off-by: Rohit Kumar <rr7433446@gmail.com> * fix(pipelines): parameterize embedding dim and TEI/chunk sizing Address review feedback on kubeflow#234: embedding vector dimensions vary by model, and docs TEI truncation should not be a hardcoded constant. Expose embedding_dim and max_tei_chars as pipeline params (with shared defaults), and keep chunk_size/chunk_overlap defaults wired through the same constants. Signed-off-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Rohit Kumar <kmr-rohit@users.noreply.github.com> --------- Signed-off-by: Rohit Kumar <rr7433446@gmail.com> Co-authored-by: Cursor Agent <cursoragent@cursor.com> Co-authored-by: Rohit Kumar <kmr-rohit@users.noreply.github.com> Signed-off-by: Sneh Kansagara <snehkansagara@gmail.com>
This was referenced Sep 8, 2026
Closed
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
Long chatbot answers were being cut off mid-word. It looked like an output-token
cap, but vLLM was receiving
max_tokensof 29357–31831 per request and loggedzero aborted requests — the model finished every time. Two 30s deadlines in
series were killing the response instead:
gateway-guardrailscatch-all route also governed/a2a/, where theresponse streams for the whole generation rather than returning at once.
Envoy closed the SSE stream mid-token.
aggregated message for the turn, so nothing repaired the partial text.
Fixing only the first still truncated at 32s, which is what surfaced the second.
While verifying, three answer-quality faults showed up in the same replies:
config (temperature 0.7 / top_p 0.8). At that setting the model drifted
mid-sentence into Chinese inside a code block and asserted that Katib is not
part of Kubeflow.
search_kubeflow_codewas attached only to the debug agent, so the docs agenthad nothing to ground manifest questions on and invented YAML schemas.
Separately, a wide code block collapsed the expanded panel's persona sidebar,
because
.main-contentkeepsmin-width: autounderflex: 1and refuses toshrink below its widest line.
Changes
charts/gateway-guardrails/{templates/virtualservice,values}.yaml/a2a/at 300s; catch-all stays capped at 30smanifests/kagent/setup.yamlsearch_kubeflow_code; require a Sources list; correct the component list; forbid plan narrationfrontend/docs_styles/chatbot.cssmin-width: 0down the flex chain, hold sidebar width, keep the code scrollbar visibleVerification
Ran the three demo queries against the live agent via the public A2A endpoint:
Previously all three stopped mid-word around 900–1200 characters. Partial and
final stream copies now match exactly, with zero unparseable SSE events, and the
Chinese drift and "Let's search..." narration are gone.
Known gaps, not addressed here
code_ragholds 4302 entitiesthat are all install manifests (1356 CRDs, 427 ConfigMaps, RBAC) with no
example workloads. The
experiments.kubeflow.orgCRD is indexed, so theschema is reachable, but the 7B model does not use it even when instructed
not to guess. Indexing real example CRs is the likely fix.
formatMarkdowninchatbot.jshandlesonly code fences, inline code, newlines and bold, so
[text](url)and###come out literal. Needs a follow-up in the widget.
routing.cors.allowOriginsin the chart lists only the Netlify origin, whilethe live cluster also carries a hand-added Vercel origin. A helm/terraform
apply from this chart would drop it. Left alone deliberately; worth reconciling
separately.