II.
Page JSON
Structured · livepage:docs-development-04-transport-adapter-proxy
Transport Adapter & Proxy json
Inspect the normalized record payload exactly as the atlas UI reads it.
{
"id": "page:docs-development-04-transport-adapter-proxy",
"_kind": "Page",
"_file": "wiki/docs/development/04-transport-adapter-proxy.md",
"_cluster": "wiki",
"attributes": {
"nodeKind": "Page",
"sourcePath": "docs/development/04-transport-adapter-proxy.md",
"sourceKind": "repo-docs",
"title": "Transport Adapter & Proxy",
"displayName": "Transport Adapter & Proxy",
"slug": "docs/development/04-transport-adapter-proxy",
"articlePath": "wiki/docs/development/04-transport-adapter-proxy.md",
"article": "\n# Transport Adapter & Proxy\n\nThe `@a5c-ai/transport-adapter` package bridges API protocol differences between harnesses and upstream providers.\n\n## When Proxy is Needed\n\nA harness needs the proxy when it speaks a different protocol than the upstream provider:\n\n| Harness Protocol | Upstream Protocol | Proxy? |\n|-----------------|-------------------|--------|\n| Anthropic (Claude Code) | Anthropic | No |\n| Anthropic (Claude Code) | OpenAI (Foundry) | **Yes** |\n| Anthropic (Claude Code) | Google (Vertex) | **Yes** |\n| OpenAI (Codex) | OpenAI (Foundry) | No |\n| OpenAI (Pi via models.json) | OpenAI (Foundry) | **Yes** |\n\n## Completion Engines\n\n| Engine | Upstream | Key Features |\n|--------|----------|-------------|\n| OpenAI | Azure Foundry | Tool normalization (`input_schema` → `parameters`), streaming `delta.tool_calls` accumulation |\n| Google | Vertex AI | `functionCall`/`functionResponse` translation, `thoughtSignature` server-side store |\n\n## Message Translation\n\nThe proxy translates between Anthropic and upstream formats bidirectionally:\n\n- **Anthropic → OpenAI**: `tool_use` → `role:\"assistant\" + tool_calls`, `tool_result` → `role:\"tool\"`\n- **Anthropic → Google**: `tool_use` → `functionCall`, `tool_result` → `functionResponse` (with `toolIdToName` mapping)\n- **OpenAI → Anthropic**: `delta.tool_calls` → `content_block_start(tool_use) + input_json_delta`\n- **Google → Anthropic**: `functionCall` → `tool_use`, `thoughtSignature` preserved via server-side store\n\n## Streaming Tool Support\n\nThe proxy handles streaming tool calls end-to-end:\n\n```\nCompletionStreamEvent =\n | { type: 'text-delta', text: string }\n | { type: 'tool-call', id, name, arguments, metadata? }\n | { type: 'done', finishReason?, usage? }\n```\n\nSee [babysitter-plugin-flows](./03-babysitter-plugin-flows.md) for full sequence diagrams.\n",
"documents": []
},
"outgoingEdges": [],
"incomingEdges": [
{
"from": "page:docs-development",
"to": "page:docs-development-04-transport-adapter-proxy",
"kind": "contains_page"
}
]
}