feat(provider): add CrossModel provider#12900
Open
hujuncheng wants to merge 2 commits into
Open
Conversation
CrossModel (https://crossmodel.ai) is an OpenAI- and Anthropic-compatible multi-provider API gateway. Adds it as an OpenAI-compatible provider so users can call its catalog (OpenAI, Anthropic, DeepSeek, Gemini, Qwen, Kimi, GLM and more) with one API key. Models can be fetched dynamically from /v1/models.
Contributor
|
All contributors have signed the CLA ✍️ ✅ |
Author
|
I have read the CLA Document and I hereby sign the CLA |
Contributor
There was a problem hiding this comment.
1 issue found across 12 files
Reply with feedback, questions, or to request a fix.
Re-trigger cubic
Author
|
recheck |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds CrossModel as a new LLM provider.
CrossModel is an OpenAI- and Anthropic-compatible multi-provider API gateway. Users configure 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.
What this adds
core/llm/llms/CrossModel.ts— provider class extending the OpenAI-compatible base (apiBase: https://api.crossmodel.ai/v1/), plus a unit test.core/llm/llms/index.ts(LLMClasses),core/llm/autodetect.ts(image support), andcore/llm/toolSupport.ts.packages/openai-adapters—crossmodelcase + provider union entry (routes through the genericopenAICompatibleadapter).gui/src/pages/AddNewModel/configs/providers.ts(requires API key; models are fetched dynamically from the gateway via/v1/models, so no hardcoded model list) + logo.config_schema.jsonenum/description and a docs page underdocs/customize/model-providers/more/crossmodel.mdx(added todocs/docs.json).Notes
packages/openai-adapterstypechecks clean (tsc --noEmit). Model IDs use the<vendor>/<model>convention (e.g.anthropic/claude-sonnet-4-6); the catalog is at https://www.crossmodel.ai/models.Docs: https://crossmodel.ai/docs
Summary by cubic
Adds CrossModel as a new OpenAI-/Anthropic-compatible provider with dynamic model discovery. Users can call models from OpenAI, Anthropic, DeepSeek, Gemini, Qwen, Kimi, GLM and more with one API key; tools and image models are supported.
New Features
CrossModelprovider (extends OpenAI base) with reasoning fields, defaultapiBase(https://api.crossmodel.ai/v1/), and unit test; registered inLLMClasses.crossmodel; model IDs use<vendor>/<model>(e.g.,anthropic/claude-sonnet-4-6).packages/openai-adaptersroutescrossmodelvia the genericopenAICompatibleadapter; types updated./v1/modelsfetch, plus logo and docs page;docs/docs.jsonupdated.Bug Fixes
extensions/vscode/config_schema.jsonnow requiresapiKeyforcrossmodel; minor formatting cleanup.Written for commit 8b61cc5. Summary will update on new commits.