feat: admin UI for assigning custom writing model to premium users #110

Open
opened 2026-04-25 06:19:06 -07:00 by pyr0ball · 0 comments
Owner

Premium users can have a personal fine-tuned writing model routed via cf-orch. Currently provisioning is fully manual (env var on server). This needs a managed path when multiple premium customers have personal models.

Required pieces

1. Heimdall: expose user_preferences in resolve response.
POST /admin/cloud/resolve already has a user_preferences JSON column on license_keys -- just needs to return it. The cf-core _resolve_tier forward-merges unknown fields into session.meta so session.meta["custom_writing_model"] will work automatically once returned.

2. Heimdall: PATCH /admin/keys/{key_id}/preferences endpoint.
Idempotent merge into the user_preferences JSON column. Admin bearer token required.

3. Admin UI (internal, not public).
A page in /account/admin/ with user lookup (email or UUID), product selector, model name input, Save button calling the Heimdall endpoint.

4. Drop the env var path once Heimdall is updated.
Remove USER_WRITING_MODELS from the peregrine backend .env and the parsing code in cloud_session.py.

Current workaround

  • USER_WRITING_MODELS env var on the peregrine backend bridges the gap
  • user_preferences on Megs founders key is already set (non-breaking upgrade path)
  • See peregrine/resume_matcher/apps/backend/app/cloud_session.py for resolution order

Out of scope for now

  • Auto-triggering from avocet when fine-tune completes
  • Per-model VRAM quota tracking
  • Customer-facing model status UI
Premium users can have a personal fine-tuned writing model routed via cf-orch. Currently provisioning is fully manual (env var on server). This needs a managed path when multiple premium customers have personal models. ## Required pieces **1. Heimdall: expose user_preferences in resolve response.** POST /admin/cloud/resolve already has a user_preferences JSON column on license_keys -- just needs to return it. The cf-core _resolve_tier forward-merges unknown fields into session.meta so session.meta["custom_writing_model"] will work automatically once returned. **2. Heimdall: PATCH /admin/keys/{key_id}/preferences endpoint.** Idempotent merge into the user_preferences JSON column. Admin bearer token required. **3. Admin UI (internal, not public).** A page in /account/admin/ with user lookup (email or UUID), product selector, model name input, Save button calling the Heimdall endpoint. **4. Drop the env var path once Heimdall is updated.** Remove USER_WRITING_MODELS from the peregrine backend .env and the parsing code in cloud_session.py. ## Current workaround - USER_WRITING_MODELS env var on the peregrine backend bridges the gap - user_preferences on Megs founders key is already set (non-breaking upgrade path) - See peregrine/resume_matcher/apps/backend/app/cloud_session.py for resolution order ## Out of scope for now - Auto-triggering from avocet when fine-tune completes - Per-model VRAM quota tracking - Customer-facing model status UI
pyr0ball added this to the Fine-tuned Models milestone 2026-05-13 11:21:54 -07:00
pyr0ball added the
feature-request
frontend
backlog
labels 2026-05-13 11:22:08 -07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: Circuit-Forge/peregrine#110
No description provided.