Skip to content

fix(showcase): unblock L3/L4 smoke across 6 integrations (plus spring-ai L3) - #4083

Merged
jpr5 merged 45 commits into
mainfrom
fix/showcase-smoke-failures
Apr 19, 2026
Merged

jpr5 merged 45 commits into
mainfrom
fix/showcase-smoke-failures

Conversation

@jpr5

@jpr5 jpr5 commented Apr 19, 2026

Copy link
Copy Markdown
Contributor

Summary

Surfaced by running the integration-smoke suite (pnpm smoke:local from PR #4077) against all 17 integrations locally. 8 commits fix L3 (round-trip chat) and/or L4 (tool rendering) for 6 packages — plus spring-ai L3 (L4 still WIP in a follow-up).

Fixes

Package Commit L3 L4 Root cause
mastra 3e8c2b6c ✅ ✅ @ag-ui/mastra forwarded empty-string resourceId to Memory. Pass a stable per-demo id.
langroid (empty delta) c7f32cde ✅ — AG-UI TextMessageContentEvent rejects delta="". Skip empty emissions.
ms-agent-dotnet b71a3704 ✅ ✅ SharedStateAgent forced ForJsonSchema<SalesStateSnapshot>() on every request, killing plain-chat streams via yield break. Gate the two-pass on actual sales state.
google-adk 2de569f1 ✅ ✅ Gemini intermittently returned empty parts; simple_after_model_modifier over-terminated; PROGRESSIVE_SSE_STREAMING emitted partial events. Reordered system prompt, hardened modifier, disabled progressive SSE.
strands (OTel) 7a8ab4d0 ✅ — strands-agents unconditionally calls ThreadingInstrumentor().instrument(), recursing fatally. Monkey-patch to no-op before import.
langroid (tool calls) 5c059362 ✅ ✅ Adapter only inspected response.content; tool calls arrive via response.oai_tool_calls. Synthesize TOOL_CALL_* events from them.
strands (tool cap) a2b41e71 ✅ ✅ No upstream max-iteration cap led to 300+ weather-tool loops. HookProvider caps at 8 + stop_streaming_after_result; _HookInjectingAgentDict propagates hooks across per-thread agents since ag_ui_strands doesn't.
spring-ai (L3) 0c62d462 ✅ ⏳ Spring-AI ignored showcase-wide OPENAI_BASE_URL (expects no-/v1); HTTP client advertised Upgrade: h2c on cleartext; JDK HttpClient pooling reused half-closed sockets. New SPRING_AI_OPENAI_BASE_URL + WebClientConfig (HTTP/1.1 pin) + jdk.httpclient.keepalive.timeout=0. L4 tool-rendering still times out — BoundedToolCallingManagerConfig scaffold included; follow-up commit / PR will finalize.

Verification

Full local run (all 17 integrations via LOCAL_PORTS=1 SMOKE_ALL=true):

  • 30 passed / 1 failed (spring-ai L4) / 3 flaky (agno L3, ag2 L3, strands L4 — all pass on retry) out of 34 L3+L4 tests (17.3 min wall clock)
  • Every fixed package verified stable at 3/3 reruns against the local Docker stack

Scope note

Fixes are applied in showcase/packages/*/ only. Some share roots with canonical code in examples/integrations/ or upstream repos (@ag-ui/mastra, ag_ui_strands, strands-agents, MS Agent Framework samples). Separate backport PRs + upstream issues will follow.

Test plan

  • CI green (unit, format, lint, commitlint, Validate Showcase, package-quality)
  • Post-merge Railway deploy of ms-agent-dotnet, mastra, langroid, google-adk, strands shows /api/health returning agent:"ok" + tool-rendering works in the UI
  • spring-ai L4 follow-up PR closes out the last gap

@vercel

vercel Bot commented Apr 19, 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 19, 2026 4:06am
docs Ready Ready Preview, Comment Apr 19, 2026 4:06am
form-filling Ready Ready Preview, Comment Apr 19, 2026 4:06am
research-canvas Ready Ready Preview, Comment Apr 19, 2026 4:06am
travel Ready Ready Preview, Comment Apr 19, 2026 4:06am

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

jpr5 added 7 commits April 18, 2026 20:44
Add openai.OpenAIError (SDK base class) to the generate_a2ui except
tuple so config-time failures — e.g. OpenAI() construction with unset
or malformed OPENAI_API_KEY — become a structured a2ui_llm_error dict
instead of bubbling through the ADK tool machinery as an uncaught
exception. APIError and friends are subclasses of OpenAIError; the
constructor raises OpenAIError directly, which the narrowed tuple
previously missed. Parity fix with the strands sibling (R4).

Also:
- _A2uiError docstring now acknowledges 3-way sync with strands AND
  langroid (all three carry the same TypedDict).
- search_flights docstring relaxed from 'exactly 2 flights' to '2-3
  flights' so google-adk is consistent with ms-agent-dotnet (which
  returns 3).
- Added test exercising openai.OpenAIError from the OpenAI()
  constructor path; asserts a2ui_llm_error with full error shape.
- Narrow the mid-stream except around agent.llm_response_async from a
  broad Exception to (openai.APIError, httpx.HTTPError,
  asyncio.TimeoutError, pydantic.ValidationError). Programmer bugs
  (AttributeError, NameError, TypeError) now propagate instead of
  being sanitized as 'Agent run failed: <ClassName>' — keeps real
  bugs visible in server logs and stack traces, where they belong.
  Expected runtime errors still get the sanitized TEXT_MESSAGE +
  RUN_FINISHED treatment so the UI never hangs mid-stream.

- Update _parse_tool_args call-site comment in handle_run: it used
  to say 'returns None' when args could not be parsed; the function
  now returns ParsedArgs with status in {ok, empty, malformed}, and
  the caller already pattern-matches on .usable.

- Fix stale _try_parse_tool docstring that referenced the old
  agent.agent_response() API; the adapter has used
  llm_response_async() for a while now.

Tests: add test_llm_response_async_programmer_bug_propagates — mocks
llm_response_async to raise AttributeError('typo') and asserts the
exception propagates out of the SSE generator (not sanitized).
Update the existing mid-stream-failure test to raise
asyncio.TimeoutError (a covered exception) instead of RuntimeError
so it continues to exercise the sanitization path.
R5 added BoundedToolCallingManagerConfig, OpenAiApiKeyValidator, and
WebClientConfig to showcase/packages/spring-ai/agent/ plus updated
application.properties and pom.xml. Starters were out of sync so
drift-check failed. Ran generate-starters.ts to sync.

Also add bin/ and obj/ .NET build artifacts to ms-agent-dotnet starter
.gitignore so generator output stays clean.
…unit tests

Python unit-test workflow previously installed only pytest +
typing_extensions, assuming stdlib-only tests. Tests now import runtime
deps (openai, google.genai, httpx, opentelemetry, etc.) at module load
time, causing ModuleNotFoundError at pytest collection before
conftest-based stub finders run.

Loop each showcase/packages/*/ with a tests/python/ dir, pip install the
package's requirements.txt (if present) before pytest. Re-enable pip
cache keyed on those requirements files. Matches real-runtime parity.

Refs blocker 2 on PR #4083 (fix/showcase-smoke-failures).
ms-agent-dotnet starter was hand-patched with bin/, obj/, *.user, *.suo
but the template wasn't updated — drift-check kept flagging it on regen.
Add the entries to the template so all 17 starters pick them up uniformly
(harmless for non-.NET starters).
Two CI fixes for the showcase_validate python-unit-tests job on PR #4083:

1. Install pytest-asyncio (and pytest-mock) in the shared "minimal test
   deps" step. langroid/tests/python/test_agui_adapter.py has 16 tests
   annotated with @pytest.mark.asyncio; without the plugin, pytest
   reports "async def functions are not natively supported" and skips
   them. Locally the user's venv has it; CI did not.

2. Surgically skip the strands package on Python 3.10.
   ag_ui_strands==0.1.0 declares requires-python >=3.12,<3.14, so
   pip install fails on 3.10 before pytest runs. Prefer the surgical
   skip over dropping 3.10 from the matrix so the typing_extensions
   NotRequired fallback path in aimock_toggle.py keeps getting
   exercised.

This branch was successfully deployed

5 active deployments
Preview – research-canvas — a05ccfbc Deployed Apr 19, 2026 by vercel[bot]
Preview – travel — a05ccfbc Deployed Apr 19, 2026 by vercel[bot]
Preview – form-filling — a05ccfbc Deployed Apr 19, 2026 by vercel[bot]
Preview – docs — a05ccfbc Deployed Apr 19, 2026 by vercel[bot]
Preview – chat-with-your-data — a05ccfbc Deployed Apr 19, 2026 by vercel[bot]
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