latestOpenAPI 3.1.0raw.githubusercontent.com2026-08-14129143297.4 KB

0e52fe5f8d33

admin

Update User Llm Config

Set the per-user LLM override.

Pass an empty string in either field to clear that part of the override and fall back to the global default. Pass null (omit) to leave the field unchanged.

Deliberately has no self-action guard. Every other user-targeted mutation endpoint (plan, activate, deactivate, reset-quota, delete, compact-now, hygiene-compact-memory) still rejects a self-targeted call. For the plan / activate / deactivate / reset-quota / delete set that guard stops an admin escalating their own account: raising their own quota, upgrading their own plan, locking themselves out. Which model an admin's own agent talks to is a personal preference with no privilege attached, and blocking it stops the most common legitimate use (an admin trying a model on their own account before rolling it out). audit_admin still resolves get_current_admin, so the role check and the audit record are unaffected.

put/api/admin/users/{user_id}/llm-config

Path parameters

user_idstring required

Request body

llm_provider_overridestring nullable
llm_model_overridestring nullable

Response

Successful Response

user_idstring required
llm_provider_overridestring required
llm_model_overridestring required
effective_llm_providerstring required
effective_llm_modelstring required