Smith::LLM::OpenAI
Inherits Smith::LLM::Provider < Reference < Object
Constants
DEFAULT_ENDPOINT = "https://api.openai.com/v1/chat/completions"
DEFAULT_MODEL = "gpt-5.6-luna"
Constructors
new(api_key : String = ENV.fetch("OPENAI_API_KEY", ""), default_model : String = DEFAULT_MODEL, timeouts : Timeouts = Timeouts.default, reasoning_effort : String = "none")
SourceInstance methods
api_key
Sourcecomplete(request : Request) : Response
Sourcecomplete_streaming(request : Request, &on_delta : String -> Nil) : Response
Streaming entry point. The default does no streaming at all — it runs complete() and hands the text over in one piece.
That default is what makes deltas universal: callers always see them,
whether or not the provider streams, so neither the agent loop nor the
renderers need a special case. Providers override this; when streaming
is switched off they call super.
default_model
Sourcename
Source