From c1dd0ac6cc880b719ccb5c0c2bda3239c2a3b25b Mon Sep 17 00:00:00 2001 From: Nirupam Bhowmick <48842933+heydryft@users.noreply.github.com> Date: Wed, 28 Oct 2026 16:58:59 +0000 Subject: [PATCH] feat(providers): add Runcrate as an OpenAI-compatible gateway --- LICENSES/README.md | 5 +++++ raven/cli/onboard_commands.py | 1 + raven/config/schema.py | 1 + raven/providers/registry.py | 19 +++++++++++++++++-- tests/data/wire_model_baseline.json | 8 ++++++++ tests/test_litellm_provider_model_names.py | 5 ++++- tests/test_provider_catalog.py | 7 ++++--- tests/test_rpc_model.py | 1 + ui-web/CONTEXT.md | 2 +- ui-web/src/assets/providers/runcrate.svg | 1 + ui-web/src/components/ProviderMark.test.tsx | 2 +- ui-web/src/components/ProviderMark.tsx | 2 ++ .../settings/providers/ProviderSide.tsx | 2 +- .../src/features/settings/providers/Roles.tsx | 2 +- 14 files changed, 48 insertions(+), 10 deletions(-) create mode 100644 ui-web/src/assets/providers/runcrate.svg diff --git a/LICENSES/README.md b/LICENSES/README.md index e6125a2a53..5967ac5e13 100644 --- a/LICENSES/README.md +++ b/LICENSES/README.md @@ -25,6 +25,11 @@ history. that row on the same nominative basis. It is drawn in `currentColor`, so the dark theme inverts it the way it does `vllm.svg`. Neither icon set below carries an Opper mark, which is why this one comes straight from the vendor. +- Runcrate's mark, `ui-web/src/assets/providers/runcrate.svg`, is supplied by + Runcrate, the vendor, with the change that added the Runcrate row, and shown + to identify that row on the same nominative basis. It is a one-colour drawing + of Runcrate's app icon in `currentColor`, so the dark theme inverts it the way + it does `vllm.svg`. Neither icon set below carries a Runcrate mark. - The channel marks under `ui-web/src/assets/channels/` come straight from the vendors too, on the same nominative basis: each identifies the channel row it sits on. Nine are the app icons the vendors publish on their App Store diff --git a/raven/cli/onboard_commands.py b/raven/cli/onboard_commands.py index 9b567ec1fd..c18cb33502 100644 --- a/raven/cli/onboard_commands.py +++ b/raven/cli/onboard_commands.py @@ -144,6 +144,7 @@ {"name": "aionly", "label": "AIOnly"}, {"name": "radeon_cloud", "label": "AMD GPU Cloud"}, {"name": "opper", "label": "Opper"}, + {"name": "runcrate", "label": "Runcrate"}, {"name": "azure_openai", "label": "Azure OpenAI"}, ], }, diff --git a/raven/config/schema.py b/raven/config/schema.py index 5ea96c8c73..de677dfeaa 100644 --- a/raven/config/schema.py +++ b/raven/config/schema.py @@ -661,6 +661,7 @@ def _merge_renamed_sections(cls, data: Any) -> Any: aionly: ProviderConfig = Field(default_factory=ProviderConfig) radeon_cloud: ProviderConfig = Field(default_factory=ProviderConfig) opper: ProviderConfig = Field(default_factory=ProviderConfig) + runcrate: ProviderConfig = Field(default_factory=ProviderConfig) # Self-hosted servers, reached by address like the three above. gpustack: ProviderConfig = Field(default_factory=ProviderConfig) ovms: ProviderConfig = Field(default_factory=ProviderConfig) # OpenVINO Model Server diff --git a/raven/providers/registry.py b/raven/providers/registry.py index 165c406ebd..7256192bb3 100644 --- a/raven/providers/registry.py +++ b/raven/providers/registry.py @@ -425,7 +425,7 @@ def claims(self, model: str) -> bool: renames_models=True, ), # === Resale gateways reached through OpenAI's driver =================== - # Fourteen shelves that resell other vendors' models over an + # Fifteen shelves that resell other vendors' models over an # OpenAI-compatible endpoint. LiteLLM routes none of them, so each borrows # OpenAI's driver and states the address that distinguishes it -- the same # shape as SiliconFlow above, and a gateway for the same reason: a model id @@ -639,6 +639,21 @@ def claims(self, model: str) -> bool: default_api_base="https://api.opper.ai/v3/compat", strip_model_prefix=False, ), + # Runcrate: open models under their makers' "vendor/model" ids, so the + # prefix is part of the id and stays. + ProviderSpec( + name="runcrate", + key_url="https://www.runcrate.ai/dashboard/api-keys", + keywords=("runcrate",), + env_key="OPENAI_API_KEY", + display_name="Runcrate", + homepage="https://www.runcrate.ai", + via_driver="openai", + is_gateway=True, + detect_by_base_keyword="runcrate.ai", + default_api_base="https://api.runcrate.ai/v1", + strip_model_prefix=False, + ), # === CN vendors reached through OpenAI's driver ======================== # LiteLLM carries no driver for any of these six, so each is reached the way # SiliconFlow is: its OpenAI-compatible endpoint, spoken by OpenAI's driver. @@ -1530,7 +1545,7 @@ def _tables() -> "tuple[dict[str, ProviderSpec], dict[str, str]]": Both used to scan every spec per call, and between them they were reached some 22,000 times while one ``model.options`` answered -- a fifth of that - answer's time went into normalizing the same fifty-six names over and + answer's time went into normalizing the same fifty-seven names over and over. Keyed on the tuple's identity so a registry a test installs is read rather than remembered. """ diff --git a/tests/data/wire_model_baseline.json b/tests/data/wire_model_baseline.json index c4edfc7eb9..4e3ddc1f42 100644 --- a/tests/data/wire_model_baseline.json +++ b/tests/data/wire_model_baseline.json @@ -412,6 +412,14 @@ "vendorx/zz-probe-1": "openai/vendorx/zz-probe-1", "zz-probe-1": "openai/zz-probe-1" }, + "runcrate": { + "openai/zz-probe-1": "openai/zz-probe-1", + "runcrate-probe": "openai/runcrate-probe", + "runcrate/vendorx/zz-probe-1": "openai/vendorx/zz-probe-1", + "runcrate/zz-probe-1": "openai/zz-probe-1", + "vendorx/zz-probe-1": "openai/vendorx/zz-probe-1", + "zz-probe-1": "openai/zz-probe-1" + }, "siliconflow": { "openai/zz-probe-1": "openai/zz-probe-1", "siliconflow-probe": "openai/siliconflow-probe", diff --git a/tests/test_litellm_provider_model_names.py b/tests/test_litellm_provider_model_names.py index 00d67f630a..6707080ba0 100644 --- a/tests/test_litellm_provider_model_names.py +++ b/tests/test_litellm_provider_model_names.py @@ -68,6 +68,7 @@ "aionly": "gpt-5.5", "radeon_cloud": "deepseek-v3", "opper": "claude-sonnet-4-6", + "runcrate": "deepseek-ai/DeepSeek-V4.1-Flash", "gpustack": "qwen3-8b", "ovms": "qwen3-8b", "bigmodel": "glm-4.6", @@ -122,7 +123,7 @@ "longcat": "openai/longcat-2.0", "modelscope": "openai/Qwen/Qwen3-235B-A22B-Instruct-2507", "qiniu": "openai/deepseek-v3", - # Fourteen resale gateways, all reached through OpenAI's driver: the route + # Fifteen resale gateways, all reached through OpenAI's driver: the route # is that driver's and the address in config is what tells them apart. The # id after it is the shelf's own spelling of somebody else's model and is # sent verbatim -- 302.AI's "gpt-5.5" is not OpenAI's, and is never treated @@ -141,6 +142,7 @@ "aionly": "openai/gpt-5.5", "radeon_cloud": "openai/deepseek-v3", "opper": "openai/claude-sonnet-4-6", + "runcrate": "openai/deepseek-ai/DeepSeek-V4.1-Flash", # Two self-hosted servers with no LiteLLM driver, so the same borrowed # route -- and the address, supplied per deployment, is the whole of what # sends the call to a box on the LAN instead of to OpenAI. @@ -226,6 +228,7 @@ "aionly": "openai/gpt-5.5", "radeon_cloud": "openai/deepseek-v3", "opper": "openai/claude-sonnet-4-6", + "runcrate": "openai/deepseek-ai/DeepSeek-V4.1-Flash", "gpustack": "openai/qwen3-8b", "ovms": "openai/qwen3-8b", # A GLM id names its vendor either way, so both spellings agree here -- diff --git a/tests/test_provider_catalog.py b/tests/test_provider_catalog.py index 85a97d88a5..7de966a015 100644 --- a/tests/test_provider_catalog.py +++ b/tests/test_provider_catalog.py @@ -67,15 +67,16 @@ "aionly", "radeon_cloud", "opper", + "runcrate", "gpustack", "ovms", "bigmodel", } -def test_registry_has_exactly_56_providers() -> None: - assert len(PROVIDERS) == 56 - assert len(EXPECTED_PROVIDER_NAMES) == 56 +def test_registry_has_exactly_57_providers() -> None: + assert len(PROVIDERS) == 57 + assert len(EXPECTED_PROVIDER_NAMES) == 57 def test_registry_provider_name_set_is_pinned() -> None: diff --git a/tests/test_rpc_model.py b/tests/test_rpc_model.py index 9b2f57a27e..0f718cc336 100644 --- a/tests/test_rpc_model.py +++ b/tests/test_rpc_model.py @@ -1312,6 +1312,7 @@ async def test_options_reports_a_passthrough_vendor_from_the_id_it_stored(fake_h "aionly", "radeon_cloud", "opper", + "runcrate", ] diff --git a/ui-web/CONTEXT.md b/ui-web/CONTEXT.md index b28ccfebb3..ea404d87cc 100644 --- a/ui-web/CONTEXT.md +++ b/ui-web/CONTEXT.md @@ -363,7 +363,7 @@ The kind narrows each provider's column, never the provider list. **Gateway provider**: A provider that resells other vendors' models under `vendor/model` ids -- `ProviderSpec.is_gateway` in `raven/providers/registry.py`, `gateway` on a -`model.options` row. Twenty-two of the fifty-six. +`model.options` row. Twenty-three of the fifty-seven. _Avoid_: "gateway" alone, which in this document is the page's one data entry point above. diff --git a/ui-web/src/assets/providers/runcrate.svg b/ui-web/src/assets/providers/runcrate.svg new file mode 100644 index 0000000000..5751c230b2 --- /dev/null +++ b/ui-web/src/assets/providers/runcrate.svg @@ -0,0 +1 @@ +Runcrate diff --git a/ui-web/src/components/ProviderMark.test.tsx b/ui-web/src/components/ProviderMark.test.tsx index b5b78e5311..118f6e1385 100644 --- a/ui-web/src/components/ProviderMark.test.tsx +++ b/ui-web/src/components/ProviderMark.test.tsx @@ -23,7 +23,7 @@ const BRANDED = [ 'huggingface', 'poe', 'xiaomi_mimo', 'baichuan', 'baidu_cloud', 'stepfun', 'longcat', 'modelscope', 'qiniu', 'bigmodel', 'ai302', 'burncloud', 'ppio', 'sophnet', 'tokenhub', 'radeon_cloud', - 'opper', + 'opper', 'runcrate', ] /* Every provider carries a mark now, so no provider is left to pin here. The diff --git a/ui-web/src/components/ProviderMark.tsx b/ui-web/src/components/ProviderMark.tsx index 280f22321f..8d94d773b8 100644 --- a/ui-web/src/components/ProviderMark.tsx +++ b/ui-web/src/components/ProviderMark.tsx @@ -62,6 +62,7 @@ const ICONS: Record = { poe: 'poe', ppio: 'ppio', qiniu: 'qiniu', + runcrate: 'runcrate', siliconflow: 'siliconcloud', sophnet: 'sophnet', stepfun: 'stepfun', @@ -179,6 +180,7 @@ const TONES: Record = { anthropic: 'hybrid', mineru: 'hybrid', opper: 'mono', + runcrate: 'mono', vllm: 'mono', } diff --git a/ui-web/src/features/settings/providers/ProviderSide.tsx b/ui-web/src/features/settings/providers/ProviderSide.tsx index b49c7b2cd5..347cf29a16 100644 --- a/ui-web/src/features/settings/providers/ProviderSide.tsx +++ b/ui-web/src/features/settings/providers/ProviderSide.tsx @@ -5,7 +5,7 @@ * "which could I have" are one question asked twice, and the page used to * answer only the first -- fifty-odd vendors Raven supports were reachable * from a dropdown inside an "add" form and nowhere else. A column of - * fifty-six needs a search box and a filter, which is what turns the full + * fifty-seven needs a search box and a filter, which is what turns the full * list from noise into an index. * * Connected first because that is the question asked most often; registry diff --git a/ui-web/src/features/settings/providers/Roles.tsx b/ui-web/src/features/settings/providers/Roles.tsx index 4d2142a892..df1c817706 100644 --- a/ui-web/src/features/settings/providers/Roles.tsx +++ b/ui-web/src/features/settings/providers/Roles.tsx @@ -314,7 +314,7 @@ export function RolePill({ role, setup }: { role: Role; setup?: boolean }): JSX. names it into the state the switch is about to wipe. A media role's default is OpenRouter, the one provider every media tool runs on, so open that row rather than leaving the reader to - find it among fifty-six. */ + find it among fifty-seven. */ store.setTab('provider') if (role.media) store.set({ provider: MEDIA_PROVIDER, provAdd: MEDIA_PROVIDER }) }}>