complete

open suspend override fun complete(messages: List<AiMessage>, config: AiConfig = AiConfig()): AiResult<String>(source)

Runs one turn. Success carries the model's text; failure names why via AiFailure — a wrong/missing key, a rate limit, a timeout, any other transport problem, or a reply that came back empty. Never throws for an ordinary provider-side failure.