Expand description
Anthropic ↔ OpenAI translation layer.
Structs§
Functions§
- messages_
to_ oai - Convert Anthropic-shaped message list + optional system prompt into an OpenAI ChatMessage stream.
- oai_
event_ to_ llm - Translate an
OaiEventinto a synapsStreamEvent. - tool_
calls_ to_ content_ blocks - Convert an OpenAI tool-call list into Anthropic-shaped
tool_usecontent blocks. - tools_
to_ oai - Convert Anthropic tool schema entries to OpenAI ToolDefinitions.
- tools_
to_ responses - Responses endpoints may normalize omitted
strictto strict schemas, promoting optional properties to required ones. These are ordinary Synaps schemas (including extensions), not transformed strict-output schemas. Opt out explicitly rather than making the model invent optional argument values. Chat Completions keeps its existing wire shape.