HTTP service for OpenAI-compatible chat endpoints (vLLM, OpenRouter, Together, Groq, ...).
Request and response shaping is shared with the other dialect speakers via an
internal OpenAIDialect helper. What differs here is attachment delivery:
these endpoints have no Files API, so bytes always become data: URIs and
media is carried in image_url / video_url / audio_url content parts.
Summary
Functions
Sends a chat completion request to an OpenAI-compatible endpoint.
Streams a chat completion as a lazy enumerable of text chunks.
Functions
@spec chat(ExAgent.Providers.OpenAICompatible.t(), [ExAgent.Message.t()], keyword()) :: {:ok, Response.t()} | {:tool_calls, [map()]} | {:error, ExAgent.Error.t()}
Sends a chat completion request to an OpenAI-compatible endpoint.
@spec stream(ExAgent.Providers.OpenAICompatible.t(), [ExAgent.Message.t()], keyword()) :: Enumerable.t()
Streams a chat completion as a lazy enumerable of text chunks.