Skip to content

AI-61: Strip unset None fields from ADK plugin payloads#1442

Merged
xumaple merged 3 commits intomainfrom
maplexu/AI-61-null-stripping
Apr 13, 2026
Merged

AI-61: Strip unset None fields from ADK plugin payloads#1442
xumaple merged 3 commits intomainfrom
maplexu/AI-61-null-stripping

Conversation

@xumaple
Copy link
Copy Markdown
Contributor

@xumaple xumaple commented Apr 13, 2026

Summary

  • Use ToJsonOptions(exclude_unset=True) in the ADK plugin's PydanticPayloadConverter, matching the OpenAI plugin's existing pattern
  • Reduces LlmRequest payloads from 4-8KB of mostly nulls to just the fields that were actually set
  • Explicitly-set None values are preserved (exclude_unset, not exclude_none)

Test plan

  • test_unset_none_fields_stripped — verifies unset None fields absent from serialized payload
  • test_explicitly_set_none_preserved — verifies explicitly-set None is kept (distinguishes from exclude_none)
  • Full existing test suite passes

🤖 Generated with Claude Code

Use ToJsonOptions(exclude_unset=True) in the ADK plugin's payload
converter, matching the OpenAI plugin's pattern. This reduces LlmRequest
payloads from 4-8KB of mostly nulls to just the fields that were set.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@xumaple xumaple requested a review from a team as a code owner April 13, 2026 20:12
…ripping

# Conflicts:
#	tests/contrib/google_adk_agents/test_google_adk_agents.py
@xumaple xumaple enabled auto-merge (squash) April 13, 2026 21:01
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@xumaple xumaple merged commit 160bfce into main Apr 13, 2026
17 checks passed
@xumaple xumaple deleted the maplexu/AI-61-null-stripping branch April 13, 2026 21:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants