mirror of
				https://github.com/TriliumNext/Notes.git
				synced 2025-10-31 21:11:30 +08:00 
			
		
		
		
	Merge pull request #2127 from TriliumNext/fix/llm-model-names
fix(llm): don't filter for specific words when pulling models for openai
This commit is contained in:
		
						commit
						2e1ced38e4
					
				| @ -81,13 +81,13 @@ async function listModels(req: Request, res: Response) { | ||||
|         // Filter and categorize models
 | ||||
|         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 | ||||
|             .filter((model) =>  | ||||
|                 // Include GPT models for chat
 | ||||
|                 model.id.includes('gpt') || | ||||
|                 // Include Claude models via Azure OpenAI
 | ||||
|                 model.id.includes('claude') | ||||
|                 // Exclude models that are explicitly for embeddings
 | ||||
|                 !model.id.includes('embedding') &&  | ||||
|                 !model.id.includes('embed') | ||||
|             ) | ||||
|             .map((model) => ({ | ||||
|                 id: model.id, | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Elian Doran
						Elian Doran