mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-14 09:03:16 +00:00
fix(proxy): flatten published hub lists without a recursive walk
Some checks failed
LiteLLM Rust / rustfmt, clippy, test (push) Has been cancelled
LiteLLM Rust / release wheel (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
Some checks failed
LiteLLM Rust / rustfmt, clippy, test (push) Has been cancelled
LiteLLM Rust / release wheel (push) Has been cancelled
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
Terraform Provider / gofmt, vet, build, test (push) Has been cancelled
Terraform Provider / Provider endpoints vs proxy OpenAPI schema (push) Has been cancelled
This commit is contained in:
parent
95de45898d
commit
b8a51aae6d
1 changed files with 2 additions and 5 deletions
|
|
@ -77,7 +77,6 @@ _CONFIG_ADVISORY_LOCK_SQL: Final = "SELECT pg_advisory_xact_lock(hashtext($1)) I
|
|||
_SETTINGS_ADAPTER: Final = TypeAdapter(dict[str, object])
|
||||
|
||||
_STRING_LIST_ADAPTER: Final = TypeAdapter(tuple[str, ...])
|
||||
_MAPPING_ADAPTER: Final = TypeAdapter(Mapping[object, object])
|
||||
_ITEMS_ADAPTER: Final = TypeAdapter(tuple[object, ...])
|
||||
|
||||
|
||||
|
|
@ -117,10 +116,8 @@ def plain_settings(settings: Mapping[str, object]) -> dict[str, object]:
|
|||
|
||||
|
||||
def _plain_value(value: object) -> object:
|
||||
if isinstance(value, Mapping):
|
||||
return {key: _plain_value(item) for key, item in _MAPPING_ADAPTER.validate_python(value).items()}
|
||||
if isinstance(value, (list, tuple)):
|
||||
return [_plain_value(item) for item in _ITEMS_ADAPTER.validate_python(value)]
|
||||
if isinstance(value, tuple):
|
||||
return list(_ITEMS_ADAPTER.validate_python(value))
|
||||
return value
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue