@ai-sdk/openai-compatible (createOpenAICompatible). The standard @ai-sdk/openai provider defaults to the Responses API.
streamText streams with the same model; add includeUsage: true to the provider options to get token usage in the stream. Tool calling works where the model supports it. For generateObject and streamObject, set supportsStructuredOutputs: true on the provider and use a model that advertises structured_outputs in GET /v1/models.
With @ai-sdk/openai (createOpenAI({ baseURL, apiKey })), call openai.chat("moonshotai/kimi-k3.1-pro:confidential"). Since AI SDK 5 the plain openai("...") factory calls the Responses API by default.
Privacy
Use a catalog ID, not an OpenAI name. Every catalog ID runs in attested hardware;GET /v1/models lists them. End-to-end encryption needs client-side encryption and extra headers, which these frameworks do not add. See How Privacy Works.
Related
Framework Integrations
The shared pattern.
OpenAI Compatibility
What differs.
How Privacy Works
Privacy-preserving hardware on every call.

