---
name: "Add test coverage for llm/providers/anthropic.rs (0% -> 50%+)"
---

# Story 123: Add test coverage for llm/providers/anthropic.rs

Currently at 0% line coverage (204 lines). The Anthropic provider handles API communication for Claude models.

## What to test

- Request construction (headers, body format, model selection)
- Response parsing (streaming chunks, tool use responses, error responses)
- API key validation
- Rate limit / error handling
- Message format conversion (internal Message -> Anthropic API format)

## Notes

- Mock HTTP responses rather than calling the real Anthropic API
- Use `mockito` or similar for HTTP mocking, or test the pure functions directly
- Focus on serialization/deserialization and error paths

## Acceptance Criteria

- [ ] Line coverage for `llm/providers/anthropic.rs` reaches 50%+
- [ ] Tests pass with `cargo test`
- [ ] `cargo clippy` clean
