Expand description
The two pieces of HTTP drep performs for itself.
Reviews go through open-agent-sdk, which owns its own transport. What is
left is drep init asking two questions over plain GET: which models an
endpoint serves (crate::llm::models) and what those models accept
(crate::llm::quirks). Both are one request against a host the user
named, both must be bounded, must never follow a redirect, and must be
non-fatal.
They live here rather than in either module because the bound is a safety
property, and a safety property written twice is written once and forgotten
once. That is exactly what happened: the quirks fetcher was given a size
ceiling and a chunked read, while the older listing fetcher next to it kept
calling text() with no ceiling at all - against an endpoint typed at a
prompt, while holding a key.
What is deliberately not shared is classification. The two callers
disagree about what a status means - a 404 is an ordinary answer for a
listing and a fault for the registry - so each keeps its own error enum and
maps ReadError into it.
Enums§
- Read
Error - Why a body could not be read.
Functions§
- client
- A client with
timeoutcovering the whole request and redirects disabled. - read_
bounded - Read a response body, refusing one larger than
max_bytes.