Skip to content

Interface: ClaudeHttpTransport ​

Defined in: claude/src/driver/claude-http-transport.ts:10

Injectable HTTP transport port for dispatching Anthropic /v1/messages requests.

Allows ClaudeModelDriver to execute against either the production fetch transport or deterministic recorded transport fixtures in unit and integration tests.

Methods ​

sendMessagesRequest() ​

ts
sendMessagesRequest(request): Promise<ClaudeHttpResponse>;

Defined in: claude/src/driver/claude-http-transport.ts:23

Sends a single /v1/messages POST request to the Anthropic API and returns the parsed response.

Implementations must honor request.signal and return status 429 with resetAtMs rather than swallowing rate-limit responses so PoolManager can fail over across seats.

Parameters ​

ParameterTypeDescription
requestClaudeHttpRequestWire-formatted Anthropic Messages API request.

Returns ​

Promise<ClaudeHttpResponse>

HTTP status code, response body, and optional rate-limit reset timestamp.

Throws ​

If request.signal is aborted or an unrecoverable transport failure occurs.

Released under the MIT License.