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

Aperta
#41,904 1 commento 0 reazioni 1 assegnatario Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

@arijeetmukherjee3108-droid ci sta già lavorando.

Dal 3/12/2026.

  • #41905 di @arijeetmukherjee3108-droid — aperta

Valutazione

Questa issue non è ancora stata valutata.

Descrizione

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
Lingua principale
Java
Stelle
8.7k
Fork
4.8k
Merge medio
3g 20h
PR unite (30g)
446

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/beam

Tutte le issue di apache/beam

Issue simili

Altre issue su Java

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.