The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
docs(embed): explain physical timeout and terminal deadline contracts
Steven Enamakel8464a2922703
diff --git a/crates/openhuman-embed/ROUTING.md b/crates/openhuman-embed/ROUTING.mdindex b8197383bb..c68cde37fb 100644--- a/crates/openhuman-embed/ROUTING.md+++ b/crates/openhuman-embed/ROUTING.md@@ -41,6 +41,19 @@ or security errors stop immediately. Error strings are never classified asHTTP statuses. A route's own provider compatibility behavior remains ownedby TinyInference.+`CompletionRequest::timeout_ms(120_000)` bounds each physical provider HTTP+request to 120 seconds. Each ladder attempt and structured repair dispatch uses+that bound; it is not a total ladder deadline. With the field unset, transport+defaults remain unchanged. A physical timeout is an RPC transport failure and+can advance to the next rung. Any timed-out attempt has unknown cost, so the+ladder's aggregate cost remains `None`; budgeted calls retain the conservative+reservation when no authoritative usage arrived, which can block later calls.++`Completer::timeout(duration)` instead bounds the entire logical call, including+structured repairs. Its typed `DeadlineExceeded` is terminal, and cancellation+is also terminal: neither advances to a fallback. Hosts can use both timeouts+when they need a physical request bound and a separate logical deadline.+An `unpinned()` rung must be last. It removes the gateway's `provider` object,while keeping model, reasoning, usage options and images. This lets the finalgateway route choose its serving provider without changing the requesteddiff --git a/gitbooks/developing/embed/concepts/completer.md b/gitbooks/developing/embed/concepts/completer.mdindex e97f5077c8..5631c02fa2 100644--- a/gitbooks/developing/embed/concepts/completer.md+++ b/gitbooks/developing/embed/concepts/completer.md@@ -44,3 +44,11 @@ A standalone completer does not claim the process runtime slot. An agent-backedThe example checks that exactly one inference request was made and verifies the returned text. It uses a local provider fixture by default; the source contains the explicit opt-in live route path.Choose `Agent` when a model should call tools, resume a durable thread or execute with an agent's access context. Choose the structured completion helpers when the host only needs a validated data result. For routes and transport failures see [providers](providers.md) and [errors](errors.md).++## Timeouts and fallback++Set `CompletionRequest::timeout_ms(120_000)` to bound each physical provider HTTP request to 120 seconds. The optional field defaults to unset and is omitted from serialized requests when absent, retaining the provider's transport defaults. Each structured repair attempt receives its own physical timeout; this is not a total completion or ladder deadline.++A physical timeout is an RPC transport failure, so an explicit `CompletionLadder` can try its next route. By contrast, `Completer::timeout(duration)` bounds the entire logical completion, including repair attempts, and returns terminal `DeadlineExceeded`. Cancellation also stops the ladder without fallback. You can use both bounds when the host needs separate physical and logical limits.++A timed-out physical attempt has unknown reported cost. Ladder aggregate cost stays unknown, and a budgeted call keeps its conservative reservation if no authoritative usage arrived. The remaining budget may therefore refuse a fallback before it sends another request. See the [routing guide](https://github.com/tinyhumansai/openhuman/blob/main/crates/openhuman-embed/ROUTING.md) for the explicit ladder API.