馃敶 Required Information
Describe the Bug:
RestApiTool passes object-valued query parameters directly to the HTTP client. For OpenAPI's default query serialization (style: form, explode: true), this produces one stringified dictionary value instead of separate query parameters.
Steps to Reproduce:
-
Create an OpenAPI operation with a query parameter like this:
paths:
/items:
get:
operationId: listItems
parameters:
- name: filters
in: query
schema:
type: object
properties:
category:
type: string
page:
type: integer
-
Build a RestApiTool for the operation.
-
Call the tool with {"filters": {"category": "books", "page": 2}}.
-
Inspect the outgoing query string.
Expected Behavior:
The outgoing query string is ?category=books&page=2.
Observed Behavior:
The request contains one stringified dictionary value, equivalent to ?filters=%7B%27category%27%3A+%27books%27%2C+%27page%27%3A+2%7D.
Environment Details:
- ADK Library Version: 2.9.2
- Desktop OS: macOS
- Python Version: 3.13
Model Information:
- Are you using LiteLLM: N/A
- Which model is being used: N/A
馃煛 Optional Information
Regression:
No known working version.
Logs:
N/A
Screenshots / Video:
N/A
Additional Context:
OpenAPI defaults query parameters to style: form, with explode defaulting to true for that style. The parsed operation retains those settings, but _prepare_request_params currently forwards the dictionary unchanged.
Minimal Reproduction Code:
request_params = tool._prepare_request_params(
tool._operation_parser.get_parameters(),
{"filters": {"category": "books", "page": 2}},
)
assert request_params["params"] == {"category": "books", "page": 2}
How often has this issue occurred?:
馃敶 Required Information
Describe the Bug:
RestApiToolpasses object-valued query parameters directly to the HTTP client. For OpenAPI's default query serialization (style: form,explode: true), this produces one stringified dictionary value instead of separate query parameters.Steps to Reproduce:
Create an OpenAPI operation with a query parameter like this:
Build a
RestApiToolfor the operation.Call the tool with
{"filters": {"category": "books", "page": 2}}.Inspect the outgoing query string.
Expected Behavior:
The outgoing query string is
?category=books&page=2.Observed Behavior:
The request contains one stringified dictionary value, equivalent to
?filters=%7B%27category%27%3A+%27books%27%2C+%27page%27%3A+2%7D.Environment Details:
Model Information:
馃煛 Optional Information
Regression:
No known working version.
Logs:
N/A
Screenshots / Video:
N/A
Additional Context:
OpenAPI defaults query parameters to
style: form, withexplodedefaulting totruefor that style. The parsed operation retains those settings, but_prepare_request_paramscurrently forwards the dictionary unchanged.Minimal Reproduction Code:
How often has this issue occurred?: