From 120b46fc1f6b3818a78ff9c9d44b5c0e9b4b593b Mon Sep 17 00:00:00 2001 From: eduardruzga Date: Sat, 9 Nov 2024 22:48:32 +0200 Subject: [PATCH 1/4] Add API call to Open Router for full model list --- app/components/chat/BaseChat.tsx | 40 ++++++++++++++++++++++++++--- app/routes/api.openrouter-models.ts | 33 ++++++++++++++++++++++++ 2 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 app/routes/api.openrouter-models.ts diff --git a/app/components/chat/BaseChat.tsx b/app/components/chat/BaseChat.tsx index e91254a17b..788a24d3a3 100644 --- a/app/components/chat/BaseChat.tsx +++ b/app/components/chat/BaseChat.tsx @@ -15,6 +15,7 @@ import { APIKeyManager } from './APIKeyManager'; import Cookies from 'js-cookie'; import styles from './BaseChat.module.scss'; +import type { ModelInfo } from '~/utils/types'; const EXAMPLE_PROMPTS = [ { text: 'Build a todo app in React using Tailwind' }, @@ -29,7 +30,7 @@ const providerList = [...new Set(MODEL_LIST.map((model) => model.provider))] const ModelSelector = ({ model, setModel, provider, setProvider, modelList, providerList }) => { return (
-