Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions core/control-plane/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ const modelDescriptionSchema = z.object({
"nebius",
"siliconflow",
"tensorix",
"forge",
"scaleway",
"watsonx",
]),
Expand Down Expand Up @@ -94,6 +95,7 @@ const embeddingsProviderSchema = z.object({
"nebius",
"siliconflow",
"tensorix",
"forge",
"scaleway",
"watsonx",
]),
Expand Down
14 changes: 14 additions & 0 deletions core/llm/llms/Forge.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import OpenAI from "./OpenAI.js";

import type { LLMOptions } from "../../index.js";

class Forge extends OpenAI {
static providerName = "forge";
static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://api.voxell.ai/v1/",
model: "forge-pro",
maxEmbeddingBatchSize: 128,
};
}

export default Forge;
2 changes: 2 additions & 0 deletions core/llm/llms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import Deepseek from "./Deepseek";
import Docker from "./Docker";
import Fireworks from "./Fireworks";
import Flowise from "./Flowise";
import Forge from "./Forge";
import FunctionNetwork from "./FunctionNetwork";
import Gemini from "./Gemini";
import Groq from "./Groq";
Expand Down Expand Up @@ -101,6 +102,7 @@ export const LLMClasses = [
SageMaker,
DeepInfra,
Flowise,
Forge,
Groq,
Fireworks,
NCompass,
Expand Down
45 changes: 45 additions & 0 deletions docs/customize/model-providers/more/forge.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
---
title: "Forge"
description: "Configure Forge with Continue to use OpenAI-compatible text embeddings from Voxell"
---

[Forge](https://voxell.ai) is an OpenAI-compatible embeddings API from Voxell. It is embeddings-only and exposes models at multiple dimensionalities: `forge-turbo` (1024d), `forge-pro` (2560d, default), and `forge-ultra-4k` (4096d). OpenAI model aliases are also accepted, and the `dimensions` parameter is supported.

<Info>
You can get an API key from [voxell.ai](https://voxell.ai).
</Info>

## Embeddings Model

We recommend configuring **forge-pro** as your embeddings model.

<Tabs>
<Tab title="YAML">
```yaml title="config.yaml"
name: My Config
version: 0.0.1
schema: v1

models:
- name: Forge Pro
provider: forge
model: forge-pro
apiKey: <YOUR_FORGE_API_KEY>
roles:
- embed
```
</Tab>
<Tab title="JSON">
```json title="config.json"
{
"embeddingsProvider": {
"provider": "forge",
"model": "forge-pro",
"apiKey": "<YOUR_FORGE_API_KEY>"
}
}
```
</Tab>
</Tabs>

[View the source](https://github.com/continuedev/continue/blob/main/core/llm/llms/Forge.ts)
1 change: 1 addition & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@
"customize/model-providers/more/clawrouter",
"customize/model-providers/more/deepseek",
"customize/model-providers/more/deepinfra",
"customize/model-providers/more/forge",
"customize/model-providers/more/groq",
"customize/model-providers/more/llamacpp",
"customize/model-providers/more/llamastack",
Expand Down
20 changes: 20 additions & 0 deletions gui/src/pages/AddNewModel/configs/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1271,6 +1271,26 @@ To get started, [register](https://dataplatform.cloud.ibm.com/registration/stepo
packages: [{ ...models.AUTODETECT }],
apiKeyUrl: "https://app.tensorix.ai",
},
forge: {
title: "Forge",
provider: "forge",
description:
"Forge is an OpenAI-compatible embeddings API from Voxell, offering high-dimensional text embedding models.",
longDescription:
"Forge provides OpenAI-compatible text embeddings. To get started, create an account and get an API key at [voxell.ai](https://voxell.ai). Available models include `forge-turbo` (1024d), `forge-pro` (2560d), and `forge-ultra-4k` (4096d).",
tags: [ModelProviderTags.RequiresApiKey],
collectInputFor: [
{
inputType: "text",
key: "apiKey",
label: "API Key",
placeholder: "Enter your Forge API key",
required: true,
},
],
packages: [{ ...models.AUTODETECT }],
apiKeyUrl: "https://voxell.ai",
},
venice: {
title: "Venice",
provider: "venice",
Expand Down
2 changes: 2 additions & 0 deletions packages/config-types/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const modelDescriptionSchema = z.object({
"continue-proxy",
"nebius",
"scaleway",
"forge",
"watsonx",
"minimax",
]),
Expand Down Expand Up @@ -115,6 +116,7 @@ export const embeddingsProviderSchema = z.object({
"continue-proxy",
"nebius",
"scaleway",
"forge",
"watsonx",
]),
apiBase: z.string().optional(),
Expand Down
2 changes: 2 additions & 0 deletions packages/llm-info/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { Azure } from "./providers/azure.js";
import { Bedrock } from "./providers/bedrock.js";
import { Cohere } from "./providers/cohere.js";
import { CometAPI } from "./providers/cometapi.js";
import { Forge } from "./providers/forge.js";
import { Gemini } from "./providers/gemini.js";
import { Inception } from "./providers/inception.js";
import { MiniMax } from "./providers/minimax.js";
Expand All @@ -27,6 +28,7 @@ export const allModelProviders: ModelProvider[] = [
Bedrock,
Cohere,
CometAPI,
Forge,
Inception,
MiniMax,
xAI,
Expand Down
23 changes: 23 additions & 0 deletions packages/llm-info/src/providers/forge.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
import { ModelProvider } from "../types.js";

export const Forge: ModelProvider = {
models: [
{
model: "forge-turbo",
displayName: "Forge Turbo",
recommendedFor: ["embed"],
},
{
model: "forge-pro",
displayName: "Forge Pro",
recommendedFor: ["embed"],
},
{
model: "forge-ultra-4k",
displayName: "Forge Ultra 4K",
recommendedFor: ["embed"],
},
],
id: "forge",
displayName: "Forge",
};
2 changes: 2 additions & 0 deletions packages/openai-adapters/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined {
return openAICompatible("https://api.function.network/v1/", config);
case "tensorix":
return openAICompatible("https://api.tensorix.ai/v1/", config);
case "forge":
return openAICompatible("https://api.voxell.ai/v1/", config);
case "openrouter":
return new OpenRouterApi(config);
case "clawrouter":
Expand Down
19 changes: 19 additions & 0 deletions packages/openai-adapters/src/test/main.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,25 @@ describe("Configuration", () => {
);
});

it("should configure Forge OpenAI client with correct apiBase and apiKey", () => {
const forge = constructLlmApi({
provider: "forge",
apiKey: "sk-xxx",
});

expect((forge as OpenAIApi).openai.baseURL).toBe(
"https://api.voxell.ai/v1/",
);
expect((forge as OpenAIApi).openai.apiKey).toBe("sk-xxx");

const forge2 = constructLlmApi({
provider: "forge",
apiKey: "sk-xxx",
apiBase: "https://api.example.com",
});
expect((forge2 as OpenAIApi).openai.baseURL).toBe("https://api.example.com");
});

it("should configure Azure OpenAI client with root URL and trailing slash", () => {
const azure = constructLlmApi({
provider: "azure",
Expand Down
1 change: 1 addition & 0 deletions packages/openai-adapters/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ export const OpenAIConfigSchema = BasePlusConfig.extend({
z.literal("zAI"),
z.literal("scaleway"),
z.literal("tensorix"),
z.literal("forge"),
z.literal("ncompass"),
z.literal("relace"),
z.literal("huggingface-inference-api"),
Expand Down
Loading