Skip to content

Conversation

@fern-support
Copy link
Collaborator

@fern-support fern-support commented Feb 10, 2026

Problem

Both the fern-generated Client and ClientV2 assign to self._raw_client. The .fernignore'd wrapper ClientV2 inherits from both, so its _raw_client parameter was getting set to the V2 only (since it is constructed last).

Fix

Create a proxy raw client that will delegate to the v2 and fall back to v1 raw client.


Note

Low Risk
Small, localized change to client initialization and attribute delegation; primary risk is subtle routing of raw client attributes between v1 and v2.

Overview
Fixes ClientV2/AsyncClientV2 method loss caused by _raw_client being overwritten when initializing both v1 and v2 client bases.

Adds a _CombinedRawClient proxy and updates both constructors to capture the v1 raw client, initialize v2, then replace _raw_client with a delegating wrapper (v2-first, v1 fallback) to keep legacy calls like generate_stream working. Tests add a small assertion that generate and generate_stream remain available on ClientV2.

Written by Cursor Bugbot for commit 21a6e5b. This will update automatically on new commits. Configure here.

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.

3 participants