Skip to content

fix: casing mismatch between the google api and python sdk#2116

Open
strangeleo02 wants to merge 3 commits intogoogleapis:mainfrom
strangeleo02:fix-interactions-state
Open

fix: casing mismatch between the google api and python sdk#2116
strangeleo02 wants to merge 3 commits intogoogleapis:mainfrom
strangeleo02:fix-interactions-state

Conversation

@strangeleo02
Copy link

Title: Fix casing mismatch in Interactions module

Issue: #2112

Problem:
The SDK used snake_case while the API expected/returned camelCase. This caused previous_interaction_id to be ignored in requests and returned as None in responses.

Solution:
Implemented bidirectional aliasing to sync the naming conventions:

  • Requests: Added PropertyInfo(alias="...") to interaction_create_params.py and generation_config_param.py.
  • Responses: Added Pydantic Field(alias="...") to interaction.py and usage.py.
  • Regression: Added test_persistence.py to verify that state is correctly mapped and preserved.

Closes #2112

@google-cla
Copy link

google-cla bot commented Feb 27, 2026

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

Added PropertyInfo/Field aliases to map snake_case to camelCase.

Added test_persistence.py to verify field mapping.
@strangeleo02 strangeleo02 force-pushed the fix-interactions-state branch from b8dc1dc to 06e66bd Compare February 27, 2026 20:59
@strangeleo02 strangeleo02 changed the title Fixed the casing mismatch between the google api and python sdk fix: casing mismatch between the google api and python sdk Feb 27, 2026
@strangeleo02
Copy link
Author

@MarkDaoust can you look into this??

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.

Interaction ID Not Persisting Across Requests

1 participant