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

Đang mở
#41,904 1 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

@arijeetmukherjee3108-droid đang làm issue này rồi.

Từ ngày 3/12/2026.

  • #41905 của @arijeetmukherjee3108-droid — đang mở

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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
Ngôn ngữ chính
Java
Star
8.7k
Fork
4.8k
Merge trung bình
3 ngày 20 giờ
Pull request đã merge (30 ngày)
446

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/beam

Tất cả issue của apache/beam

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.