mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-16 09:22:22 +00:00
fix(anthropic): keep an untyped enum node untyped so shaping stays idempotent
Some checks failed
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
LiteLLM Rust DB / db-queries (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (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
Terraform Modules / fmt, validate, test (aws) (push) Has been cancelled
Terraform Modules / fmt, validate, test (gcp) (push) Has been cancelled
LiteLLM Rust DB / db-queries (push) Has been cancelled
LiteLLM Rust / rust-lint (push) Has been cancelled
LiteLLM Rust / rust-test (push) Has been cancelled
LiteLLM Rust / rust-wheel (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
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
parent
78db493c38
commit
ecdb56a1cc
2 changed files with 2 additions and 0 deletions
|
|
@ -152,6 +152,7 @@ def _object_fields(declared_type: object, schema: Mapping[str, object]) -> Mappi
|
|||
return {"additionalProperties": False}
|
||||
if (
|
||||
declared_type is None
|
||||
and "enum" not in schema
|
||||
and _as_schema(schema.get("properties")) is not None
|
||||
and not _COMPOSITION_KEYS & schema.keys()
|
||||
):
|
||||
|
|
|
|||
|
|
@ -103,3 +103,4 @@ def test_nullable_object_enum_keeps_its_type_dropped_instead_of_forcing_object()
|
|||
)
|
||||
|
||||
assert shaped == {"properties": {"a": {"type": "string"}}, "enum": [None]}
|
||||
assert shape_claude_output_schema(shaped) == shaped
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue