fix: send list-of-primitive multipart fields as repeated form fields (#819) (#825)
Interim hotfix for the v2.59.0 regression introduced by generator fern-python-sdk 4.46.9 (commit cb4feb824, PR fern-api/fern#11284), which began serializing every non-scalar multipart form field via json.dumps(jsonable_encoder(...)). List[str] fields are not scalar primitives, so they were sent as a single JSON-array string instead of repeated form fields -- causing the API to validate the whole array against per-item limits (e.g. speech_to_text keyterms -> invalid_keyword_length). Reverts the 8 list-of-primitive fields to raw values so httpx emits repeated form fields, matching generator fix 5.22.2. Object fields (labels, entity_detection, entity_redaction, webhook_metadata) keep json.dumps. Removes now-unused json / jsonable_encoder imports. This is intended to be carried across regenerations by Fern Replay and retired (`fern replay forget`) once the 4.x backport of 5.22.2 lands. Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
K
Kræn Hansen committed
560b89344199f0abe20d36f6963565818b3df6dd
Parent: 54e5899
Committed by GitHub <noreply@github.com>
on 7/30/2026, 7:49:23 AM