Protocols, Agent recognition and path mapping
Understand endpoints, streams, CWD extraction, path rewriting and cross-platform Shell limits.
Protocol means request/response format
Messages, Chat Completions and Responses differ. User Client exposes compatible endpoints; Worker converts or calls the appropriate upstream route. Tools still need to parse their chosen response format.
| Endpoint | Use |
|---|---|
POST /v1/messages | Anthropic Messages and applicable streaming |
POST /v1/chat/completions | Chat Completions |
POST /v1/responses | Responses |
POST /v1/responses/compact | Remote compaction on supported channels |
GET /v1/models and detail | Current key's model catalog |
POST /v1/images/generations, edits | Supported image generation/editing |
Counting, legacy completion and WebSocket routes also exist. Endpoint existence does not grant every plan/model/channel capability. Removed embeddings, files and standalone HTTP audio routes are not available merely because an SDK defines them.
Streams and execution
SSE/WebSocket fragments are not one-token units. Buffering, conversion and tool-argument assembly affect chunks. HTTP 200 or a WebSocket handshake can precede an in-stream failure.
Agent source, OS and CWD are separate. Rules classify the caller; UA supplies OS clues; CWD is the Agent's working directory. Reliable extraction/session reuse can enable mapping. Unknown, missing or conflicting directories degrade conservatively and alone do not introduce rejection.
Mapping limits
For a recognized Agent and reliable directory, matching request paths map to the supplier's virtual directory and return paths are restored. Processing uses decoded protocol text, JSON and streaming arguments; opaque encrypted reasoning is not edited. Unknown formats and unmatched paths prevent a claim of perfect losslessness.
Shell syntax is never translated. Path conversion cannot turn PowerShell/cmd into Bash. Recognized coding-Agent OS can prefer same-system supply, but fallback can still produce incompatible commands. Inspect actual tool results and receipt state; Agent self-correction is not guaranteed Shell conversion.
Published rules can adapt to new versions, while new parser capabilities can require a Client update. Unknown callers can still use ordinary compatible HTTP, without OS-only routing preference. Mapping does not erase arbitrary sensitive text or all real paths sent in business content.


