iiRecord
Agentic AI Atlas · Transport Adapter & Proxy
page:docs-development-04-transport-adapter-proxya5c.ai
II.
Page reference

page:docs-development-04-transport-adapter-proxy

Reading · 2 min

Transport Adapter & Proxy reference

The @a5c-ai/transport-adapter package bridges API protocol differences between harnesses and upstream providers.

Pagewiki/docs/development/04-transport-adapter-proxy.mdOutgoing · 0Incoming · 1

Transport Adapter & Proxy

The @a5c-ai/transport-adapter package bridges API protocol differences between harnesses and upstream providers.

When Proxy is Needed

A harness needs the proxy when it speaks a different protocol than the upstream provider:

Harness ProtocolUpstream ProtocolProxy?
Anthropic (Claude Code)AnthropicNo
Anthropic (Claude Code)OpenAI (Foundry)**Yes**
Anthropic (Claude Code)Google (Vertex)**Yes**
OpenAI (Codex)OpenAI (Foundry)No
OpenAI (Pi via models.json)OpenAI (Foundry)**Yes**

Completion Engines

EngineUpstreamKey Features
OpenAIAzure FoundryTool normalization (input_schemaparameters), streaming delta.tool_calls accumulation
GoogleVertex AIfunctionCall/functionResponse translation, thoughtSignature server-side store

Message Translation

The proxy translates between Anthropic and upstream formats bidirectionally:

  • **Anthropic → OpenAI**: tool_userole:"assistant" + tool_calls, tool_resultrole:"tool"
  • **Anthropic → Google**: tool_usefunctionCall, tool_resultfunctionResponse (with toolIdToName mapping)
  • **OpenAI → Anthropic**: delta.tool_callscontent_block_start(tool_use) + input_json_delta
  • **Google → Anthropic**: functionCalltool_use, thoughtSignature preserved via server-side store

Streaming Tool Support

The proxy handles streaming tool calls end-to-end:

Code
CompletionStreamEvent =
  | { type: 'text-delta', text: string }
  | { type: 'tool-call', id, name, arguments, metadata? }
  | { type: 'done', finishReason?, usage? }

See babysitter-plugin-flows for full sequence diagrams.