Commit graph

7 commits

Author SHA1 Message Date
Lina Tawfik
b3448f4baa
Fix tests to match updated ResultMessage type
- Remove cost_usd field from test expectations
- Update to use total_cost_usd instead of total_cost
- All 30 tests now pass

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-17 16:51:28 -07:00
Lina Tawfik
6cc5b34d54
Fix: Remove cost_usd field and handle GeneratorExit
The CLI only sends total_cost_usd, not cost_usd. This PR:

- Removes the non-existent cost_usd field from ResultMessage
- Makes total_cost_usd optional since it may be missing
- Handles GeneratorExit gracefully in subprocess transport
- Removes unnecessary cancel scope call

Fixes the error users were experiencing:
- KeyError: 'cost_usd'
- Field required [type=missing, input_value=...]

The anyio cancel scope error still appears in logs but doesn't affect functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-06-17 16:38:52 -07:00
Lina Tawfik
54bff2e85d
Merge pull request #1 from anthropics/initial-sdk-import
Initial Python SDK import
2025-06-12 00:26:15 -07:00
Lina Tawfik
8c950a7457
Fix CI: Don't fail on Codecov upload errors
The tests are passing but CI was failing due to missing Codecov token.
Set fail_ci_if_error to false since coverage upload is optional.
2025-06-12 00:21:45 -07:00
Lina Tawfik
63ef121e18
Fix code formatting for CI 2025-06-12 00:20:28 -07:00
Lina Tawfik
6ca3514261
Initial Python SDK import 2025-06-12 00:16:19 -07:00
Lina Tawfik
19c71ae9ca
Initial commit 2025-06-11 14:33:43 -07:00