mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-11-22 04:19:40 +00:00
Compare commits
3 Commits
fix/codeql
...
feat/paral
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
804b085d36 | ||
|
|
a15f362b5c | ||
|
|
53df4e8278 |
@@ -0,0 +1 @@
|
||||
- **feat(providers):** ParalonCloud (`paraloncloud`) now accepts any model id its live `/v1/models` catalog returns (`passthroughModels`), seeds its offline models with the catalog's context lengths, records its native `/v1/responses` endpoint and shows key/base-URL hints in the dashboard ([#20794](https://github.com/cheaper-inference/OmniRoute/pull/20794), carried over from [#16587](https://github.com/cheaper-inference/OmniRoute/pull/16587)) — thanks @robertjitaru
|
||||
@@ -7,15 +7,19 @@ import { buildOpenAiCompatibleRegistryEntry } from "../../shared.ts";
|
||||
*
|
||||
* Embeddings (`multilingual-e5-small`) live in embeddingRegistry. `GET /v1/models` is
|
||||
* key-gated, so `modelsUrl` drives key validation and dashboard discovery; the seed below
|
||||
* is only the offline fallback.
|
||||
* is only the offline fallback, with the per-model context maxima the catalog reports.
|
||||
* The catalog follows the GPUs online on the network, so any model id the live list
|
||||
* returns is accepted (`passthroughModels`). `POST /v1/responses` is served natively.
|
||||
*/
|
||||
export const paraloncloudProvider: RegistryEntry = buildOpenAiCompatibleRegistryEntry({
|
||||
id: "paraloncloud",
|
||||
alias: "paralon",
|
||||
baseUrl: "https://paraloncloud.com/v1/chat/completions",
|
||||
responsesBaseUrl: "https://paraloncloud.com/v1/responses",
|
||||
modelsUrl: "https://paraloncloud.com/v1/models",
|
||||
models: [
|
||||
{ id: "qwen3.8-27b", name: "Qwen3.8 27B" },
|
||||
{ id: "qwen3-3b", name: "Qwen3 3B" },
|
||||
{ id: "qwen3.8-27b", name: "Qwen3.8 27B", contextLength: 131072 },
|
||||
{ id: "qwen3-3b", name: "Qwen3 4B", contextLength: 32768 },
|
||||
],
|
||||
passthroughModels: true,
|
||||
});
|
||||
|
||||
@@ -167,7 +167,11 @@ export const APIKEY_PROVIDERS_INFERENCE = {
|
||||
icon: "cloud",
|
||||
color: "#2EE6A6",
|
||||
textIcon: "PC",
|
||||
passthroughModels: true,
|
||||
website: "https://paraloncloud.com",
|
||||
authHint: "Create an API key (prlc_…) in the ParalonCloud console, then paste it here.",
|
||||
apiHint:
|
||||
"OpenAI-compatible base URL: https://paraloncloud.com/v1. Prepaid credits, priced per token. The catalog follows the GPUs online on the network; check the live model list before selecting one.",
|
||||
notice: {
|
||||
apiKeyUrl: "https://paraloncloud.com/console",
|
||||
},
|
||||
|
||||
@@ -13,6 +13,8 @@ const { getEmbeddingProvider, getEmbeddingDimension, parseEmbeddingModel } =
|
||||
const { isNamedOpenAIStyleProvider } =
|
||||
await import("../../src/app/api/providers/[id]/models/discovery/providerSets.ts");
|
||||
const { DefaultExecutor, getExecutor } = await import("../../open-sse/executors/index.ts");
|
||||
const { isValidModel } = await import("../../src/shared/constants/models.ts");
|
||||
const { AGGREGATOR_PROVIDER_IDS } = await import("../../src/shared/constants/providers.ts");
|
||||
|
||||
const PARALON_API = "https://paraloncloud.com/v1";
|
||||
|
||||
@@ -73,3 +75,32 @@ test("paraloncloud resolves in the embedding registry", () => {
|
||||
model: "multilingual-e5-small",
|
||||
});
|
||||
});
|
||||
|
||||
// #16587 (robertjitaru): the ParalonCloud catalog follows the GPUs online on the network, so
|
||||
// any model id the live /v1/models list returns must be accepted (passthrough), and the
|
||||
// offline seed carries the context lengths the catalog reports.
|
||||
test("paraloncloud accepts any model the live catalog returns (passthrough)", () => {
|
||||
assert.equal(providerRegistry.paraloncloud.passthroughModels, true);
|
||||
assert.equal(APIKEY_PROVIDERS.paraloncloud.passthroughModels, true);
|
||||
assert.equal(isValidModel("paraloncloud", "future/live-catalog-model"), true);
|
||||
assert.equal(isValidModel("paralon", "future/live-catalog-model"), true);
|
||||
assert.match(APIKEY_PROVIDERS.paraloncloud.authHint, /prlc_/);
|
||||
assert.match(APIKEY_PROVIDERS.paraloncloud.apiHint, /live model list/);
|
||||
});
|
||||
|
||||
test("paraloncloud seeds carry context lengths and the Responses endpoint", () => {
|
||||
const entry = providerRegistry.paraloncloud;
|
||||
assert.equal(entry.responsesBaseUrl, `${PARALON_API}/responses`);
|
||||
assert.deepEqual(
|
||||
entry.models.map((m: { id: string; contextLength?: number }) => [m.id, m.contextLength]),
|
||||
[
|
||||
["qwen3.8-27b", 131072],
|
||||
["qwen3-3b", 32768],
|
||||
]
|
||||
);
|
||||
});
|
||||
|
||||
test("paraloncloud is not listed as an aggregator", () => {
|
||||
// It serves its own models on its own GPU network; it does not route to other APIs.
|
||||
assert.equal(AGGREGATOR_PROVIDER_IDS.has("paraloncloud"), false);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user