555f6e15ab
- Added support for tool calls in NormalizedFinalResponse type. - Implemented functions to collect and serialize tool calls from OpenAI and Claude responses. - Updated convertClaudeRequestToOpenAiBody to handle tool use and tool result messages. - Enhanced normalizeUpstreamFinalResponse to include tool calls in the response structure. - Introduced utility functions for safe JSON stringification and parsing. - Improved conversion functions for OpenAI tools to Anthropic format and vice versa. - Updated input handling in convertOpenAiBodyToMessagesBody and convertOpenAiBodyToResponsesBody to accommodate tool messages. - Refactored serialization logic in serializeFinalResponse and buildSyntheticOpenAiChunks to include tool calls.