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
{{ message }}
Repository navigation
OpenAPIToolset automatically converts camelCase to snake_case with no option to disable #4166
Is your feature request related to a problem? Please describe.
ADK's OpenAPIToolset automatically converts camelCase to snake_case when generating tool parameters, and there doesn't appear to be a built-in option to disable this. This is a problem when calling APIs which expect camelCase property names in the request body.
For example, an OpenAPI spec with sessionInfo gets converted to session_info in the actual API call, causing the target API to reject the request.
Describe the solution you'd like
It would be good to be able to flag parameters in the OpenAPI spec to preserve their original casing. For example, a vendor extension like:
Modifying the target API to accept both session_info and sessionInfo - works but requires changes to every API endpoint
Creating a custom FunctionTool wrapper instead of using OpenAPIToolset - bypasses the conversion but loses the benefits of automatic OpenAPI parsing
Using snake_case in the OpenAPI spec - but this misrepresents the actual API contract Additional context
The conversion happens in _sanitize_schema_formats_for_gemini in _gemini_schema_util.py at line 154:
field_name = _to_snake_case(field_name)
This converts all OpenAPI schema field names to snake_case before passing them to Gemini. While rest_api_tool.py does store original_name for parameters, the schema transformation happens before this mapping can preserve the original casing in the request body.
@adrianthompson-lh Thanks for the update. The request is currently being reviewed, and I will let you know if anything further is needed. Thank you for your understanding.
Added a preserve_property_names parameter to OpenAPIToolset that keeps original property names from the OpenAPI spec instead of converting them to snake_case. Backward compatible — defaults to False.
Fixed on main via #4505 (commit 078b516): OpenAPIToolset now has a preserve_property_names option to keep the original spec names instead of forcing snake_case. Closing as fixed.
Activity
klateefa commentedon Feb 11, 2026
@adrianthompson-lh Thanks for the update. The request is currently being reviewed, and I will let you know if anything further is needed. Thank you for your understanding.
feat(tools): add preserve_property_names option to OpenAPIToolset
yuvrajangadsingh commentedon Feb 16, 2026
Opened a PR for this: #4505
Added a
preserve_property_namesparameter toOpenAPIToolsetthat keeps original property names from the OpenAPI spec instead of converting them to snake_case. Backward compatible — defaults toFalse.feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
feat(tools): add preserve_property_names option to OpenAPIToolset
GWeale commentedon Jun 17, 2026
Fixed on main via #4505 (commit 078b516): OpenAPIToolset now has a preserve_property_names option to keep the original spec names instead of forcing snake_case. Closing as fixed.