From 404f68b7412039c62e2438d145c9836f33fca512 Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 00:35:01 +0000 Subject: [PATCH 1/2] fix: propagate api_budget to parent streams in substream partition routers When parent streams are created for substream partition routers, a new ModelToComponentFactory instance is created without the global _api_budget being propagated. This causes parent streams to ignore rate limiting configuration, leading to 403 errors when API rate limits are exceeded. This fix ensures that the _api_budget is propagated to the new factory instance so parent streams respect the same rate limiting configuration as child streams. Fixes airbytehq/oncall#9874 Co-Authored-By: unknown <> --- .../sources/declarative/parsers/model_to_component_factory.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py b/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py index fdaf26bba..eecb1682a 100644 --- a/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +++ b/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py @@ -3888,6 +3888,8 @@ def create_parent_stream_config_with_substream_wrapper( ), ), ) + + substream_factory._api_budget = self._api_budget return substream_factory.create_parent_stream_config( model=model, config=config, stream_name=stream_name, **kwargs From 48be581254ac057e2c05ba840fe2ce34965f775d Mon Sep 17 00:00:00 2001 From: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Tue, 4 Nov 2025 00:37:49 +0000 Subject: [PATCH 2/2] fix: apply ruff formatting Co-Authored-By: unknown <> --- .../sources/declarative/parsers/model_to_component_factory.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py b/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py index eecb1682a..7bcbec04e 100644 --- a/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py +++ b/airbyte_cdk/sources/declarative/parsers/model_to_component_factory.py @@ -3888,7 +3888,7 @@ def create_parent_stream_config_with_substream_wrapper( ), ), ) - + substream_factory._api_budget = self._api_budget return substream_factory.create_parent_stream_config(