You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: improve responses API implementation with PR ericc-ch#119 enhancements
Add critical keep-alive streaming support:
- Implement startStreamPing utility with 3s interval pings
- Prevents client timeouts on long reasoning operations
- Fixes Claude Code retry issues with stream=false fallback
Improve error handling and robustness:
- Add try/catch/finally blocks in all stream handlers
- Proper cleanup of ping intervals on stream completion
- Better error propagation and logging
Add signature field support:
- Update AnthropicThinkingBlock type with optional signature field
- Support for signature_delta in content block delta events
Add comprehensive test coverage:
- Create tests/responses-translation.test.ts (258 lines)
- Create tests/responses-stream-translation.test.ts (250 lines)
- Test non-streaming responses with reasoning and tool calls
- Test streaming events including errors and failures
- All 36 tests passing
Update ESLint config:
- Disable max-lines-per-function for test files
This brings responses API implementation to production-ready quality
based on best practices from PR ericc-ch#119, while maintaining bypass credit
support and existing functionality.
Co-authored-by: factory-droid[bot] <138933559+factory-droid[bot]@users.noreply.github.com>
0 commit comments