Skip to content

docs: document runtime-version config for Python and Java SDK generators - #6452

Open
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1785345024-runtime-version-config
Open

docs: document runtime-version config for Python and Java SDK generators#6452
devin-ai-integration[bot] wants to merge 2 commits into
mainfrom
devin/1785345024-runtime-version-config

Conversation

@devin-ai-integration

Copy link
Copy Markdown
Contributor

Summary

Generated SDKs report their own version in telemetry (X-Fern-SDK-Version and the version segment of User-Agent), and that version is normally baked in as a literal when Fern generates the code. When an external tool owns versioning (release tooling that picks the version at release time, after generation), the baked guess can differ from what actually gets published, so the SDK reports a version that never existed. The Python and Java generators now accept an opt-in flag that resolves the version at runtime from the packaging layer instead, so the reported version always equals the installed or published package version.

This documents that flag in the generator configuration references:

  • fern/products/sdks/generators/python/configuration.mdx: adds runtime_version (bool, default false) — resolves via importlib.metadata.version(), falling back to the generation-time version when the distribution isn't installed.
  • fern/products/sdks/generators/java/configuration.mdx: adds runtime-version (boolean, default false) — resolves from the jar manifest (the generated build.gradle records the project version there), falling back to the generation-time version when the manifest attribute is absent.

Both entries are placed in the existing alphabetical <ParamField> ordering. No changelog entries added — the SDK generator changelogs for this release already cover it (fern/products/sdks/generators/{java,python}/changelog/2026-07-28.mdx).

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

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration
devin-ai-integration Bot requested a review from devalog as a code owner July 29, 2026 17:11
@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

</ParamField>

<ParamField path="runtime-version" type="boolean" default="false" required={false} toc={true}>
When enabled, the generated SDK resolves the version it reports in the `X-Fern-SDK-Version` header and the `User-Agent` version segment at runtime from the jar manifest, instead of the version baked in at generation time. The generated `build.gradle` records the project version in the manifest, and the generation-time version is used as a fallback when the manifest attribute is absent. Enable this when external release tooling (such as `release-please`) determines the published version after generation, so the reported version always matches the published artifact.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[FernStyles.Please] Avoid using 'please' in technical documentation.

</ParamField>

<ParamField path="runtime_version" type="bool" default="false" required={false} toc={true}>
When enabled, the generated SDK resolves the version it reports in the `X-Fern-SDK-Version` header and the `User-Agent` version segment at runtime with `importlib.metadata.version()`, instead of the version baked in at generation time. Enable this when external release tooling (such as `release-please`) determines the published version after generation, so the reported version always matches the installed package. The generation-time version is used as a fallback when the distribution isn't installed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [vale] reported by reviewdog 🐶
[FernStyles.Please] Avoid using 'please' in technical documentation.

@github-actions

Copy link
Copy Markdown
Contributor

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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.

0 participants