mirror of
				https://github.com/zadam/trilium.git
				synced 2025-10-31 02:16:05 +01:00 
			
		
		
		
	fix(llm): don't filter for specific words when pulling models for openai
This commit is contained in:
		| @@ -81,13 +81,13 @@ async function listModels(req: Request, res: Response) { | |||||||
|         // Filter and categorize models |         // Filter and categorize models | ||||||
|         const allModels = response.data || []; |         const allModels = response.data || []; | ||||||
|  |  | ||||||
|         // Separate models into chat models and embedding models |         // Include all models as chat models, without filtering by specific model names | ||||||
|  |         // This allows models from providers like OpenRouter to be displayed | ||||||
|         const chatModels = allModels |         const chatModels = allModels | ||||||
|             .filter((model) =>  |             .filter((model) =>  | ||||||
|                 // Include GPT models for chat |                 // Exclude models that are explicitly for embeddings | ||||||
|                 model.id.includes('gpt') || |                 !model.id.includes('embedding') &&  | ||||||
|                 // Include Claude models via Azure OpenAI |                 !model.id.includes('embed') | ||||||
|                 model.id.includes('claude') |  | ||||||
|             ) |             ) | ||||||
|             .map((model) => ({ |             .map((model) => ({ | ||||||
|                 id: model.id, |                 id: model.id, | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user