Module openai

Module openai 

Source
Expand description

The OpenAI provider adapter (DW-075).

Speaks the OpenAI chat-completions dialect TOWARD a provider (POST /v1/chat/completions). Because the canonical request type is a superset of this dialect, the translation is near-identity: the adapter’s job is to swap the client’s model alias for the mapped provider model, re-emit the canonical fields in OpenAI spelling, and pass the preserved dialect-specific parameters (other) through — the lossless OpenAI-to-OpenAI path. The same dialect is spoken by OpenAI-COMPATIBLE servers (vLLM, Ollama’s compatibility endpoint, and others): point the provider’s upstream at one of those and this adapter needs no changes.

Structs§

OpenAiAdapter
The OpenAI chat-completions adapter. Stateless singleton.