createOpenAI function, which accepts the necessary base URL and headers.
See it in the example below.
If you are using version 1.0.0 or later of Vercel’s AI SDK, you may have to downgrade to pre-1.0 in order to force the use of Chat Completions.
npm install @ai-sdk/[email protected]