VideosResource.create and TasksResource.create pass all keyword params through _payload(request, params) while also deriving the Idempotency-Key header from params.get("idempotency_key"). With the main src package on PYTHONPATH, client.tasks.create(type="image_generation", idempotency_key="idem_1") sends both header Idempotency-Key: idem_1 and JSON body {"type":"image_generation","idempotency_key":"idem_1"}. If the API treats idempotency as a header-only control field, strict request validation can reject the request or persist the control field as task input. Exclude idempotency_key from the serialized payload before calling _payload for sync and async create methods.
File: src/globalrouter/_resources.py
Line: 335
Severity: medium
Summary: idempotency key serialized in create payloads
VideosResource.createandTasksResource.createpass all keyword params through_payload(request, params)while also deriving theIdempotency-Keyheader fromparams.get("idempotency_key"). With the mainsrcpackage onPYTHONPATH,client.tasks.create(type="image_generation", idempotency_key="idem_1")sends both headerIdempotency-Key: idem_1and JSON body{"type":"image_generation","idempotency_key":"idem_1"}. If the API treats idempotency as a header-only control field, strict request validation can reject the request or persist the control field as task input. Excludeidempotency_keyfrom the serialized payload before calling_payloadfor sync and async create methods.File:
src/globalrouter/_resources.pyLine: 335
Severity: medium
Summary: idempotency key serialized in create payloads