feat: Fix o3-pro response parsing and implement HTTP transport recorder
- Fix o3-pro response parsing to use output_text convenience field - Replace respx with custom httpx transport solution for better reliability - Implement comprehensive PII sanitization to prevent secret exposure - Add HTTP request/response recording with cassette format for testing - Sanitize all existing cassettes to remove exposed API keys - Update documentation to reflect new HTTP transport recorder - Add test suite for PII sanitization and HTTP recording This change: 1. Fixes timeout issues with o3-pro API calls (was 2+ minutes, now ~15-22 seconds) 2. Properly captures response content without httpx.ResponseNotRead exceptions 3. Preserves original HTTP response format including gzip compression 4. Prevents future secret exposure with automatic PII sanitization 5. Enables reliable replay testing for o3-pro interactions Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -115,6 +115,14 @@ Test isolated components and functions:
|
||||
- **File handling**: Path validation, token limits, deduplication
|
||||
- **Auto mode**: Model selection logic and fallback behavior
|
||||
|
||||
### HTTP Recording/Replay Tests (HTTP Transport Recorder)
|
||||
Tests for expensive API calls (like o3-pro) use custom recording/replay:
|
||||
- **Real API validation**: Tests against actual provider responses
|
||||
- **Cost efficiency**: Record once, replay forever
|
||||
- **Provider compatibility**: Validates fixes against real APIs
|
||||
- Uses HTTP Transport Recorder for httpx-based API calls
|
||||
- See [HTTP Recording/Replay Testing Guide](./vcr-testing.md) for details
|
||||
|
||||
### Simulator Tests
|
||||
Validate real-world usage scenarios by simulating actual Claude prompts:
|
||||
- **Basic conversations**: Multi-turn chat functionality with real prompts
|
||||
|
||||
Reference in New Issue
Block a user