VideosResource.create and TasksResource.create derive the Idempotency-Key header from params, but they also pass the same params through _payload, which copies every non-None keyword into the JSON body. Calling tasks.create(..., idempotency_key="idem_1") sends both the header and {"idempotency_key":"idem_1"}; APIs that validate request bodies will reject or persist this SDK-only control field. Build the payload without idempotency_key before sending the request body.
File: src/globalrouter/_resources.py
Line: 335
Severity: medium
Summary: idempotency key included in create payloads
VideosResource.create and TasksResource.create derive the Idempotency-Key header from params, but they also pass the same params through _payload, which copies every non-None keyword into the JSON body. Calling tasks.create(..., idempotency_key="idem_1") sends both the header and {"idempotency_key":"idem_1"}; APIs that validate request bodies will reject or persist this SDK-only control field. Build the payload without idempotency_key before sending the request body.
File:
src/globalrouter/_resources.pyLine: 335
Severity: medium
Summary: idempotency key included in create payloads