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

Medium Risk
Touches core client initialization and request dispatch by changing how self._raw_client is resolved, which could affect any call path relying on raw client behavior. The change is localized but impacts both sync and async clients.

Overview
Fixes ClientV2/AsyncClientV2 losing access to legacy v1 raw-client methods (e.g. generate_stream) due to both v1 and v2 initializers overwriting self._raw_client.

Introduces a _CombinedRawClient proxy that delegates attribute access to the v2 raw client first and falls back to the captured v1 raw client, and updates both sync and async V2 client constructors to wrap _raw_client with this proxy after initialization.

Written by Cursor Bugbot for commit abbaf21. 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.

2 participants