Phases 129-130: admin model allow-lists and BYOK#118
Merged
Conversation
Add gitsema admin models list|allow|deny|reset for superadmin control over which embedding profiles and narrator/guide configs are usable, server-wide or per-org (Phase 129). Add request-scoped BYOK credentials to narrate/explain/guide across CLI, HTTP, and MCP that bypass the allow-list entirely and are never persisted (Phase 130). Co-Authored-By: Claude Sonnet 4.6 <[email protected]> Claude-Session: https://claude.ai/code/session_01MDWd8BkGMSwZiMeDBVfvk8
Extract parseByokCliOpts/addByokOptions into src/cli/lib/byok.ts, shared by narrate.ts/explain and guide.ts (was triplicated). Collapse modelPolicy.ts's near-duplicate allowServer/denyServer/allowOrg/denyOrg into shared applyAllow/applyDeny helpers, preserving all existing exported signatures. Logs two lower-value findings (pinned-profile exemption placement, BYOK body-shape normalization) to feature-ideas.md per the simplify-pass policy.
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
gitsema admin models list|allow|deny|reset --kind <embedding|narrator|guide> [--org <name>]— superadmin-gated allow-lists for which embedding profiles / narrator / guide model configs are enabled, server-wide and per-org (org policy can only narrow, never widen past server-wide).--byok-http-url/--byok-api-key/--byok-model/--byok-max-tokens/--byok-temperatureon CLI, equivalent fields on HTTP/MCP) fornarrate/explain/guide— bypass the configured/allow-listed model entirely, never persisted.src/cli/lib/byok.ts(was triplicated acrossnarrate.ts/guide.ts), and collapsedmodelPolicy.ts's near-duplicate allow/deny functions into shared helpers, preserving all existing public signatures.Test plan
pnpm build— cleanpnpm test— full suite green (117 files / 1359 tests passed, 22 skipped)docs/features.md,docs/PLAN.md,docs/parity.md, changeset added (.changeset/admin-locked-models-byok.md)Generated by Claude Code