refactor(schemas): remove NormalizedResponse backward-compat __init__; use canonical API

This commit is contained in:
ed
2026-06-24 17:12:49 -04:00
parent 03dd44c642
commit 20236546d7
9 changed files with 29 additions and 48 deletions
+2 -1
View File
@@ -86,6 +86,7 @@ def test_error_classification_429_to_rate_limit(caps: VendorCapabilities) -> Non
def test_normalized_response_is_frozen_dataclass() -> None:
from dataclasses import FrozenInstanceError
r = NormalizedResponse(text="x", tool_calls=[], usage_input_tokens=0, usage_output_tokens=0, usage_cache_read_tokens=0, usage_cache_creation_tokens=0, raw_response=None)
from src.openai_schemas import UsageStats
r = NormalizedResponse(text="x", tool_calls=[], usage=UsageStats(input_tokens=0, output_tokens=0, cache_read_tokens=0, cache_creation_tokens=0), raw_response=None)
with pytest.raises(FrozenInstanceError):
r.text = "y"