[Bug]: ADKAgentModelHandler crashes on non-text parts and doesn't delete temporary sessions

オープン
#41,904 コメント 1 件 リアクション 0 件 担当者 1 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

@arijeetmukherjee3108-droid がすでに取り組んでいます。

2026年12月3日 から。

  • #41905 @arijeetmukherjee3108-droid による — オープン

評価

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

説明

bug P2 python
What happened?

Ran into two issues in sdks/python/apache_beam/ml/inference/agent_development_kit.py:

  1. In _invoke_agent(), final response text is built with "".join([p.text for p in event.content.parts]). Since Part.text is optional and can be None (e.g. for inline data), this throws a TypeError whenever a final event contains any non-text part.

  2. In default stateless mode (when no session_id is passed in inference_args), run_inference() generates a fresh UUID and calls create_session() for every element, but never deletes it afterwards. With the default InMemorySessionService, those sessions stay in memory for the lifetime of the worker.

Issue Priority

Priority: 2 (default / most bugs should be filed as P2)

Issue Components
  • Component: Python SDK
  • Component: Java SDK
  • Component: Go SDK
  • Component: Typescript SDK
  • Component: IO connector
  • Component: Beam YAML
  • Component: Beam examples
  • Component: Beam playground
  • Component: Beam katas
  • Component: Website
  • Component: Infrastructure
  • Component: Spark Runner
  • Component: Flink Runner
  • Component: Prism Runner
  • Component: Hazelcast Jet Runner
  • Component: Google Cloud Dataflow Runner
主要言語
Java
スター
8.7k
フォーク
4.8k
平均マージ
3日 20時間
マージ済み PR(30日)
446

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

apache/beam のほかの issue

apache/beam の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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