Help us shape the future of Go! Take the 2026 Go Developer Survey

hedge

command
v0.18.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 16, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Command hedge shows the hedged-model middleware: race the primary model against a backup and take the first good answer, which cuts tail latency and fails over around a down provider. The models here are offline stubs with fixed latencies so the effect is visible without an API key; with real adapters (anthropic.New, openai.New, gemini.New) the usage is identical.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL