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

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This commit is contained in:
mateo 2026-10-27 20:44:02 +00:00
parent 78db493c38
commit ecdb56a1cc
2 changed files with 2 additions and 0 deletions

View file

@ -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()
):

View file

@ -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