Change anthropic model

This commit is contained in:
2026-04-23 13:09:53 -05:00
parent eef8b70fd9
commit 8a2074914c
4 changed files with 18 additions and 6 deletions

View File

@@ -6,7 +6,7 @@ import { createGoogleGenerativeAI } from '@ai-sdk/google';
import { createOpenAICompatible } from '@ai-sdk/openai-compatible';
import { Job } from '../db/models.js';
import { broadcast } from '../ws/broadcast.js';
import { findModel, DEFAULT_MODEL_ID } from '../models.js';
import { findModel, DEFAULT_MODEL_ID, normalizeModelId } from '../models.js';
// ---------------------------------------------------------------------------
// Provider instances
@@ -43,7 +43,8 @@ const PROVIDERS = {
};
function resolveModel(modelId) {
const meta = findModel(modelId) ?? findModel(DEFAULT_MODEL_ID);
const normalized = normalizeModelId(modelId);
const meta = findModel(normalized) ?? findModel(DEFAULT_MODEL_ID);
return PROVIDERS[meta.provider](meta.id);
}