Add model display names to hide real model IDs in public shares - #1097
Add model display names to hide real model IDs in public shares#1097charlesyhuang wants to merge 7 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Adds a "Model names" admin pane where operators map a stored model id to the name public share pages show. The alias is applied at the public serialization boundary only -- the authenticated dashboard, cost accounting and queue routing keep reading the real model id. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Risk: medium. Left a non-blocking comment — Cursor Bugbot reported an unresolved high-severity finding (public shares can 500 pre-migration), and the Bugbot check completed as skipping, so this is not approved. Human review is needed; reviewers are already assigned.
Sent by Cursor Approval Agent: Pull Request Router and Approver
main advanced past the original base, leaving two alembic heads. Re-point down_revision at trajgraph_002 so the tree stays linear. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
ed92c83 to
bd13a55
Compare
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
1 issue from previous review remains unresolved.
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit bd13a55. Configure here.
Two Bugbot findings. load_model_display_names now reads inside a savepoint and degrades to real model ids when model_display_names does not exist yet, so the deploy-before-migrate window no longer 500s published share pages; any other SQL fault still surfaces. Writers canonicalize model_name so the case-sensitive live UNIQUE index cannot hold two rows that the case-insensitive public lookup would disagree about. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
bugbot run |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 62666cb. Configure here.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using high effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 28e4c53. Configure here.
Oddish previewCommit:
Vercel deployment URL: https://oddish-4fnufzulr.oddish.app Plan:
This comment is updated by the PR Preview workflow. |
Staging landed trial_facets_001 on the same parent (trajgraph_002), so merging staging forked the alembic tree into two heads. That broke the Migration Head Guard and, downstream, the preview bootstrap, which runs `alembic upgrade head` and aborts on an ambiguous head. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>



Adds a new "Model names" admin panel for operators to map stored model IDs to presentation names. Public share pages render the presentation name instead of the real model ID, while internal authenticated views and cost calculations continue to use the real ID unchanged.
🤖 Generated with Claude Code
Note
Medium Risk
Changes what anonymous share viewers see for model identifiers and adds operator-only admin mutations, but aliases are applied only after pricing and are designed to fail open if the table is missing.
Overview
Introduces operator-managed model display names so published share pages can show a friendly label instead of the real model id, while internal views, cost accounting, and queue routing keep the stored id.
A new
model_display_namestable (soft-delete, one live row per canonical model key) backs a FastAPI admin router at/admin/model-display-names(operator org + org admin to mutate). Writes canonicalize model keys; missing schema during deploy returns 503 on admin and degrades to real ids on public reads.Public share paths load aliases and run
apply_model_display_nameson already-builtTrialResponseobjects (after cost resolution), rewritingmodeland matchingqueue_keysegments. Org-scoped trial lists are unchanged.The admin UI gains an operator-only Model Names tab with list/add/edit/remove, proxied through Next.js API routes. Tests cover alias behavior, cost invariance, canonical keys, and deploy-before-migrate safety.
Reviewed by Cursor Bugbot for commit 33e65aa. Bugbot is set up for automated code reviews on this repo. Configure here.