fix(stats): hide Union Alpha provider (#49356)
Co-authored-by: adamdotdevin <2363879+adamdotdevin@users.noreply.github.com>
This commit is contained in:
parent
2e018f70f2
commit
a6183af6f3
2 changed files with 25 additions and 3 deletions
|
|
@ -85,6 +85,20 @@ describe("inference stat normalization", () => {
|
|||
expect(toRetentionAggregate({ ...row, cohort_date: "2026-08-10", eligible_users: "12" })).toMatchObject([
|
||||
{ model: "omen-alpha", provider: "unknown", eligibleUsers: 12 },
|
||||
])
|
||||
;["opencode-go/union-alpha", "opencode/union-alpha"].forEach((model) => {
|
||||
expect(statModel(model, "")).toBe("union-alpha")
|
||||
expect(statProvider(model, "gpt-test-model", "test-provider")).toBe("unknown")
|
||||
|
||||
const row = { ...aggregate(model, "test-provider"), provider_model: "gpt-test-model" }
|
||||
expect(toModelAggregate(row)).toMatchObject([{ model: "union-alpha", provider: "unknown", requests: 1 }])
|
||||
expect(toProviderAggregate(row)).toMatchObject([{ provider: "unknown", requests: 1 }])
|
||||
expect(toGeoAggregate({ ...row, country: "US" })).toMatchObject([
|
||||
{ model: "union-alpha", provider: "unknown", country: "US", requests: 1 },
|
||||
])
|
||||
expect(toRetentionAggregate({ ...row, cohort_date: "2026-08-10", eligible_users: "12" })).toMatchObject([
|
||||
{ model: "union-alpha", provider: "unknown", eligibleUsers: 12 },
|
||||
])
|
||||
})
|
||||
})
|
||||
|
||||
test("merges renamed models under their current name", () => {
|
||||
|
|
@ -184,7 +198,9 @@ describe("inference stat normalization", () => {
|
|||
expect(queries).toHaveLength(8)
|
||||
queries.forEach((query) => {
|
||||
expect(query).toContain("WHERE lower(model) NOT IN ('alpha-gpt-next')")
|
||||
expect(query).toContain("CASE\n WHEN lower(model) IN ('omen-alpha') THEN 'unknown'\n")
|
||||
expect(query).toContain("CASE\n WHEN lower(model) IN ('omen-alpha', 'union-alpha') THEN 'unknown'\n")
|
||||
expect(query).toContain("= 'opencode-go/union-alpha' THEN 'union-alpha'")
|
||||
expect(query).toContain("= 'opencode/union-alpha' THEN 'union-alpha'")
|
||||
expect(query).toContain("= 'deepseek-flash' THEN 'deepseek-v4.1-flash'")
|
||||
})
|
||||
expect(queries[0]).toContain("'week' AS grain")
|
||||
|
|
@ -253,7 +269,11 @@ describe("inference stat normalization", () => {
|
|||
expect(queries.map((query) => query.cohortDates)).toEqual([["2026-08-10"], ["2026-08-17"]])
|
||||
expect(queries[0]?.query).toContain("AND product = 'go'")
|
||||
expect(queries[0]?.query).toContain("AND lower(model) NOT IN ('alpha-gpt-next')")
|
||||
expect(queries[0]?.query).toContain("CASE\n WHEN lower(model) IN ('omen-alpha') THEN 'unknown'\n")
|
||||
expect(queries[0]?.query).toContain(
|
||||
"CASE\n WHEN lower(model) IN ('omen-alpha', 'union-alpha') THEN 'unknown'\n",
|
||||
)
|
||||
expect(queries[0]?.query).toContain("= 'opencode-go/union-alpha' THEN 'union-alpha'")
|
||||
expect(queries[0]?.query).toContain("= 'opencode/union-alpha' THEN 'union-alpha'")
|
||||
expect(queries[0]?.query).toContain("COUNT(*) AS model_requests")
|
||||
expect(queries[0]?.query).toContain("SUM(model_requests) AS total_requests")
|
||||
expect(queries[0]?.query).toContain("MAX(model_requests) AS max_model_requests")
|
||||
|
|
|
|||
|
|
@ -14,13 +14,15 @@ export const MODEL_AUTHOR_RULES = [
|
|||
{ match: "qwen", author: "qwen" },
|
||||
] as const
|
||||
export const EXCLUDED_MODELS = new Set(["alpha-gpt-next"])
|
||||
export const STEALTH_MODELS = new Set(["omen-alpha"])
|
||||
export const STEALTH_MODELS = new Set(["omen-alpha", "union-alpha"])
|
||||
export const FREE_MODELS = new Set(["gpt-5-nano", "grok-code", "big-pickle"])
|
||||
export const MODEL_NAME_MAX_LENGTH = 256
|
||||
export const MODEL_NAME_ALIASES: Record<string, string> = {
|
||||
"deepseek-flash": "deepseek-v4.1-flash",
|
||||
"deepseek-v4-flash-0731": "deepseek-v4-flash",
|
||||
"deepseek-v4-flash-dsv4-flash-final-rnaovd": "deepseek-v4-flash",
|
||||
"opencode-go/union-alpha": "union-alpha",
|
||||
"opencode/union-alpha": "union-alpha",
|
||||
"ox-alpha": "glm-5.3-flash",
|
||||
"x-preview-f": "glm-5.3-flash",
|
||||
"xiaomi/mimo-v2.5": "mimo-v2.5",
|
||||
|
|
|
|||
Loading…
Reference in a new issue