Ethan0x0000
|
68f151f5c0
|
feat(apicompat): add Responses↔Anthropic bidirectional format conversion
Add reverse-direction converters for Anthropic platform groups to accept
OpenAI-format requests:
- ResponsesToAnthropicRequest: Responses API input → Anthropic Messages
request with system extraction, tool/toolChoice mapping, reasoning
effort conversion, image data URI↔base64, and consecutive role merging
- AnthropicToResponsesResponse: Anthropic response → Responses response
with content block→output item mapping, usage, stop_reason→status
- AnthropicEventToResponsesEvents: stateful SSE stream converter
(Anthropic streaming protocol → Responses streaming protocol)
- FinalizeAnthropicResponsesStream: synthetic termination for
incomplete streams
|
2026-03-23 16:24:09 +08:00 |
|