OpenAiProvider
Functions
Honest self-report for a capability-aware caller: whether this backend genuinely streams tokens and accepts images, which AiConfig fields it actually reads, and — when it can't run — the real AiFailure reason instead of a bare false. Default answer is conservative (no streaming, no honored config) and blames a missing key, matching every real provider's own isAvailable gate; a provider whose unavailability means something else overrides this.
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.
Token-by-token variant of complete — so a UI can render the reply as it arrives and a Stop action actually cancels the in-flight request (cancelling the collecting coroutine tears down the underlying HTTP call) instead of leaving it running to completion in the background.