Skip to content

fix(cli): send dynamicIRLanguages on registerApiDefinition instead of the IR bodies - #17461

Draft
devin-ai-integration[bot] wants to merge 6 commits into
mainfrom
devin/1787070232-cli-dynamic-ir-languages
Draft

fix(cli): send dynamicIRLanguages on registerApiDefinition instead of the IR bodies#17461
devin-ai-integration[bot] wants to merge 6 commits into
mainfrom
devin/1787070232-cli-dynamic-ir-languages

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Description

Fixes PAYLOAD_TOO_LARGE (413) failures when publishing docs for large APIs with dynamic SDK snippets (sigma's code-representation).

publishDocs was sending the entire dynamic IR inline in the registerApiDefinition body once per SDK language (~6 MB × 5 languages ≈ 30 MB for sigma), even though the registry only ever reads the language names in order to mint one presigned S3 upload URL per language. The IRs are uploaded to S3 separately, and docs rendering reads them from S3 — never from the register request.

The request now carries just dynamicIRLanguages: string[], the honest shape added to FDR in fern-platform#14007 (merging first, so no legacy dynamicIRs fallback is needed here). Sigma's register body drops from ~30 MB to ~2 MB (the API definition itself); snippets are unchanged.

Supersedes #17426 (closed — that was the intermediate step that sent an empty dynamicIRs map).

Changes Made

  • publishDocs: send dynamicIRLanguages: Object.keys(dynamicIRsByLanguage) instead of the dynamic IR map; the full IRs stay in memory and still flow into the existing S3 upload path.
  • Add a debug log with the serialized register-request size and dynamic IR language count (asserted on by the dev test in fern-platform#14007).
  • Changelog entry.

Testing

  • Unit tests added/updated — npx turbo test --filter=@fern-api/remote-workspace-runner (246 passing)
  • Manual testing completed — dev test in fern-platform#14007 publishes a 200-endpoint API with python + typescript SDK generators through a locally built CLI containing this change: register body 1.89 MB vs 13.45 MB with the change reverted (same fixture).

Related: fern-api/fern-platform#14007 (FDR accepts dynamicIRLanguages + dev test). Merge that first.

Link to Devin session: https://app.devin.ai/sessions/8f61e79cb12c453b8b22dd6809985f1c

willkendall01 and others added 4 commits August 14, 2026 20:18
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Contributor Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment, CI, and merge conflict monitoring

willkendall01 and others added 2 commits August 18, 2026 19:02
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot changed the base branch from devin/1786738697-fix-register-api-definition-payload to main August 18, 2026 19:08
@devin-ai-integration devin-ai-integration Bot changed the title fix(cli): send dynamicIRLanguages on registerApiDefinition fix(cli): send dynamicIRLanguages on registerApiDefinition instead of the IR bodies Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants