Model ports
How a language model reaches the harness.
type LanguageModelProvider interface {
GenerateResponse(context.Context, string) (string, error)
GenerateStructuredResponse(context.Context, StructuredResponseRequest) (StructuredResponse, error)
}model/openaicompatible implements it against any /chat/completions endpoint. It retries a transient failure up to three times with an exponential delay starting at one second and capped at 30 seconds, honoring Retry-After, and replays reasoning_content in the field it arrived in. model/tape records and replays a run. Hosts that need routing or accounting bring their own provider.