ag-ui-protocol / ag-ui-protocol/ag-ui

[Bug]: [langgraph/typescript] Trailing content on finish_reason chunks is silently dropped

オープン
#2,006 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
bug Integration
主要言語
Python
スター
15.9k
フォーク
1.4k
平均マージ
1日 17時間
マージ済み PR(30日)
163

説明

## Description

The TypeScript `OnChatModelStream` handler has an early return at the top of the case:

```ts
// integrations/langgraph/typescript/src/agent.ts
if (event.data.chunk.response_metadata.finish_reason) return;
```

Some providers (e.g. OpenAI, Ollama) set `finish_reason: "stop"` on the same chunk that also carries a final content delta or tool-arg delta. The early return silently drops that payload before it can be emitted.

`OnChatModelEnd` already handles final stream flushing, so this guard provides no value.

## Reproducer

```ts
// chunk: { content: "final words", response_metadata: { finish_reason: "stop" } }
// Actual: no events emitted
// Expected: TEXT_MESSAGE_START + TEXT_MESSAGE_CONTENT
```

## Affected component

`integrations/langgraph/typescript`

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。