GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(stats): hide Union Alpha provider (#49356) · jtrag/opencode@a6183af

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • packages/stats/core/src/domain
    • inference.test.ts
    • model-normalization.ts
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎packages/stats/core/src/domain/inference.test.ts‎

Copy file name to clipboardExpand all lines: packages/stats/core/src/domain/inference.test.ts
+22-2Lines changed: 22 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,20 @@ describe("inference stat normalization", () => {
8585
expect(toRetentionAggregate({ ...row, cohort_date: "2026-08-10", eligible_users: "12" })).toMatchObject([
8686
{ model: "omen-alpha", provider: "unknown", eligibleUsers: 12 },
8787
])
88+
;["opencode-go/union-alpha", "opencode/union-alpha"].forEach((model) => {
89+
expect(statModel(model, "")).toBe("union-alpha")
90+
expect(statProvider(model, "gpt-test-model", "test-provider")).toBe("unknown")
91+
92+
const row = { ...aggregate(model, "test-provider"), provider_model: "gpt-test-model" }
93+
expect(toModelAggregate(row)).toMatchObject([{ model: "union-alpha", provider: "unknown", requests: 1 }])
94+
expect(toProviderAggregate(row)).toMatchObject([{ provider: "unknown", requests: 1 }])
95+
expect(toGeoAggregate({ ...row, country: "US" })).toMatchObject([
96+
{ model: "union-alpha", provider: "unknown", country: "US", requests: 1 },
97+
])
98+
expect(toRetentionAggregate({ ...row, cohort_date: "2026-08-10", eligible_users: "12" })).toMatchObject([
99+
{ model: "union-alpha", provider: "unknown", eligibleUsers: 12 },
100+
])
101+
})
88102
})
89103

90104
test("merges renamed models under their current name", () => {
@@ -184,7 +198,9 @@ describe("inference stat normalization", () => {
184198
expect(queries).toHaveLength(8)
185199
queries.forEach((query) => {
186200
expect(query).toContain("WHERE lower(model) NOT IN ('alpha-gpt-next')")
187-
expect(query).toContain("CASE\n WHEN lower(model) IN ('omen-alpha') THEN 'unknown'\n")
201+
expect(query).toContain("CASE\n WHEN lower(model) IN ('omen-alpha', 'union-alpha') THEN 'unknown'\n")
202+
expect(query).toContain("= 'opencode-go/union-alpha' THEN 'union-alpha'")
203+
expect(query).toContain("= 'opencode/union-alpha' THEN 'union-alpha'")
188204
expect(query).toContain("= 'deepseek-flash' THEN 'deepseek-v4.1-flash'")
189205
})
190206
expect(queries[0]).toContain("'week' AS grain")
@@ -253,7 +269,11 @@ describe("inference stat normalization", () => {
253269
expect(queries.map((query) => query.cohortDates)).toEqual([["2026-08-10"], ["2026-08-17"]])
254270
expect(queries[0]?.query).toContain("AND product = 'go'")
255271
expect(queries[0]?.query).toContain("AND lower(model) NOT IN ('alpha-gpt-next')")
256-
expect(queries[0]?.query).toContain("CASE\n WHEN lower(model) IN ('omen-alpha') THEN 'unknown'\n")
272+
expect(queries[0]?.query).toContain(
273+
"CASE\n WHEN lower(model) IN ('omen-alpha', 'union-alpha') THEN 'unknown'\n",
274+
)
275+
expect(queries[0]?.query).toContain("= 'opencode-go/union-alpha' THEN 'union-alpha'")
276+
expect(queries[0]?.query).toContain("= 'opencode/union-alpha' THEN 'union-alpha'")
257277
expect(queries[0]?.query).toContain("COUNT(*) AS model_requests")
258278
expect(queries[0]?.query).toContain("SUM(model_requests) AS total_requests")
259279
expect(queries[0]?.query).toContain("MAX(model_requests) AS max_model_requests")
Collapse file

‎packages/stats/core/src/domain/model-normalization.ts‎

Copy file name to clipboardExpand all lines: packages/stats/core/src/domain/model-normalization.ts
+3-1Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,15 @@ export const MODEL_AUTHOR_RULES = [
1414
{ match: "qwen", author: "qwen" },
1515
] as const
1616
export const EXCLUDED_MODELS = new Set(["alpha-gpt-next"])
17-
export const STEALTH_MODELS = new Set(["omen-alpha"])
17+
export const STEALTH_MODELS = new Set(["omen-alpha", "union-alpha"])
1818
export const FREE_MODELS = new Set(["gpt-5-nano", "grok-code", "big-pickle"])
1919
export const MODEL_NAME_MAX_LENGTH = 256
2020
export const MODEL_NAME_ALIASES: Record<string, string> = {
2121
"deepseek-flash": "deepseek-v4.1-flash",
2222
"deepseek-v4-flash-0731": "deepseek-v4-flash",
2323
"deepseek-v4-flash-dsv4-flash-final-rnaovd": "deepseek-v4-flash",
24+
"opencode-go/union-alpha": "union-alpha",
25+
"opencode/union-alpha": "union-alpha",
2426
"ox-alpha": "glm-5.3-flash",
2527
"x-preview-f": "glm-5.3-flash",
2628
"xiaomi/mimo-v2.5": "mimo-v2.5",

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.