refactor(proxy): snapshot only set sections in ProxyRuntimeConfig.to_mapping

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
mateo 2026-09-21 23:11:57 +00:00
parent ab5b2192cc
commit 3653f51364

View file

@ -3179,7 +3179,7 @@ class ProxyRuntimeConfig(LiteLLMPydanticObjectBase):
return self._baseline
def to_mapping(self) -> Mapping[str, object]:
return MappingProxyType(self.model_dump(mode="json", exclude_defaults=True))
return MappingProxyType(self.model_dump(mode="json", exclude_unset=True))
def with_section(self, name: str, value: ConfigSection | ConfigSectionList) -> "ProxyRuntimeConfig":
return self.model_copy(update={name: value})