refactor(providers): define typed usage contract

This commit is contained in:
chengyongru
2026-08-25 01:04:25 +08:00
committed by chengyongru
parent 89c94d8744
commit 9895c23cb5
84 changed files with 1643 additions and 726 deletions
+2 -1
View File
@@ -46,7 +46,8 @@ def test_custom_provider_parse_accepts_dict_response() -> None:
assert result.finish_reason == "stop"
assert result.content == "hello from dict"
assert result.usage["total_tokens"] == 3
assert result.usage is not None
assert result.usage.total_tokens == 3
def test_custom_provider_parse_normalizes_text_tool_call() -> None: