diff --git a/src/modules/llms/server/openai/models.data.ts b/src/modules/llms/server/openai/models.data.ts index 84b86020f..ce1dd5e64 100644 --- a/src/modules/llms/server/openai/models.data.ts +++ b/src/modules/llms/server/openai/models.data.ts @@ -906,6 +906,7 @@ const _knownGroqModels: ManualMappings = [ label: 'Llama 3.1 · 405B', description: 'LLaMA 3.1 405B developed by Meta with a context window of 131,072 tokens. Supports tool use.', contextWindow: 131072, + maxCompletionTokens: 8000, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, { @@ -914,6 +915,7 @@ const _knownGroqModels: ManualMappings = [ label: 'Llama 3.1 · 70B', description: 'LLaMA 3.1 70B developed by Meta with a context window of 131,072 tokens. Supports tool use.', contextWindow: 131072, + maxCompletionTokens: 8000, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, { @@ -922,6 +924,7 @@ const _knownGroqModels: ManualMappings = [ label: 'Llama 3.1 · 8B', description: 'LLaMA 3.1 8B developed by Meta with a context window of 131,072 tokens. Supports tool use.', contextWindow: 131072, + maxCompletionTokens: 8000, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, { @@ -944,6 +947,8 @@ const _knownGroqModels: ManualMappings = [ description: 'LLaMA3 70B developed by Meta with a context window of 8,192 tokens. Supports tool use.', contextWindow: 8192, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], + // isLegacy: true, + hidden: true, }, { idPrefix: 'llama3-8b-8192', @@ -951,6 +956,8 @@ const _knownGroqModels: ManualMappings = [ description: 'LLaMA3 8B developed by Meta with a context window of 8,192 tokens. Supports tool use.', contextWindow: 8192, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], + // isLegacy: true, + hidden: true, }, { idPrefix: 'mixtral-8x7b-32768', @@ -959,13 +966,6 @@ const _knownGroqModels: ManualMappings = [ contextWindow: 32768, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, - { - idPrefix: 'gemma-7b-it', - label: 'Gemma 1.1 · 7B Instruct', - description: 'Gemma 7B developed by Google with a context window of 8,192 tokens. Supports tool use.', - contextWindow: 8192, - interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], - }, { idPrefix: 'gemma2-9b-it', label: 'Gemma 2 · 9B Instruct', @@ -973,6 +973,14 @@ const _knownGroqModels: ManualMappings = [ contextWindow: 8192, interfaces: [LLM_IF_OAI_Chat, LLM_IF_OAI_Fn], }, + { + idPrefix: 'gemma-7b-it', + label: 'Gemma 1.1 · 7B Instruct', + description: 'Gemma 7B developed by Google with a context window of 8,192 tokens. Supports tool use.', + contextWindow: 8192, + interfaces: [LLM_IF_OAI_Chat], + hidden: true, + }, ]; export function groqModelToModelDescription(_model: unknown): ModelDescriptionSchema { @@ -988,6 +996,11 @@ export function groqModelToModelDescription(_model: unknown): ModelDescriptionSc } export function groqModelSortFn(a: ModelDescriptionSchema, b: ModelDescriptionSchema): number { + // sort hidden at the end + if (a.hidden && !b.hidden) + return 1; + if (!a.hidden && b.hidden) + return -1; // sort as per their order in the known models const aIndex = _knownGroqModels.findIndex(base => a.id.startsWith(base.idPrefix)); const bIndex = _knownGroqModels.findIndex(base => b.id.startsWith(base.idPrefix));