This commit is contained in:
Xi Yan 2025-03-13 17:39:06 -07:00
parent a91771f034
commit 194d86a232

View file

@ -34,14 +34,16 @@ class ProviderImpl(Providers):
async def list_providers(self) -> ListProvidersResponse: async def list_providers(self) -> ListProvidersResponse:
run_config = self.config.run_config run_config = self.config.run_config
safe_config = StackRunConfig(**redact_sensitive_fields(run_config.model_dump()))
ret = [] ret = []
for api, providers in run_config.providers.items(): for api, providers in safe_config.providers.items():
ret.extend( ret.extend(
[ [
ProviderInfo( ProviderInfo(
api=api, api=api,
provider_id=p.provider_id, provider_id=p.provider_id,
provider_type=p.provider_type, provider_type=p.provider_type,
config=p.config,
) )
for p in providers for p in providers
] ]
@ -59,6 +61,7 @@ class ProviderImpl(Providers):
api=api, api=api,
provider_id=p.provider_id, provider_id=p.provider_id,
provider_type=p.provider_type, provider_type=p.provider_type,
config=p.config,
) )
return None return None