add OVHcloud AI Endpoints provider

OVHcloud AI Endpoints is a serverless inference API that provides
access to a curated selection of models (e.g., Llama, Mistral, Qwen,
Deepseek). It is designed with security and data privacy in mind
and is compliant with GDPR.

This commit adds OVHcloud AI Endpoint as a listed provider and makes
the appropriate connection to the supported models.
This commit is contained in:
Lucien Loiseau 2025-04-09 10:27:12 +02:00
parent 8d9341a0f0
commit 0e4f17280b
15 changed files with 218 additions and 14 deletions

View file

@ -16,6 +16,7 @@ const modelDescriptionSchema = z.object({
"sagemaker",
"cloudflare",
"azure",
"ovhcloud",
"nebius",
"siliconflow",
"scaleway",
@ -86,6 +87,7 @@ const embeddingsProviderSchema = z.object({
"cohere",
"free-trial",
"gemini",
"ovhcloud",
"nebius",
"siliconflow",
"scaleway",

View file

@ -13,6 +13,7 @@ import Nebius from "../llm/llms/Nebius.js";
import Nvidia from "../llm/llms/Nvidia.js";
import Ollama from "../llm/llms/Ollama.js";
import OpenAI from "../llm/llms/OpenAI.js";
import OVHcloud from "../llm/llms/OVHcloud.js";
import SageMaker from "../llm/llms/SageMaker.js";
import Scaleway from "../llm/llms/Scaleway.js";
import SiliconFlow from "../llm/llms/SiliconFlow.js";
@ -42,6 +43,7 @@ export const allEmbeddingsProviders: Record<
deepinfra: DeepInfra,
ncompass: NCompass,
nvidia: Nvidia,
ovhcloud: OVHcloud,
voyage: Voyage,
mistral: Mistral,
nebius: Nebius,

View file

@ -77,6 +77,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [
"azure",
"scaleway",
"nebius",
"ovhcloud"
];
const MODEL_SUPPORTS_IMAGES: string[] = [
@ -147,6 +148,7 @@ const PARALLEL_PROVIDERS: string[] = [
"together",
"novita",
"sambanova",
"ovhcloud",
"nebius",
"vertexai",
"function-network",
@ -380,5 +382,6 @@ export {
autodetectTemplateType,
llmCanGenerateInParallel,
modelSupportsImages,
modelSupportsTools,
modelSupportsTools
};

39
core/llm/llms/OVHcloud.ts Normal file
View file

@ -0,0 +1,39 @@
import { ChatCompletionCreateParams } from "openai/resources/index";
import { ChatMessage, CompletionOptions, LLMOptions } from "../../index.js";
import OpenAI from "./OpenAI.js";
export class OVHcloud extends OpenAI {
static providerName = "ovhcloud";
static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/",
model: "Qwen2.5-Coder-32B-Instruct",
useLegacyCompletionsEndpoint: false,
};
private static MODEL_IDS: { [name: string]: string } = {
"llama3.1-8b": "Llama-3.1-8B-Instruct",
"llama3.1-70b": "Meta-Llama-3_1-70B-Instruct",
"llama3.3-70b": "Meta-Llama-3_3-70B-Instruct",
"qwen2.5-coder-32b": "Qwen2.5-Coder-32B-Instruct",
"codestral-mamba-latest": "mamba-codestral-7B-v0.1",
"mistral-7b": "Mistral-7B-Instruct-v0.3",
"mistral-8x7b": "Mixtral-8x7B-Instruct-v0.1",
"mistral-nemo": "Mistral-Nemo-Instruct-2407",
"DeepSeek-R1-Distill-Llama-70B": "DeepSeek-R1-Distill-Llama-70B"
};
protected _convertModelName(model: string) {
return OVHcloud.MODEL_IDS[model] || this.model;
}
protected _convertArgs(options: CompletionOptions, messages: ChatMessage[]): ChatCompletionCreateParams {
const modifiedOptions = {
...options,
model: this._convertModelName(options.model)
};
return super._convertArgs(modifiedOptions, messages);
}
}
export default OVHcloud;

View file

@ -41,6 +41,7 @@ import Nvidia from "./Nvidia";
import Ollama from "./Ollama";
import OpenAI from "./OpenAI";
import OpenRouter from "./OpenRouter";
import OVHcloud from "./OVHcloud";
import { Relace } from "./Relace";
import Replicate from "./Replicate";
import SageMaker from "./SageMaker";
@ -74,6 +75,7 @@ export const LLMClasses = [
Kindo,
LlamaCpp,
OpenAI,
OVHcloud,
LMStudio,
Mistral,
Bedrock,

View file

@ -0,0 +1,72 @@
---
title: OVHcloud AI Endpoints
---
import TabItem from "@theme/TabItem";
import Tabs from "@theme/Tabs";
OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR.
:::info
To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/).
:::
## Chat model
We recommend configuring **Qwen2.5-Coder-32B-Instruct** as your chat model.
Check our [catalog](https://endpoints.ai.cloud.ovh.net/catalog) to see all of our models hsoted on AI Endpoints.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: Qwen2.5-Coder-32B-Instruct
provider: ovhcloud
model: qwen2.5-coder-32b
apiKey: <YOUR_AIENDPOINTS_API_KEY>
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json"
{
"models": [
{
"title": "Qwen2.5-Coder-32B-Instruct",
"provider": "ovhcloud",
"model": "qwen2.5-coder-32b",
"apiKey": "<YOUR_AIENDPOINTS_API_KEY>"
}
]
}
```
</TabItem>
</Tabs>
## Embeddings model
We recommend configuring **bge-multilingual-gemma2** as your embeddings model.
<Tabs groupId="config-example">
<TabItem value="yaml" label="YAML">
```yaml title="config.yaml"
models:
- name: BGE Multilingual Gemma2
provider: ovhcloud
model: bge-multilingual-gemma2
apiKey: <YOUR_AIENDPOINTS_API_KEY>
roles:
- embed
```
</TabItem>
<TabItem value="json" label="JSON">
```json title="config.json"
{
"embeddingsProvider": {
"provider": "ovhcloud",
"model": "bge-multilingual-gemma2",
"apiKey": "<YOUR_AIENDPOINTS_API_KEY>"
}
}
```
</TabItem>
</Tabs>

View file

@ -216,7 +216,8 @@
"siliconflow",
"function-network",
"scaleway",
"relace"
"relace",
"ovhcloud"
],
"markdownEnumDescriptions": [
"### OpenAI\nUse gpt-4, gpt-3.5-turbo, or any other OpenAI model. See [here](https://openai.com/product#made-for-developers) to obtain an API key.\n\n> [Reference](https://docs.continue.dev/reference/Model%20Providers/openai)",
@ -263,7 +264,8 @@
"### SiliconFlow\nTo get started with SiliconFlow, obtain your API key from [SiliconCloud](https://cloud.siliconflow.cn/account/ak). SiliconCloud provides cost-effective GenAI services based on excellent open source basic models.\n> [Models](https://siliconflow.cn/zh-cn/models)",
"### Function Network offers private, affordable user-owned AI\nTo get started with Function Network, obtain your API key from [Function Network](https://www.function.network/join-waitlist). Function Network provides a variety of models for chat, completion, and embeddings.",
"### Scaleway\n Generative APIs are serverless endpoints for the most popular AI models.\nHosted in European data centers and priced competitively per million tokens used, models served by Scaleway are ideal for users requiring low latency, full data privacy, and 100% compliance with EU AI Act. To get access to the Scaleway Generative APIs, read the [Quickstart guide](https://www.scaleway.com/en/docs/ai-data/generative-apis/quickstart/) and get a [valid API key](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/).",
"### Relace\n Relace provides a fast apply model. To get started, obtain an API key from [here](https://app.relace.ai/settings/api-keys)."
"### Relace\n Relace provides a fast apply model. To get started, obtain an API key from [here](https://app.relace.ai/settings/api-keys).",
"### OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR. To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/)."
],
"type": "string"
},
@ -498,7 +500,8 @@
"nebius",
"xAI",
"kindo",
"scaleway"
"scaleway",
"ovhcloud"
]
}
},
@ -1377,6 +1380,42 @@
}
}
},
{
"if": {
"properties": {
"provider": {
"enum": ["ovhcloud"]
}
},
"required": ["provider"]
},
"then": {
"properties": {
"model": {
"anyOf": [
{
"enum": [
"llama3.1-8b",
"llama3.1-70b",
"llama3.3-70b",
"qwen2.5-coder-32b",
"codestral-mamba-latest",
"mistral-7b",
"mistral-8x7b",
"mistral-nemo",
"DeepSeek-R1-Distill-Llama-70B"
]
},
{
"type": "string"
}
],
"markdownDescription": "Select a pre-defined option, or find the exact model string from OVHcloud [AI Endpoints catalog](https://endpoints.ai.cloud.ovh.net/catalog).",
"x-intellij-html-description": "Select a pre-defined option, or find the exact model string from OVHcloud <a href='https://endpoints.ai.cloud.ovh.net/catalog'>AI Endpoints catalog</a>."
}
}
}
},
{
"if": {
"properties": {
@ -2765,7 +2804,8 @@
"lmstudio",
"siliconflow",
"function-network",
"scaleway"
"scaleway",
"ovhcloud"
]
},
"model": {

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View file

@ -174,6 +174,7 @@ export const models: { [key: string]: ModelPackage } = {
"llama.cpp",
"replicate",
"cerebras",
"ovhcloud",
"nebius",
"scaleway",
],
@ -371,6 +372,7 @@ export const models: { [key: string]: ModelPackage } = {
"ollama",
"lmstudio",
"together",
"ovhcloud",
"llama.cpp",
"replicate",
"nebius",
@ -511,7 +513,7 @@ export const models: { [key: string]: ModelPackage } = {
contextLength: 65536,
},
icon: "meta.png",
providerOptions: [],
providerOptions: ["ovhcloud"],
isOpenSource: false,
},
llama3170bChat: {
@ -524,7 +526,7 @@ export const models: { [key: string]: ModelPackage } = {
contextLength: 8192,
},
icon: "meta.png",
providerOptions: ["groq", "scaleway", "nebius"],
providerOptions: ["groq", "ovhcloud", "scaleway", "nebius"],
isOpenSource: false,
},
llama31405bChat: {
@ -635,6 +637,7 @@ export const models: { [key: string]: ModelPackage } = {
"ollama",
"lmstudio",
"together",
"ovhcloud",
"llama.cpp",
"replicate",
"nebius",
@ -753,7 +756,7 @@ export const models: { [key: string]: ModelPackage } = {
contextLength: 256_000,
},
icon: "mistral.png",
providerOptions: ["mistral"],
providerOptions: ["ovhcloud", "mistral"],
isOpenSource: true,
},
mistral7b: {
@ -1400,7 +1403,7 @@ export const models: { [key: string]: ModelPackage } = {
contextLength: 32_000,
},
icon: "qwen.png",
providerOptions: ["scaleway", "nebius", "ncompass"],
providerOptions: ["scaleway", "nebius", "ovhcloud", "ncompass"],
isOpenSource: true,
},
grokBeta: {
@ -1688,7 +1691,7 @@ export const models: { [key: string]: ModelPackage } = {
contextLength: 32_000,
},
icon: "deepseek.png",
providerOptions: ["sambanova"],
providerOptions: ["ovhcloud", "sambanova"],
isOpenSource: true,
},
deepseekR1: {

View file

@ -161,6 +161,40 @@ export const providers: Partial<Record<string, ProviderInfo>> = {
packages: [models.llama31Chat, models.deepseek],
apiKeyUrl: "https://function.network/join-waitlist",
},
ovhcloud: {
title: "OVHcloud",
provider: "ovhcloud",
refPage: "ovhcloud",
description:
"OVHcloud AI Endpoints is a serverless inference API that provides access to a curated selection of models (e.g., Llama, Mistral, Qwen, Deepseek). It is designed with security and data privacy in mind and is compliant with GDPR.",
longDescription: `To get started, create an API key on the OVHcloud [AI Endpoints website](https://endpoints.ai.cloud.ovh.net/). For more information, including pricing, visit the OVHcloud [AI Endpoints product page](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/).`,
params: {
apiKey: "",
},
collectInputFor: [
{
inputType: "text",
key: "apiKey",
label: "API key",
placeholder: "Enter your AI Endpoints API key",
required: true,
},
...completionParamsInputsConfigs,
],
icon: "ovhcloud.png",
tags: [ModelProviderTags.RequiresApiKey, ModelProviderTags.OpenSource],
packages: [
models.llama318bChat,
models.llama3170bChat,
models.llama3370bChat,
models.codestralMamba,
models.mistralOs,
models.mistralNemo,
models.Qwen25Coder32b,
models.deepseekR1DistillLlama70B,
],
apiKeyUrl: "https://endpoints.ai.cloud.ovh.net/",
},
scaleway: {
title: "Scaleway",
provider: "scaleway",

4
package-lock.json generated
View file

@ -8,7 +8,8 @@
"@typescript-eslint/parser": "^7.8.0",
"eslint-plugin-import": "^2.29.1",
"prettier": "^3.3.3",
"prettier-plugin-tailwindcss": "^0.6.8"
"prettier-plugin-tailwindcss": "^0.6.8",
"typescript": "^5.6.3"
}
},
"node_modules/@eslint-community/eslint-utils": {
@ -2976,7 +2977,6 @@
"resolved": "https://registry.npmjs.org/typescript/-/typescript-5.6.3.tgz",
"integrity": "sha512-hjcS1mhfuyi4WW8IWtjP7brDrG2cuDZukyrYrSauoXGNgx0S7zceP07adYkJycEr56BOUTNPzbInooiN3fn1qw==",
"dev": true,
"peer": true,
"bin": {
"tsc": "bin/tsc",
"tsserver": "bin/tsserver"

View file

@ -55,6 +55,7 @@ export const modelDescriptionSchema = z.object({
"sagemaker",
"cloudflare",
"azure",
"ovhcloud",
"continue-proxy",
"nebius",
"scaleway",
@ -109,6 +110,7 @@ export const embeddingsProviderSchema = z.object({
"cohere",
"free-trial",
"gemini",
"ovhcloud",
"continue-proxy",
"nebius",
"scaleway",

View file

@ -52,6 +52,7 @@ They are concerned with:
- [x] OpenRouter
- [x] OpenAI
- [ ] !Ollama
- [x] OVHCLoud
- [ ] Replicate
- [ ] SageMaker
- [x] SambaNova

View file

@ -2,7 +2,6 @@ import dotenv from "dotenv";
import { z } from "zod";
import { AnthropicApi } from "./apis/Anthropic.js";
import { AzureOpenAIApi } from "./apis/AzureOpenAI.js";
import { BaseLlmApi } from "./apis/base.js";
import { CohereApi } from "./apis/Cohere.js";
import { DeepSeekApi } from "./apis/DeepSeek.js";
import { GeminiApi } from "./apis/Gemini.js";
@ -11,6 +10,7 @@ import { MockApi } from "./apis/Mock.js";
import { MoonshotApi } from "./apis/Moonshot.js";
import { OpenAIApi } from "./apis/OpenAI.js";
import { RelaceApi } from "./apis/Relace.js";
import { BaseLlmApi } from "./apis/base.js";
import { LLMConfig, OpenAIConfigSchema } from "./types.js";
dotenv.config();
@ -71,6 +71,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined {
return openAICompatible("http://localhost:10000", config);
case "nvidia":
return openAICompatible("https://integrate.api.nvidia.com/v1/", config);
case "ovhcloud":
return openAICompatible("https://oai.endpoints.kepler.ai.cloud.ovh.net/v1/", config);
case "scaleway":
return openAICompatible("https://api.scaleway.ai/v1/", config);
case "fireworks":
@ -106,9 +108,10 @@ export {
type Completion,
type CompletionCreateParams,
type CompletionCreateParamsNonStreaming,
type CompletionCreateParamsStreaming,
type CompletionCreateParamsStreaming
} from "openai/resources/index";
// export
export type { BaseLlmApi } from "./apis/base.js";
export type { LLMConfig } from "./types.js";

View file

@ -37,6 +37,7 @@ export const OpenAIConfigSchema = BasePlusConfig.extend({
z.literal("deepinfra"),
z.literal("groq"),
z.literal("nvidia"),
z.literal("ovhcloud"),
z.literal("fireworks"),
z.literal("together"),
z.literal("novita"),