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
1 change: 1 addition & 0 deletions core/llm/autodetect.ts
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@ const PROVIDER_SUPPORTS_IMAGES: string[] = [
"sagemaker",
"openrouter",
"clawrouter",
"crossmodel",
"venice",
"sambanova",
"vertexai",
Expand Down
38 changes: 38 additions & 0 deletions core/llm/llms/CrossModel.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { LLMOptions } from "../../index.js";
import { osModelsEditPrompt } from "../templates/edit.js";

import OpenAI from "./OpenAI.js";

/**
* CrossModel LLM provider.
*
* CrossModel (https://crossmodel.ai) is an OpenAI- and Anthropic-compatible
* multi-provider API gateway. A single API key and base URL routes to models
* from OpenAI, Anthropic, DeepSeek, Gemini, Qwen, Kimi, GLM and more, with
* unified billing and usage tracking.
*
* Uses the OpenAI-compatible Chat Completions API. The available models can be
* listed dynamically from the gateway's `/v1/models` endpoint, so users can
* fetch the current catalog after entering their API key.
*
* @see https://crossmodel.ai/docs
*/
class CrossModel extends OpenAI {
static providerName = "crossmodel";

// CrossModel routes to reasoning-capable models and surfaces their
// reasoning content over the OpenAI-compatible wire format.
protected supportsReasoningField = true;
protected supportsReasoningDetailsField = true;

static defaultOptions: Partial<LLMOptions> = {
apiBase: "https://api.crossmodel.ai/v1/",
model: "anthropic/claude-sonnet-4-6",
promptTemplates: {
edit: osModelsEditPrompt,
},
useLegacyCompletionsEndpoint: false,
};
}

export default CrossModel;
38 changes: 38 additions & 0 deletions core/llm/llms/CrossModel.vitest.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
import { describe, expect, it } from "vitest";

import CrossModel from "./CrossModel";

describe("CrossModel", () => {
it("should have correct provider name", () => {
expect(CrossModel.providerName).toBe("crossmodel");
});

it("should have correct default options", () => {
expect(CrossModel.defaultOptions.apiBase).toBe(
"https://api.crossmodel.ai/v1/",
);
expect(CrossModel.defaultOptions.useLegacyCompletionsEndpoint).toBe(false);
});

it("should support reasoning fields", () => {
const crossModel = new CrossModel({
model: "anthropic/claude-sonnet-4-6",
});

expect(crossModel["supportsReasoningField"]).toBe(true);
expect(crossModel["supportsReasoningDetailsField"]).toBe(true);
});

it("should preserve the configured model id", () => {
const models = [
"anthropic/claude-opus-4-8",
"openai/gpt-5.5",
"deepseek/deepseek-v4-pro",
];

for (const model of models) {
const crossModel = new CrossModel({ model });
expect(crossModel.model).toBe(model);
}
});
});
2 changes: 2 additions & 0 deletions core/llm/llms/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import Cerebras from "./Cerebras";
import Cloudflare from "./Cloudflare";
import Cohere from "./Cohere";
import CometAPI from "./CometAPI";
import CrossModel from "./CrossModel";
import DeepInfra from "./DeepInfra";
import Deepseek from "./Deepseek";
import Docker from "./Docker";
Expand Down Expand Up @@ -74,6 +75,7 @@ export const LLMClasses = [
Anthropic,
Cohere,
CometAPI,
CrossModel,
FunctionNetwork,
Gemini,
Llamafile,
Expand Down
16 changes: 16 additions & 0 deletions core/llm/toolSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,22 @@ export const PROVIDER_TOOL_SUPPORT: Record<string, (model: string) => boolean> =

return false;
},
crossmodel: (model) => {
// CrossModel is an OpenAI/Anthropic-compatible gateway whose catalog is
// made up of tool-capable chat models, addressed as `<vendor>/<model>`.
const lower = model.toLowerCase();
const unsupported = [
"embedding",
"embed",
"whisper",
"tts",
"moderation",
];
if (unsupported.some((p) => lower.includes(p))) {
return false;
}
return true;
},
clawrouter: (model) => {
// ClawRouter routes to various providers, so we check common tool-supporting patterns
const lower = model.toLowerCase();
Expand Down
53 changes: 53 additions & 0 deletions docs/customize/model-providers/more/crossmodel.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
title: "How to Configure CrossModel with Continue"
sidebarTitle: "CrossModel"
---

[CrossModel](https://crossmodel.ai) is an OpenAI- and Anthropic-compatible API gateway. Use one API key and base URL to call models from OpenAI, Anthropic, DeepSeek, Gemini, Qwen, Kimi, GLM and more, with unified billing and usage tracking.

<Info>
Sign up at [crossmodel.ai](https://crossmodel.ai) and create an API key from
the [console](https://www.crossmodel.ai/console/api-keys).
</Info>

## Configuration

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

models:
- name: Claude Sonnet 4.6
provider: crossmodel
model: anthropic/claude-sonnet-4-6
apiKey: <YOUR_CROSSMODEL_API_KEY>
```
</Tab>
<Tab title="JSON (Deprecated)">
```json title="config.json"
{
"models": [
{
"title": "Claude Sonnet 4.6",
"provider": "crossmodel",
"model": "anthropic/claude-sonnet-4-6",
"apiKey": "<YOUR_CROSSMODEL_API_KEY>"
}
]
}
```
</Tab>
</Tabs>

## Available Models

Model IDs follow the `<vendor>/<model>` convention (for example `anthropic/claude-opus-4-8`, `openai/gpt-5.5`, `deepseek/deepseek-v4-pro`, `gemini/gemini-3.5-flash`). The full, up-to-date catalog with pricing is at [crossmodel.ai/models](https://www.crossmodel.ai/models), and can also be listed from the gateway's OpenAI-compatible `/v1/models` endpoint.

## Notes

- CrossModel uses an OpenAI-compatible API at `https://api.crossmodel.ai/v1`
- Set the `CROSSMODEL_API_KEY` environment variable or configure `apiKey` in your config
- An Anthropic-compatible endpoint is also available at the same host for tools that speak the Anthropic Messages API
1 change: 1 addition & 0 deletions docs/docs.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@
"pages": [
"customize/model-providers/more/asksage",
"customize/model-providers/more/clawrouter",
"customize/model-providers/more/crossmodel",
"customize/model-providers/more/deepseek",
"customize/model-providers/more/deepinfra",
"customize/model-providers/more/groq",
Expand Down
5 changes: 4 additions & 1 deletion extensions/vscode/config_schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,7 @@
"watsonx",
Comment thread
cubic-dev-ai[bot] marked this conversation as resolved.
"openrouter",
"clawrouter",
"crossmodel",
"sambanova",
"nvidia",
"vllm",
Expand Down Expand Up @@ -270,6 +271,7 @@
"### IBM watsonx\nwatsonx, developed by IBM, offers a variety of pre-trained AI foundation models that can be used for natural language processing (NLP), computer vision, and speech recognition tasks.",
"### OpenRouter\nOpenRouter offers a single API to access almost any language model. To get started, obtain an API key from [their console](https://openrouter.ai/settings/keys).",
"### ClawRouter\nClawRouter is an open-source LLM router that automatically selects the cheapest capable model for each request based on prompt complexity, providing 78-96% cost savings. To get started, run `npx clawrouter` to start the router at localhost:1337. A wallet is auto-generated on first run - fund it with USDC (Solana/Base) to access premium models, or use `blockrun/free` tier without payment.\n> [Reference](https://github.com/BlockRunAI/ClawRouter)",
"### CrossModel\nCrossModel is an OpenAI- and Anthropic-compatible API gateway. Use one API key and base URL to call models from OpenAI, Anthropic, DeepSeek, Gemini, Qwen, Kimi, GLM and more, with unified billing and usage tracking. Obtain an API key from [the console](https://www.crossmodel.ai/console/api-keys).\n> [Reference](https://crossmodel.ai/docs)",
"### SambaNova\n SambaNova provides fast inference of open-source language models with zero data retention. To get started, obtain an API key in [SambaNova Cloud](https://cloud.sambanova.ai/apis?utm_source=continue&utm_medium=external&utm_campaign=cloud_signup ).",
"### NVIDIA NIMs\nNVIDIA offers a single API to access almost any language model. To find out more, visit the [LLM APIs Documentation](https://docs.api.nvidia.com/nim/reference/llm-apis).\nFor information specific to getting a key, please check out the [docs here](https://docs.nvidia.com/nim/large-language-models/latest/getting-started.html#option-1-from-api-catalog)",
"### vLLM\nvLLM is a highly performant way of hosting LLMs for a team. To get started, follow their [quickstart](https://docs.vllm.ai/en/latest/getting_started/quickstart.html) to set up your server.",
Expand Down Expand Up @@ -536,7 +538,8 @@
"kindo",
"scaleway",
"ovhcloud",
"venice"
"venice",
"crossmodel"
]
}
},
Expand Down
12 changes: 12 additions & 0 deletions gui/public/logos/crossmodel.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
31 changes: 31 additions & 0 deletions gui/src/pages/AddNewModel/configs/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,37 @@ export const providers: Partial<Record<string, ProviderInfo>> = {
],
apiKeyUrl: "https://console.anthropic.com/account/keys",
},
crossmodel: {
title: "CrossModel",
provider: "crossmodel",
refPage: "crossmodel",
description:
"OpenAI- and Anthropic-compatible gateway to models from OpenAI, Anthropic, DeepSeek, Gemini, Qwen, Kimi, GLM and more",
longDescription:
"[CrossModel](https://crossmodel.ai) is an OpenAI- and Anthropic-compatible API gateway. Use one API key and base URL to call models from OpenAI, Anthropic, DeepSeek, Gemini, Qwen, Kimi, GLM and more, with unified billing and usage tracking. Sign up at [crossmodel.ai](https://crossmodel.ai), create an API key, then enter it below and fetch the available models.",
icon: "crossmodel.svg",
tags: [ModelProviderTags.RequiresApiKey],
apiKeyUrl: "https://www.crossmodel.ai/console/api-keys",
collectInputFor: [
{
inputType: "text",
key: "apiKey",
label: "API Key",
placeholder: "Enter your CrossModel API key",
required: true,
},
...completionParamsInputsConfigs,
],
packages: [
{
title: "Loading models...",
description:
"Enter your API key and fetch available models from CrossModel",
params: { model: "placeholder" },
isOpenSource: false,
},
],
},
openrouter: {
title: "OpenRouter",
provider: "openrouter",
Expand Down
2 changes: 2 additions & 0 deletions packages/openai-adapters/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,8 @@ export function constructLlmApi(config: LLMConfig): BaseLlmApi | undefined {
return new OpenRouterApi(config);
case "clawrouter":
return new ClawRouterApi(config);
case "crossmodel":
return openAICompatible("https://api.crossmodel.ai/v1/", config);
case "llama.cpp":
case "llamafile":
return openAICompatible("http://localhost:8000/", config);
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 @@ -53,6 +53,7 @@ export const OpenAIConfigSchema = BasePlusConfig.extend({
z.literal("msty"),
z.literal("openrouter"),
z.literal("clawrouter"),
z.literal("crossmodel"),
z.literal("sambanova"),
z.literal("text-gen-webui"),
z.literal("vllm"),
Expand Down
Loading