API Reference agentsea_gateway v#0.1.0

Copy Markdown

Modules

Routes completion requests across multiple providers with strategy-based ordering, circuit breaking, and failover.

Per-provider circuit breaker on top of the battle-tested :fuse library.

Gateway configuration.

A configured provider candidate.

Routing-strategy behaviour. A strategy orders the available candidates; the gateway then tries them in that order, failing over to the next when one errors. Strategies are pure — they receive the candidates and a context (:counter, live :health) and return a reordered list.

Orders candidates cheapest-model-first using AgentSea.ModelPricing.

Tries candidates in their configured (priority) order.

Orders candidates by lowest observed latency (from gateway health). Candidates with no recorded latency yet are tried last.

Rotates the candidate order by a counter so load spreads across providers.