5.9.1
(fix): Respect the customer’s smart-casing flag from generators.yml when computing
Python identifiers from compressed v66 IR strings. Previously the v1 Python
generator’s _smart_snake and v2’s PYTHON_CASE_CONVERTER were both hardcoded
with smartCasing: true, causing names produced by the generator to diverge
from the IR’s pre-computed snake_case values when the customer set
smart-casing: false. This manifested as wire-test method calls and Pydantic
field aliases that did not exist on the generated client (e.g. test calling
set_fcmv_1_provider() while the client method was named set_fcmv1provider).
_smart_snake and the v2 caseConverter now read casingsConfig.smartCasing
from the IR and switch between smart-casing semantics (default) and plain
lodash semantics (smart-casing: false). No effect for customers who use
the default; fixes generation for customers like auth0 that opt out.
5.9.0
(feat): Add retryStatusCodes config with "legacy" and "recommended" modes. Legacy (default)
preserves current behavior (408, 409, 429, >= 500). Recommended retries only transient
codes (408, 409, 429, 502, 503, 504), avoiding idempotency issues with 500. A 6.0.0
migration auto-pins legacy for upgrading users.
5.8.4
(chore): Bump @fern-api/generator-cli to 0.9.21, which includes @fern-api/replay
0.14.0 with fixes for silent customization loss across apply and resolve
paths, per-patch-region diff, and clean follow-up patch preservation.
5.8.2
(chore): 将 @fern-api/generator-cli 升级到 0.9.16,该版本将 autoversion 管道的私有工作区依赖项(@fern-api/logging-execa、@fern-api/task-context、@fern-api/cli-ai)打包到发布的 dist/api.js 中,使消费者不再在 Vite/Vitest 下遇到 logging-execa/src/createLoggingExecutable.js 的 ERR_MODULE_NOT_FOUND 错误。
5.8.1
(chore): 将生成的 urllib3 开发依赖项固定收紧到 >=2.6.3,<3.0.0(Python >= 3.9)以解决 CVE-2026-21441 和其他几个高严重性 urllib3 安全公告。仍支持 Python 3.8 的项目回退到 1.x 系列可用的最严格安全约束。
5.8.0
(feat): 支持通过 IR 中的 usernameOmit 或 passwordOmit 配置从基本认证中省略用户名或密码。省略的字段从 SDK 的公共 API 中移除,并在内部视为空字符串(如省略密码编码为 username:,省略用户名编码为 :password)。当两者都省略时,Authorization header 将完全跳过。
5.7.0
(feat): 当通过认证方案的 placeholder 字段配置时,在 README 代码片段中使用认证方案占位符值。
5.6.1
(fix): 修复 @fern-api/python-dynamic-snippets 以遵循 use_typeddict_requests 配置选项。启用时,动态代码片段现在为对象和判别联合类型生成字典字面量而不是 Pydantic 模型构造函数。
5.6.0
(feat): 在生成的 Python SDK 中支持 x-fern-default 作为参数的回退值。当 header、查询参数或路径参数在 IR 中具有 clientDefault 值时,生成的 Python 函数签名将该参数设为可选,并自动应用默认值。这启用了诸如回退到固定版本的可选 API 版本 headers 等模式。
5.5.11
(chore): 将 @fern-api/generator-cli 升级到 0.9.13,修复了 0.9.12 的发布问题(autoversion 管道 + @fern-api/replay 0.12.0),通过在 generator-cli CLI 包中将 @boundaryml/baml 标记为外部,使 esbuild 不再尝试静态解析 baml 的平台特定原生绑定。
5.5.10
(chore): 将 @fern-api/generator-cli 升级到 0.9.12,该版本提供 FER-9980 autoversion 管道(AutoVersionStep 在 [fern-generated] 提交和 replay 应用之间运行,对比纯生成器输出来驱动 semver 版本升级和通过 FAI 的变更日志条目)并固定 @fern-api/replay 到 0.12.0。
5.5.9
(chore): 将 @fern-api/generator-cli 升级到 0.9.11。GitHub 管道步骤现在通过 GitHub REST API 创建签名提交(匹配 fiddle 的旧版 InMemoryGitRepo 推送路径),恢复了启用 replay 的组织上经过验证的 fern-api[bot] 提交。
5.5.8
(fix): 修复具有多值数组查询参数的端点的 wire 测试验证。
5.5.7
(chore): 通过 Sentry 向生成器运行时添加崩溃报告,并使用新的共享 GeneratorError 分类法对抛出的错误进行分类,使用户面向的失败(配置、验证、认证、网络、环境)与内部 Fern 错误保持区别 — 只有后者被转发到 Sentry。生成输出无变化。
5.5.6
(fix): 当作为子包名称使用时,对 Python 保留关键字(如 import、class、from)进行转义。之前,以 Python 关键字命名的子包会生成损坏的 __init__.py(例如,from .import.client import ImportClient),导致解析失败。子包目录现在使用命名规范生成器的 safe_name 来生成(例如,import_),这与其他标识符已经处理保留关键字的方式保持一致。
5.5.5
(fix): 将生成的 aiohttp 可选依赖的下限从 >=3.10.0,<4 提升到 >=3.13.4,<4,并在 aiohttp 和 httpx-aiohttp 上添加 python = ">=3.9" 标记,以便 aiohttp extra 仅在 Python 3.9+ 上安装,同时仍允许 SDK 本身支持 Python 3.8。在依赖规范级别强制执行 GHSA-c427-h43c-vf67 (CVE-2026-34525) 的修补最低版本。
5.5.4
(fix): 将生成器产生的最低 Python 版本限制为 ^3.10。Python 3.8 在 2024 年 10 月达到 EOL,Python 3.9 在 2025 年 10 月达到 EOL;许多流行的 PyPI 包(例如 requests >=2.33)不再为这些版本发布 wheel,这会导致依赖解析固定较旧的已知漏洞版本(GHSA-gc5v-m9x4-r6x2 / CVE-2026-25645)。当 pyproject_python_version 指定允许低于 3.10 版本的范围时,生成器现在会记录警告并在生成的 pyproject.toml 中发出 python = "^3.10"。
(fix): 将生成的 wire 测试套件使用的 requests / types-requests 依赖从 ^2.31.0 升级到 ^2.33.0,以获取 GHSA-gc5v-m9x4-r6x2(requests.utils.extract_zipped_paths 中不安全的临时文件重用)的修复。
(chore): 在生成的 SDK 的开发依赖中添加防御性的 urllib3 固定,排除了 CVE-2024-37891 (GHSA-34jh-p97f-mpxf) 修复的易受攻击的 >=2.0.0,<2.2.2 范围。这防止了即使用户提供的 extra_dependencies 传递性地限制了 urllib3(例如,较旧的 boto3 固定其 botocore 要求 urllib3 < 2.1),poetry lock 也不会解析到易受攻击的 urllib3。
5.5.3
(chore): 对于针对 Python 3.9+ 的 SDK,将生成的 pytest 开发依赖从 ^8.2.0 升级到 ^9.0.3。这解决了 CVE-2025-71176 (GHSA-6w46-j5rx-g56g),这是一个关于 UNIX 上不安全的 /tmp/pytest-of-{user} 处理的中等严重性问题。仍然支持 Python 3.8 的项目继续使用 pytest ^7.4.0,因为 pytest 9 需要 Python 3.9+。
5.5.2
(fix): 修复生成的 wire 测试和动态代码片段以遵循 pydantic_config.union_naming: v1。之前,wire 测试和 README/参考代码片段中的变体类名始终使用 v0 后缀样式(如 UnionName_Variant),当 SDK 类型使用 v1 前缀样式名称(如 VariantUnionName)生成时会导致导入错误。