mirror of
https://github.com/diegosouzapw/OmniRoute.git
synced 2026-08-07 15:52:52 +03:00
When looking up models_dev_tier or capability scores for -free alias models (e.g. deepseek-v4-flash-free), strip the -free suffix to query the underlying model's intelligence data if direct lookup yields null. Co-authored-by: Austin Liu <austinliu@Austins-MacBook-Air-3.local> Co-authored-by: diegosouzapw <diegosouzapw@users.noreply.github.com>
This commit is contained in:
24
tests/unit/autoCombo/free-alias-intelligence-8601.test.ts
Normal file
24
tests/unit/autoCombo/free-alias-intelligence-8601.test.ts
Normal file
@@ -0,0 +1,24 @@
|
||||
import { describe, it, expect } from "vitest";
|
||||
import {
|
||||
getModelsDevTierFitness,
|
||||
getTaskFitnessWithSource,
|
||||
} from "../../../open-sse/services/autoCombo/taskFitness.js";
|
||||
|
||||
describe("models_dev_tier free-alias fallback (#8601)", () => {
|
||||
it("should return fitness score for -free alias from models_dev_tier DB or capabilities fallback", () => {
|
||||
// Standard model without free suffix should match or resolve
|
||||
const baseScore = getModelsDevTierFitness("deepseek-v4-flash", "coding");
|
||||
const freeScore = getModelsDevTierFitness("deepseek-v4-flash-free", "coding");
|
||||
|
||||
// If baseScore is resolved (or capability fallback works), freeScore should match baseScore
|
||||
if (baseScore !== null) {
|
||||
expect(freeScore).toBe(baseScore);
|
||||
}
|
||||
});
|
||||
|
||||
it("getTaskFitnessWithSource should fall back for models_dev_tier / arena_elo on -free models", () => {
|
||||
const res = getTaskFitnessWithSource("deepseek-v4-flash-free", "coding");
|
||||
expect(res).not.toBeNull();
|
||||
expect(typeof res.score).toBe("number");
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user