Skip to content

Idempotency key is also sent in JSON payloads #134

@saxon134

Description

@saxon134

VideosResource.create and TasksResource.create build the JSON body from the full params mapping while also converting params.get("idempotency_key") into the Idempotency-Key header. A call such as client.videos.create(model="m", prompt="p", idempotency_key="idem") sends both the header and a body field named idempotency_key. Since this is an SDK transport option, it should be removed from the request payload before calling _payload; otherwise APIs may reject the unexpected field or treat it as model input.

File: src/globalrouter/_resources.py

Line: 335

Severity: medium

Summary: idempotency key leaks into create payloads

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions