Skip to content

Object-valued OpenAPI query parameters are serialized as dictionary strings #7233

Closed as not planned

Description

@benclarkeio

🔴 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:

  1. 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
  2. Build a RestApiTool for the operation.

  3. Call the tool with {"filters": {"category": "books", "page": 2}}.

  4. 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?:

  • Always (100%)

Activity

  1. self-assigned this
    on Sep 22, 2026
  2. GWeale commented on Sep 22, 2026

    @GWeale
    Collaborator

    duplicate of #7204, filed three days earlier against the same code: _prepare_request_params hands an object-valued query parameter to httpx, which sends its python repr. #7204 covers your form/explode case plus deepObject and non-exploded arrays, and the open pull request #7208 handles all of them. the test from your #7234 passes unchanged with #7208 applied. please follow #7204. open a new issue if you want us to look at it again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions