Skip to content

openaiChat

OpenAI Chat Completions wire shapes, as Databricks Model Serving speaks them.

These are the request/reply payload types for /chat/completions and a serving endpoint’s invocations URL. They are deliberately declared here rather than imported from the OpenAI or AI SDK packages: both keep these fields under internal namespaces that are not part of their public API, whereas the wire payload itself is the stable contract every caller in this repo actually codes against.

Pure types plus one text-flattening helper - no zod, no runtime deps - so a browser client, a Node proxy, and an AppKit plugin can all agree on the shape without any of them pulling in the others’ dependencies.