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(data): keep custom models out of free-tier stats by adamdotdevin · Pull Request #64894 · anomalyco/opencode

Conversation

@adamdotdevin

@adamdotdevin adamdotdevin commented Nov 19, 2026

Copy link
Copy Markdown
Member

Issue for this PR

Closes #

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

The data sync counts a request as Free when its tier is free or its model name ends in -free, without checking the product. BYOK (product = 'custom') requests use the caller's own model names, so names like deepseek-v4.1-flash-abliterated-free passed the check. The sync then stripped -free, which produced a public deepseek-v4.1-flash-abliterated page on opencode.ai/data. About 45k custom requests with -free names (e.g. deepseek-v4.1-flash-free, glm-5.3-flash-free) were also being counted in the Free numbers for real models.

The free branch now skips custom requests. It uses COALESCE(product, ''), so legacy rows with no product keep matching as before. Go rows are unchanged.

Rows the sync already wrote for custom-only names stay in the stats DB, because the sync upserts and doesn't delete missing models. They need a one-off delete after this ships. Shared rows correct themselves as their periods resync.

How did you verify your code works?

  • bun test src/domain/inference.test.ts in packages/data/core: 22 pass. The query-text assertion now requires the custom exclusion.
  • Ran the generated WHERE clause in SQLite against sample custom, standard and go rows: custom -free rows are dropped, and standard/free and go rows are kept.

Screenshots / recordings

n/a

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adamdotdevin
fix(data): keep custom models out of free-tier stats
42d36fc
@adamdotdevin
adamdotdevin requested a review from rekram1-node November 19, 2026 15:13
opencodejr[bot]
opencodejr Bot reviewed Nov 19, 2026
View reviewed changes

@opencodejr opencodejr Bot left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks correct. I ran the old and new filter in SQLite against sample rows. On the base, custom rows whose model name ends in -free or whose tier is free get through the Free filter. With this change they are dropped, while Zen free rows, legacy rows with no product (the COALESCE case) and Go rows are still kept. inference.test.ts passes (22) and tsc --noEmit is clean. The retention query only reads Go products, so it isn't affected.

Public API: unchanged (internal stats sync query only).

No blocking concerns. As the description says, the rows already written for custom-only names will still need the one-off delete after this ships.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@adamdotdevin
adamdotdevin merged commit d9463aa into dev Nov 19, 2026
11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@adamdotdevin
adamdotdevin deleted the data-hide-custom branch November 19, 2026 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@opencodejr opencodejr[bot] opencodejr[bot] left review comments
@rekram1-node rekram1-node Awaiting requested review from rekram1-node

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@adamdotdevin
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — 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.