Setup
Install the core SDK and the OpenAI-compatible adapter:Provider Initialization
Instantiate the Neosantara provider usingcreateOpenAICompatible:
Text Generation and Streaming
Next.js App Router Route (app/api/chat/route.ts)
Return a standard data stream response compatible with the frontend useChat hook:
app/api/chat/route.ts