Skip to content

feat(keys): key policies, per-key spend and prompt-cache prices - #24

Merged
coyl merged 2 commits into
release/v1.0.0from
feat/key-policy-ui
Oct 23, 2026
Merged

coyl merged 2 commits into
release/v1.0.0from
feat/key-policy-ui

Conversation

@coyl

@coyl coyl commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Console side of ai-process/docs#78 (KTMS #94–#96).

  • Proto synced from KTMS release/v1.0.0 (APIKeyPolicy, SetAPIKeyPolicy, GetSpend, cache prices, TokensUsage.cache_*).
  • PUT /api/proxy/keys/{name}/policy (admins; team leads for their team's keys) and GET /api/proxy/spend (global readers; team users for their team and its keys). Key ownership check shared with revoke.
  • Keys page: policy column (models, rpm, tpm), Policy dialog (allowed models picked from the gateway's models or the team's list, rates), rates in the mint wizard, spend shown against each cap.
  • Model editor: cached-input and cache-write prices, prompt_cache capability.
  • e2e: sets a key policy and reads the key's spend; scripts/e2e.refs now points at the 1.0 release branches (tags once they exist). Passes locally against KTMS and light-tokenmeter release/v1.0.0.
  • Tests: access rules for policy and spend.

coyl added 2 commits October 23, 2026 18:00
The Keys page shows each key's policy and its spend against its caps, edits
the policy in a dialog and sets rates when minting; team leads do it for their
team's keys only. The model editor takes cache read and write prices and the
prompt_cache capability. Proto synced from KTMS; the e2e test covers policy
and spend and runs against the 1.0 release branches.
…the team

GET /api/proxy/key-spend reads every visible active key's spend at most
eight at a time, with caps from GetSpend, so wildcard caps show and team
leads see their keys' spend; an unreadable key says unknown. The policy
dialog offers the team's allowed models when it has a list, else the
gateway's, else a text field.
@coyl
coyl merged commit fd0bd0d into release/v1.0.0 Oct 23, 2026
3 checks passed
@coyl
coyl deleted the feat/key-policy-ui branch October 23, 2026 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant