OpenAIBackend class

OpenAI (or any OpenAI-compatible endpoint) via stock dartantic OpenAIProvider / OpenAIChatModel.

Note: the OpenAI path force-wraps a transport-only RetryHttpClient (429 / 5xx / IO). That retry does NOT re-sample on a schema rejection (a 200 with bad content), so the decision-retry contract is intact; it only removes driver control over transport retries on this backend.

Inheritance

Constructors

OpenAIBackend({required String apiKey, Uri? baseUrl, Map<String, String>? headers, bool enableThinking = false, double? temperature, OpenAIChatOptions? options})
Creates an OpenAI backend spec.
const

Properties

apiKey → String
OpenAI API key.
final
baseUrl → Uri?
Override endpoint (e.g. an OpenAI-compatible gateway /v1).
final
enableThinking → bool
Whether reasoning is requested (only honoured by reasoning-capable models; the OpenAI Chat Completions path does not surface thinking).
final
hashCode → int
The hash code for this object.
no setterinherited
headers → Map<String, String>?
Extra headers.
final
options → OpenAIChatOptions?
OpenAI sampling options.
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
temperature → double?
Sampling temperature.
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited