Elffuss BraidHub

kikocis/continue public

main · 1.5 KiBRawPermalink
1import { LLMOptions } from "../..";
2
3import OpenAI from "./OpenAI";
4
5class Nebius extends OpenAI {
6 static providerName = "nebius";
7 static defaultOptions: Partial<LLMOptions> = {
8 apiBase: "https://api.studio.nebius.ai/v1/",
9 useLegacyCompletionsEndpoint: false,
10 };
11
12 private static MODEL_IDS: { [name: string]: string } = {
13 "deepseek/deepseek_v3": "deepseek-ai/DeepSeek-V3",
14 "deepseek/deepseek-r1": "deepseek-ai/DeepSeek-R1",
15 "qwen2.5-coder-32b": "Qwen/Qwen2.5-Coder-32B-Instruct-fast",
16 "Qwen/QwQ-32B-Preview": "Qwen/QwQ-32B-Preview",
17 "llama3.1-70b-nemotron": "nvidia/Llama-3.1-Nemotron-70B-Instruct-HF-fast",
18 "llama3.1-8b": "meta-llama/Meta-Llama-3.1-70B-Instruct-fast",
19 "llama3.1-70b": "meta-llama/Meta-Llama-3.1-70B-Instruct-fast",
20 "llama3.1-405b": "meta-llama/Meta-Llama-3.1-405B-Instruct",
21 "mistral-nemo": "mistralai/Mistral-Nemo-Instruct-2407-fast",
22 "mistral-8x7b": "mistralai/Mixtral-8x7B-Instruct-v0.1-fast",
23 "mistral-8x22b": "mistralai/Mixtral-8x22B-Instruct-v0.1-fast",
24 "qwen-coder2.5-7b": "Qwen/Qwen2.5-Coder-7B-Instruct-fast",
25 "deepseek-2-lite": "deepseek-ai/DeepSeek-Coder-V2-Lite-Instruct-fast",
26 "phi-3-mini": "microsoft/Phi-3-mini-4k-instruct-fast",
27 "phi-3-medium": "microsoft/Phi-3-medium-128k-instruct-fast",
28 "gemma2-2b-it": "google/gemma-2-2b-it-fast",
29 "gemma2-9b-it": "google/gemma-2-9b-it-fast",
30 "olmo-7b": "allenai/OLMo-7B-Instruct-hf",
31 };
32
33 protected _convertModelName(model: string) {
34 return Nebius.MODEL_IDS[model] || this.model;
35 }
36}
37
38export default Nebius;