mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-21 22:52:19 +03:00
provider(agnes): refresh chat catalog to 2026.07.30 (openai chat/completions, 1.5/2.0/2.5-flash) (#10942)
Validado no worktree combinado: typecheck:core, changelog-integrity, complexity, cognitive-complexity, file-size, lint e teste focado (agnes-provider, 11/11) todos verdes. Atualização de catálogo/dados alinhada à documentação oficial vigente. CI vermelho é o base-red já rastreado em #9985. Obrigado!
This commit is contained in:
@@ -439,7 +439,8 @@ export const FREE_MODEL_BUDGETS: FreeModelBudget[] = [
|
||||
{ provider: "ovhcloud", modelId: "Qwen3.6-27B", displayName: "Qwen3.6 27B (OVH anonymous)", monthlyTokens: 0, creditTokens: 0, freeType: "keyless", poolKey: "ovhcloud-anon", tos: "ok" },
|
||||
{ provider: "ovhcloud", modelId: "Mistral-Small-3.2-24B-Instruct-2506", displayName: "Mistral Small 3.2 24B (OVH anonymous)", monthlyTokens: 0, creditTokens: 0, freeType: "keyless", poolKey: "ovhcloud-anon", tos: "ok" },
|
||||
{ provider: "ovhcloud", modelId: "Qwen2.5-VL-72B-Instruct", displayName: "Qwen2.5 VL 72B (OVH anonymous)", monthlyTokens: 0, creditTokens: 0, freeType: "keyless", poolKey: "ovhcloud-anon", tos: "ok" },
|
||||
{ provider: "agnes", modelId: "agnes-2.5-pro", displayName: "Agnes 2.5 Pro", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-uncapped", poolKey: "agnes-free", tos: "ok" },
|
||||
{ provider: "agnes", modelId: "agnes-1.5-flash", displayName: "Agnes 1.5 Flash", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-uncapped", poolKey: "agnes-free", tos: "ok" },
|
||||
{ provider: "agnes", modelId: "agnes-2.0-flash", displayName: "Agnes 2.0 Flash", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-uncapped", poolKey: "agnes-free", tos: "ok" },
|
||||
{ provider: "agnes", modelId: "agnes-2.5-flash", displayName: "Agnes 2.5 Flash", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-uncapped", poolKey: "agnes-free", tos: "ok" },
|
||||
{ provider: "glm", modelId: "glm-4.7-flash", displayName: "GLM-4.7-Flash", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-uncapped", poolKey: "zhipu-flash-free", tos: "ok" },
|
||||
{ provider: "glm", modelId: "glm-4.5-flash", displayName: "GLM-4.5-Flash", monthlyTokens: 0, creditTokens: 0, freeType: "recurring-uncapped", poolKey: "zhipu-flash-free", tos: "ok" },
|
||||
|
||||
@@ -2,21 +2,28 @@ import type { RegistryEntry } from "../../shared.ts";
|
||||
|
||||
export const agnesProvider: RegistryEntry = {
|
||||
id: "agnes",
|
||||
format: "openai-responses",
|
||||
format: "openai",
|
||||
executor: "default",
|
||||
baseUrl: "https://apihub.agnes-ai.com/v1/responses",
|
||||
baseUrl: "https://apihub.agnes-ai.com/v1/chat/completions",
|
||||
authType: "apikey",
|
||||
authHeader: "bearer",
|
||||
models: [
|
||||
{
|
||||
id: "agnes-2.5-pro",
|
||||
name: "Agnes 2.5 Pro",
|
||||
contextLength: 1048576,
|
||||
id: "agnes-1.5-flash",
|
||||
name: "Agnes 1.5 Flash",
|
||||
contextLength: 262144,
|
||||
maxOutputTokens: 65536,
|
||||
supportsVision: true,
|
||||
toolCalling: true,
|
||||
},
|
||||
{
|
||||
id: "agnes-2.0-flash",
|
||||
name: "Agnes 2.0 Flash",
|
||||
contextLength: 262144,
|
||||
maxOutputTokens: 65536,
|
||||
supportsReasoning: true,
|
||||
supportsVision: true,
|
||||
toolCalling: true,
|
||||
interleavedField: "reasoning_content",
|
||||
},
|
||||
{
|
||||
id: "agnes-2.5-flash",
|
||||
|
||||
@@ -27,7 +27,7 @@ test.after(() => {
|
||||
fs.rmSync(TEST_DATA_DIR, { recursive: true, force: true });
|
||||
});
|
||||
|
||||
const AGNES_RESPONSES_URL = "https://apihub.agnes-ai.com/v1/responses";
|
||||
const AGNES_CHAT_URL = "https://apihub.agnes-ai.com/v1/chat/completions";
|
||||
|
||||
test("agnes is registered as an API-key provider with complete metadata", () => {
|
||||
const entry = APIKEY_PROVIDERS.agnes;
|
||||
@@ -44,31 +44,31 @@ test("agnes is registered as an API-key provider with complete metadata", () =>
|
||||
assert.ok(entry.authHint, "authHint must be defined");
|
||||
});
|
||||
|
||||
test("agnes registry entry uses Responses format with bearer API-key auth", () => {
|
||||
test("agnes registry entry uses OpenAI Chat Completions format with bearer API-key auth", () => {
|
||||
const entry = providerRegistry.agnes;
|
||||
assert.ok(entry, "providerRegistry.agnes must be defined");
|
||||
assert.equal(entry.id, "agnes");
|
||||
assert.equal(entry.format, "openai-responses");
|
||||
assert.equal(entry.format, "openai");
|
||||
assert.equal(entry.executor, "default");
|
||||
assert.equal(entry.authType, "apikey");
|
||||
assert.equal(entry.authHeader, "bearer");
|
||||
assert.equal(entry.baseUrl, AGNES_RESPONSES_URL);
|
||||
assert.equal(entry.baseUrl, AGNES_CHAT_URL);
|
||||
});
|
||||
|
||||
test("agnes routes Chat Completions clients through its Responses upstream", () => {
|
||||
test("agnes routes Chat Completions clients through its OpenAI chat upstream", () => {
|
||||
const { targetFormat } = resolveChatCoreTargetFormat({
|
||||
provider: "agnes",
|
||||
resolvedModel: "agnes-2.5-pro",
|
||||
resolvedModel: "agnes-2.5-flash",
|
||||
apiFormat: undefined,
|
||||
sourceFormat: "openai",
|
||||
customModelTargetFormat: undefined,
|
||||
providerSpecificData: null,
|
||||
});
|
||||
|
||||
assert.equal(targetFormat, "openai-responses");
|
||||
assert.equal(targetFormat, "openai");
|
||||
assert.equal(
|
||||
new DefaultExecutor("agnes").buildUrl("agnes-2.5-pro", true, 0, null),
|
||||
AGNES_RESPONSES_URL
|
||||
new DefaultExecutor("agnes").buildUrl("agnes-2.5-flash", true, 0, null),
|
||||
AGNES_CHAT_URL
|
||||
);
|
||||
});
|
||||
|
||||
@@ -76,33 +76,34 @@ test("agnes ships the current public chat models with correct capabilities", ()
|
||||
const entry = providerRegistry.agnes;
|
||||
assert.deepEqual(
|
||||
entry.models.map((model) => model.id),
|
||||
["agnes-2.5-pro", "agnes-2.5-flash"]
|
||||
["agnes-1.5-flash", "agnes-2.0-flash", "agnes-2.5-flash"]
|
||||
);
|
||||
|
||||
const flash15 = entry.models.find((m) => m.id === "agnes-1.5-flash");
|
||||
assert.ok(flash15, "agnes-1.5-flash must be defined");
|
||||
assert.equal(flash15.contextLength, 262144);
|
||||
assert.equal(flash15.maxOutputTokens, 65536);
|
||||
assert.equal(flash15.supportsVision, true);
|
||||
assert.equal(flash15.toolCalling, true);
|
||||
|
||||
const flash20 = entry.models.find((m) => m.id === "agnes-2.0-flash");
|
||||
assert.ok(flash20, "agnes-2.0-flash must be defined");
|
||||
assert.equal(flash20.contextLength, 262144);
|
||||
assert.equal(flash20.maxOutputTokens, 65536);
|
||||
assert.equal(flash20.supportsReasoning, true);
|
||||
assert.equal(flash20.supportsVision, true);
|
||||
assert.equal(flash20.toolCalling, true);
|
||||
|
||||
const flash25 = entry.models.find((m) => m.id === "agnes-2.5-flash");
|
||||
assert.ok(flash25, "agnes-2.5-flash must be defined");
|
||||
assert.equal(flash25.contextLength, 524288);
|
||||
assert.equal(flash25.maxOutputTokens, 65536);
|
||||
assert.equal(flash25.supportsReasoning, true);
|
||||
assert.equal(flash25.supportsVision, true);
|
||||
assert.equal(flash25.toolCalling, true);
|
||||
assert.equal(flash25.interleavedField, "reasoning_content");
|
||||
|
||||
const pro25 = entry.models.find((model) => model.id === "agnes-2.5-pro");
|
||||
assert.ok(pro25, "agnes-2.5-pro must be defined");
|
||||
assert.equal(pro25.contextLength, 1048576);
|
||||
assert.equal(pro25.maxOutputTokens, 65536);
|
||||
assert.equal(pro25.supportsReasoning, true);
|
||||
assert.equal(pro25.supportsVision, true);
|
||||
assert.equal(pro25.toolCalling, true);
|
||||
assert.equal(pro25.interleavedField, "reasoning_content");
|
||||
});
|
||||
|
||||
test("agnes free catalog exposes the current free chat models through one shared pool", () => {
|
||||
const rows = FREE_MODEL_BUDGETS.filter((model) => model.provider === "agnes");
|
||||
assert.deepEqual(
|
||||
rows.map((model) => model.modelId),
|
||||
["agnes-2.5-pro", "agnes-2.5-flash"]
|
||||
["agnes-1.5-flash", "agnes-2.0-flash", "agnes-2.5-flash"]
|
||||
);
|
||||
assert.ok(rows.every((model) => model.poolKey === "agnes-free"));
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user