u
This commit is contained in:
@@ -1,9 +1,6 @@
|
||||
import * as db from '../../db/modelconversation.js';
|
||||
import env from '../../config/env.js';
|
||||
|
||||
// Model ids that are known to return empty responses from OpenRouter. Requests naming one of
|
||||
// these are transparently rerouted to `env.defaultModel` instead of failing at generation time.
|
||||
const RETIRED_MODELS = new Set(['stealth/space-bunny-alpha']);
|
||||
import { RETIRED_MODELS, resolveDefaultModel } from '../../tools/llm-key.js';
|
||||
import { emit } from '../sse.js';
|
||||
import { getOrCreateManager, removeManager } from '../../services/conversationManager.js';
|
||||
|
||||
@@ -155,7 +152,7 @@ export function register(app, basePath = '') {
|
||||
// ignoring the client's choice entirely, so an explicit model selection still works.
|
||||
const requestedModel = typeof model === 'string' ? model.trim() : '';
|
||||
const effectiveModel = RETIRED_MODELS.has(requestedModel) || !requestedModel
|
||||
? env.defaultModel
|
||||
? await resolveDefaultModel(req.user.id)
|
||||
: requestedModel;
|
||||
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user