Skip to content

Commit 44f067d

Browse files
committed
feat(cli/ovhcloud): Add OVHcloud AI Endpoints to CLI
1 parent de26412 commit 44f067d

File tree

12 files changed

+125
-1
lines changed

12 files changed

+125
-1
lines changed

cli/docs/PROVIDER_CONFIGURATION.md

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ This guide provides detailed information on how to configure each provider in Ki
4545
- [Virtual Quota Fallback](#virtual-quota-fallback)
4646
- [Human Relay](#human-relay)
4747
- [Fake AI](#fake-ai)
48+
- [OVHcloud AI Endpoints](#ovhcloud-ai-endpoints)
4849

4950
## Introduction
5051

@@ -1322,6 +1323,41 @@ Fake AI provider for testing and development.
13221323

13231324
---
13241325

1326+
### OVHcloud AI Endpoints
1327+
1328+
OVHcloud AI Endpoints inference provider.
1329+
1330+
**Description**: Use OVHcloud leading cloud computing for accessing various open-source models, with GDPR compliance and data sovreignty.
1331+
1332+
**Required Field**:
1333+
1334+
- `ovhCloudAiEndpointsModelId` (text): Model identifier (default: `gpt-oss-120b`)
1335+
1336+
**Optional Field**:
1337+
1338+
- `ovhCloudAiEndpointsApiKey` (password): Your OVHcloud AI Endpoints API key
1339+
If you do not provide the API key, you can use our service for free with a rate limit.
1340+
1341+
**Example Configuration**:
1342+
1343+
```json
1344+
{
1345+
"id": "default",
1346+
"provider": "ovhcloud",
1347+
"ovhCloudAiEndpointsApiKey": "your-api-key", // optional
1348+
"ovhCloudAiEndpointsModelId": "gpt-oss-120b"
1349+
}
1350+
```
1351+
1352+
**Default Model**: `gpt-oss-120b`
1353+
1354+
**Notes**:
1355+
1356+
- Get your API key from https://ovh.com/manager in `Public Cloud > AI & Machine Learning` section, then in `AI Endpoints`.
1357+
- You can browse our [catalog](https://www.ovhcloud.com/en/public-cloud/ai-endpoints/catalog/) to discover all of our models.
1358+
1359+
---
1360+
13251361
## Additional Resources
13261362

13271363
- [Kilo Code Documentation](https://docs.kilocode.com/)

cli/src/commands/__tests__/model.test.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ describe("/model command", () => {
4141
"io-intelligence": {},
4242
deepinfra: {},
4343
"vercel-ai-gateway": {},
44+
ovhcloud: {},
4445
}
4546

4647
const mockProvider: ProviderConfig = {
@@ -404,6 +405,7 @@ describe("/model command", () => {
404405
"io-intelligence": {},
405406
deepinfra: {},
406407
"vercel-ai-gateway": {},
408+
ovhcloud: {},
407409
}
408410
mockContext.args = ["list"]
409411

cli/src/commands/model.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ async function ensureRouterModels(context: any): Promise<boolean> {
3737
"deepinfra",
3838
"io-intelligence",
3939
"vercel-ai-gateway",
40+
"ovhcloud",
4041
].includes(routerName)
4142

4243
if (!needsRouterModels) {

cli/src/config/mapper.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,8 @@ function getModelIdForProvider(provider: ProviderConfig): string {
8888
return provider.vercelAiGatewayModelId || ""
8989
case "io-intelligence":
9090
return provider.ioIntelligenceModelId || ""
91+
case "ovhcloud":
92+
return provider.ovhCloudAiEndpointsModelId || ""
9193
default:
9294
return provider.apiModelId || provider.modelId || ""
9395
}

cli/src/config/schema.json

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,8 @@
263263
"vercel-ai-gateway",
264264
"virtual-quota-fallback",
265265
"human-relay",
266-
"fake-ai"
266+
"fake-ai",
267+
"ovhcloud"
267268
]
268269
}
269270
},
@@ -2065,6 +2066,48 @@
20652066
}
20662067
}
20672068
}
2069+
},
2070+
{
2071+
"if": {
2072+
"properties": { "provider": { "const": "ovhcloud" } }
2073+
},
2074+
"then": {
2075+
"properties": {
2076+
"ovhCloudAiEndpointsApiKey": {
2077+
"type": "string",
2078+
"description": "OVHcloud AI Endpoints API key"
2079+
},
2080+
"ovhCloudAiEndpointsModelId": {
2081+
"type": "string",
2082+
"description": "OVHcloud AI Endpoints model ID"
2083+
}
2084+
}
2085+
}
2086+
},
2087+
{
2088+
"if": {
2089+
"properties": { "provider": { "const": "ovhcloud" } }
2090+
},
2091+
"then": {
2092+
"properties": {
2093+
"ovhCloudAiEndpointsApiKey": { "type": "string" }
2094+
},
2095+
"required": []
2096+
}
2097+
},
2098+
{
2099+
"if": {
2100+
"properties": {
2101+
"provider": { "const": "ovhcloud" },
2102+
"ovhCloudAiEndpointsModelId": { "type": "string", "minLength": 1 }
2103+
},
2104+
"required": ["ovhCloudAiEndpointsModelId"]
2105+
},
2106+
"then": {
2107+
"properties": {
2108+
"ovhCloudAiEndpointsModelId": { "minLength": 1 }
2109+
}
2110+
}
20682111
}
20692112
]
20702113
}

cli/src/constants/providers/__tests__/models.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ describe("Static Provider Models", () => {
217217
"io-intelligence": {},
218218
deepinfra: {},
219219
"vercel-ai-gateway": {},
220+
ovhcloud: {},
220221
}
221222

222223
it("should return router models for openrouter provider", () => {

cli/src/constants/providers/labels.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ export const PROVIDER_LABELS: Record<ProviderName, string> = {
4343
"virtual-quota-fallback": "Virtual Quota Fallback",
4444
"human-relay": "Human Relay",
4545
"fake-ai": "Fake AI",
46+
ovhcloud: "OVHcloud AI Endpoints",
4647
}
4748

4849
/**

cli/src/constants/providers/models.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@ import {
4545
claudeCodeDefaultModelId,
4646
geminiCliModels,
4747
geminiCliDefaultModelId,
48+
ovhCloudAiEndpointsDefaultModelId,
4849
} from "@roo-code/types"
4950

5051
/**
@@ -62,6 +63,7 @@ export type RouterName =
6263
| "io-intelligence"
6364
| "deepinfra"
6465
| "vercel-ai-gateway"
66+
| "ovhcloud"
6567

6668
/**
6769
* ModelInfo interface - mirrors the one from packages/types/src/model.ts
@@ -105,6 +107,7 @@ export const PROVIDER_TO_ROUTER_NAME: Record<ProviderName, RouterName | null> =
105107
deepinfra: "deepinfra",
106108
"io-intelligence": "io-intelligence",
107109
"vercel-ai-gateway": "vercel-ai-gateway",
110+
ovhcloud: "ovhcloud",
108111
// Providers without dynamic model support
109112
anthropic: null,
110113
bedrock: null,
@@ -150,6 +153,7 @@ export const PROVIDER_MODEL_FIELD: Record<ProviderName, string | null> = {
150153
deepinfra: "deepInfraModelId",
151154
"io-intelligence": "ioIntelligenceModelId",
152155
"vercel-ai-gateway": "vercelAiGatewayModelId",
156+
ovhcloud: "ovhCloudAiEndpointsModelId",
153157
// Providers without dynamic model support
154158
anthropic: null,
155159
bedrock: null,
@@ -242,6 +246,7 @@ export const DEFAULT_MODEL_IDS: Partial<Record<ProviderName, string>> = {
242246
zai: internationalZAiDefaultModelId,
243247
roo: rooDefaultModelId,
244248
"gemini-cli": geminiCliDefaultModelId,
249+
ovhcloud: ovhCloudAiEndpointsDefaultModelId,
245250
}
246251

247252
/**
@@ -413,6 +418,8 @@ export function getModelIdKey(provider: ProviderName): string {
413418
return "ioIntelligenceModelId"
414419
case "vercel-ai-gateway":
415420
return "vercelAiGatewayModelId"
421+
case "ovhcloud":
422+
return "ovhCloudAiEndpointsModelId"
416423
default:
417424
return "apiModelId"
418425
}

cli/src/constants/providers/settings.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,18 @@ export const FIELD_REGISTRY: Record<string, FieldMetadata> = {
452452
placeholder: "Enter model ID...",
453453
},
454454

455+
// OVHcloud AI Endpoints fields
456+
ovhCloudAiEndpointsApiKey: {
457+
label: "API Key",
458+
type: "password",
459+
placeholder: "Enter OVHcloud AI Endpoints API key...",
460+
},
461+
ovhCloudAiEndpointsModelId: {
462+
label: "Model ID",
463+
type: "text",
464+
placeholder: "Enter model ID...",
465+
},
466+
455467
// Virtual Quota Fallback fields
456468
profiles: {
457469
label: "Profiles Configuration",
@@ -779,6 +791,12 @@ export const getProviderSettings = (provider: ProviderName, config: ProviderSett
779791
},
780792
]
781793

794+
case "ovhcloud":
795+
return [
796+
createFieldConfig("ovhCloudAiEndpointsApiKey", config),
797+
createFieldConfig("ovhCloudAiEndpointsModelId", config, "gpt-oss-120b"),
798+
]
799+
782800
default:
783801
return []
784802
}
@@ -826,6 +844,7 @@ export const PROVIDER_DEFAULT_MODELS: Record<ProviderName, string> = {
826844
"virtual-quota-fallback": "gpt-4o",
827845
"human-relay": "human",
828846
"fake-ai": "fake-model",
847+
ovhcloud: "gpt-oss-120b",
829848
}
830849

831850
/**

cli/src/constants/providers/validation.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export const PROVIDER_REQUIRED_FIELDS: Record<ProviderName, string[]> = {
4040
"vercel-ai-gateway": ["vercelAiGatewayApiKey", "vercelAiGatewayModelId"],
4141
"human-relay": ["apiModelId"],
4242
"fake-ai": ["apiModelId"],
43+
ovhcloud: ["ovhCloudAiEndpointsModelId"],
4344
// Special cases handled separately in handleSpecialValidations
4445
vertex: [], // Has special validation logic (either/or fields)
4546
"vscode-lm": [], // Has nested object validation

0 commit comments

Comments
 (0)