7 Commits

Author SHA1 Message Date
Maxim a1c598dc14 fix(sdk-python): forward base-agent kwargs so LangGraphAGUIAgent survives clone()
add_langgraph_fastapi_endpoint clones the agent on every request, and
LangGraphAgent.clone() rebuilds it through type(self)(...) forwarding the base
class's own behavior flags. LangGraphAGUIAgent restated a closed keyword-only
signature, so ag-ui-langgraph 0.0.43 - which began forwarding
enable_legacy_on_interrupt_event, emit_interrupt_outcome and emit_raw_events -
made every request 500 on the documented LangGraph + FastAPI quickstart:

  TypeError: LangGraphAGUIAgent must override clone() or ensure its __init__
  accepts (name, graph, description, config) as keyword arguments:
  LangGraphAGUIAgent.__init__() got an unexpected keyword argument
  'enable_legacy_on_interrupt_event'

Our dependency is ag-ui-langgraph[fastapi]>=0.0.42 with no upper bound, so a
fresh install already resolves to 0.0.43 and fails on the first message.

__init__ now forwards **kwargs upstream instead of restating the base signature.
That fixes the 500 without waiting on an upstream release, and makes base flags
reachable at all - emit_raw_events=False, the OSS-607 payload opt-out, could not
be set by any CopilotKit user through this subclass.

Also constructs the intercepted-tool-call test double for real rather than via
object.__new__. That helper built an instance with no behavior flags set, so it
raised AttributeError out of the base dispatch path the moment ag-ui-langgraph
started reading one - 4 failures the pinned 0.0.42 lockfile currently hides.

Verified against published ag-ui-langgraph, both versions: 0.0.43 gives 235
passed / 11 skipped (was 4 failed, 226 passed), and 0.0.42 gives 233 passed /
13 skipped (the two flag tests skip by design). End to end, two sequential
POSTs through add_langgraph_fastapi_endpoint on 0.0.43 return HTTP 200 with no
RUN_ERROR, where the published packages raise at endpoint.py:23.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-09-01 12:27:16 +02:00
Rod Boev d9667bc5f1 test(sdk-python): cover intercepted event delivery boundaries 2026-08-12 12:39:39 -04:00
Rod Boev ca2818f6dc fix(sdk-python): deliver intercepted action events through the adapter 2026-08-12 12:22:12 -04:00
Rod Boev 9f77123df4 fix(sdk-python): route intercepted action events through adapter filtering 2026-08-12 12:10:16 -04:00
Rod Boev 1340fd806d fix(sdk-python): suppress duplicate streamed tool lifecycle events (#4342) 2026-07-27 07:28:19 -04:00
Rod Boev 3338c7f1e4 test(sdk-python): prove intercepted sdk action event emission (#4342) 2026-07-27 07:24:12 -04:00
Rod Boev 9fcaf34225 fix(sdk-python): emit tool call events for middleware-intercepted SDK Actions 2026-07-27 07:24:12 -04:00