mirror of
https://dev.azure.com/globalhealthx/EMR/_git/helix-engage-server
synced 2026-04-11 18:08:16 +00:00
feat: migrate AI to Vercel AI SDK, add OpenAI provider, fix worklist
- Replace raw @anthropic-ai/sdk with Vercel AI SDK (generateText, tool, generateObject) - Add provider abstraction (ai-provider.ts) — swap OpenAI/Anthropic via env var - AI chat controller: dynamic KB from platform (clinics, packages, insurance), zero hardcoding - AI enrichment service: use generateObject with Zod schema instead of manual JSON parsing - Worklist: resolve agent name from platform currentUser API instead of JWT decode - Worklist: fix GraphQL field names to match platform remapping (source, status, direction, etc.) - Config: add AI_PROVIDER, AI_MODEL, OPENAI_API_KEY env vars Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -13,6 +13,9 @@ export default () => ({
|
||||
webhookSecret: process.env.EXOTEL_WEBHOOK_SECRET ?? '',
|
||||
},
|
||||
ai: {
|
||||
provider: process.env.AI_PROVIDER ?? 'openai',
|
||||
anthropicApiKey: process.env.ANTHROPIC_API_KEY ?? '',
|
||||
openaiApiKey: process.env.OPENAI_API_KEY ?? '',
|
||||
model: process.env.AI_MODEL ?? 'gpt-4o-mini',
|
||||
},
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user