Skip to content

Commit f9fe190

Browse files
committed
Revert "feat(http): add automatic retry for unknown field errors in API requests"
This reverts commit 77c5e76.
1 parent 2573496 commit f9fe190

3 files changed

Lines changed: 0 additions & 414 deletions

File tree

langfuse/_client/http_retry_patch.py

Lines changed: 0 additions & 132 deletions
This file was deleted.

langfuse/_client/resource_manager.py

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,6 @@
3535
LANGFUSE_RELEASE,
3636
LANGFUSE_TRACING_ENVIRONMENT,
3737
)
38-
from langfuse._client.http_retry_patch import (
39-
patch_async_client_for_unknown_field_retry,
40-
patch_client_for_unknown_field_retry,
41-
)
4238
from langfuse._client.span_processor import LangfuseSpanProcessor
4339
from langfuse._task_manager.media_manager import MediaManager
4440
from langfuse._task_manager.media_upload_consumer import MediaUploadConsumer
@@ -217,10 +213,6 @@ def _initialize_instance(
217213
client_headers = additional_headers if additional_headers else {}
218214
self.httpx_client = httpx.Client(timeout=timeout, headers=client_headers)
219215

220-
# Patch the httpx client to handle unknown field errors automatically
221-
# This enables backward compatibility when newer SDK versions interact with older servers
222-
patch_client_for_unknown_field_retry(self.httpx_client)
223-
224216
self.api = FernLangfuse(
225217
base_url=base_url,
226218
username=self.public_key,
@@ -231,19 +223,13 @@ def _initialize_instance(
231223
httpx_client=self.httpx_client,
232224
timeout=timeout,
233225
)
234-
235-
# Create and patch async client for async API operations
236-
async_httpx_client = httpx.AsyncClient(timeout=timeout)
237-
patch_async_client_for_unknown_field_retry(async_httpx_client)
238-
239226
self.async_api = AsyncFernLangfuse(
240227
base_url=base_url,
241228
username=self.public_key,
242229
password=secret_key,
243230
x_langfuse_sdk_name="python",
244231
x_langfuse_sdk_version=langfuse_version,
245232
x_langfuse_public_key=self.public_key,
246-
httpx_client=async_httpx_client,
247233
timeout=timeout,
248234
)
249235
score_ingestion_client = LangfuseClient(

0 commit comments

Comments
 (0)