feat(ai): switch from DeepSeek to local Ollama (qwen3:14b)
- Point AI client to localhost:11434/v1 (Ollama) - Remove DeepSeek API key dependency - Update model name to qwen3:14b across all routes - Update test mocks to use createLocalLLMClient - Removes need for DEEPSEEK_API_KEY setting Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -17,7 +17,7 @@ vi.mock('@/lib/supabase/server', () => ({
|
||||
}))
|
||||
|
||||
vi.mock('@/lib/claude/client', () => ({
|
||||
createDeepSeekClient: vi.fn().mockReturnValue({
|
||||
createLocalLLMClient: vi.fn().mockReturnValue({
|
||||
chat: {
|
||||
completions: {
|
||||
create: vi.fn().mockResolvedValue({
|
||||
@@ -38,10 +38,6 @@ vi.mock('@/lib/claude/client', () => ({
|
||||
}),
|
||||
}))
|
||||
|
||||
vi.mock('@/lib/settings', () => ({
|
||||
getApiKey: vi.fn().mockResolvedValue('sk-test-key'),
|
||||
}))
|
||||
|
||||
describe('POST /api/incidents/ai/quality-check', () => {
|
||||
it('returns 422 when description is missing', async () => {
|
||||
const { POST } = await import('@/app/api/incidents/ai/quality-check/route')
|
||||
@@ -54,7 +50,7 @@ describe('POST /api/incidents/ai/quality-check', () => {
|
||||
expect(res.status).toBe(422)
|
||||
})
|
||||
|
||||
it('returns quality assessment from DeepSeek', async () => {
|
||||
it('returns quality assessment from local LLM', async () => {
|
||||
const { POST } = await import('@/app/api/incidents/ai/quality-check/route')
|
||||
const req = new Request('http://localhost/api/incidents/ai/quality-check', {
|
||||
method: 'POST',
|
||||
|
||||
Reference in New Issue
Block a user