Skip to content
This repository was archived by the owner on Sep 17, 2025. It is now read-only.

Commit 709fbbc

Browse files
committed
total_cost の名前変更に対応
1 parent 54bff2e commit 709fbbc

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

src/claude_code_sdk/_internal/client.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,13 +86,12 @@ def _parse_message(self, data: dict[str, Any]) -> Message | None:
8686
# Map total_cost to total_cost_usd for consistency
8787
return ResultMessage(
8888
subtype=data["subtype"],
89-
cost_usd=data["cost_usd"],
9089
duration_ms=data["duration_ms"],
9190
duration_api_ms=data["duration_api_ms"],
9291
is_error=data["is_error"],
9392
num_turns=data["num_turns"],
9493
session_id=data["session_id"],
95-
total_cost_usd=data["total_cost"],
94+
total_cost_usd=data["total_cost_usd"],
9695
usage=data.get("usage"),
9796
result=data.get("result"),
9897
)

src/claude_code_sdk/types.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ class ResultMessage:
7575
"""Result message with cost and usage information."""
7676

7777
subtype: str
78-
cost_usd: float
7978
duration_ms: int
8079
duration_api_ms: int
8180
is_error: bool

0 commit comments

Comments
 (0)