From 94a651cee2e375676a95d5097bb26ae1e2a877de Mon Sep 17 00:00:00 2001 From: Paul Kompfner Date: Tue, 17 Feb 2026 15:15:18 -0500 Subject: [PATCH] Remove dead `ServiceSettings.to_dict` method --- src/pipecat/services/settings.py | 12 ------------ tests/test_settings.py | 4 ---- 2 files changed, 16 deletions(-) diff --git a/src/pipecat/services/settings.py b/src/pipecat/services/settings.py index 056621845..0721cf3cd 100644 --- a/src/pipecat/services/settings.py +++ b/src/pipecat/services/settings.py @@ -228,18 +228,6 @@ class ServiceSettings: instance.extra = extra return instance - def to_dict(self) -> Dict[str, Any]: - """Serialize to a flat dictionary, including extra. - - Only given (non-``NOT_GIVEN``) values are included. This is the - inverse of ``from_mapping`` and useful for passing settings to APIs - that expect plain dicts. - - Returns: - A flat dictionary of all given settings. - """ - return self.given_fields() - def copy(self: _S) -> _S: """Return a deep copy of this settings instance. diff --git a/tests/test_settings.py b/tests/test_settings.py index 71d66fc35..85f89987c 100644 --- a/tests/test_settings.py +++ b/tests/test_settings.py @@ -75,10 +75,6 @@ class TestServiceSettings: result = s.given_fields() assert result == {"model": "gpt-4o", "custom_key": 42} - def test_to_dict(self): - s = ServiceSettings(model="gpt-4o") - assert s.to_dict() == {"model": "gpt-4o"} - def test_copy_is_deep(self): s = ServiceSettings(model="gpt-4o") s.extra = {"nested": {"a": 1}}