You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix: fix fork detection, correct offload limits, and add response logging in BigQuery plugin
This PR addresses three distinct issues in the BigQuery Agent Analytics Plugin:
1. Fix false-positive fork detection:
When the plugin is deployed via Vertex AI Agent Engine, it undergoes a pickle/unpickle lifecycle which resets `_init_pid` to 0. Previously, `_ensure_started()` would incorrectly detect this as a fork since `os.getpid()` is never 0, causing unnecessary cold-start latency and log noise. The PID check now distinguishes `_init_pid == 0` (unpickled) from a real fork.
2. Correct GCS offload unit mismatch:
Separates the evaluation limits for offloading text content to GCS. It evaluates the byte-based storage guard (`inline_text_limit`) and the character-based truncation limit (`max_length`) independently, preventing mismatched unit comparisons.
3. Add AGENT_RESPONSE logging:
Logs final response events emitted by agents to BigQuery. This explicitly filters out intermediate steps such as function calls/responses, streaming partials, and invisible internal reasoning ("thoughts") so that only the final visible response text is captured.
Co-authored-by: Haiyuan Cao <haiyuan@google.com>
PiperOrigin-RevId: 910770002
0 commit comments