#5476·OpenViking

[Feature Request]: Manage account-level VLM / Query Planner configuration in Web Studio

Author: chung1912Created Sep 29, 2026Updated Sep 30, 2026
Labelsstudio

Issue Origin

Observed or reproduced in a real environment

Prior Art

I searched the tracker before filing. Two existing requests overlap, and this request is deliberately narrower than both.

Prior request State What it asked for Why this request is different
#5089 — support different embeddings and VLMs for different accounts Open; a maintainer replied that this would be supported, and the kernel/API half landed in #5323 Per-account model isolation at the kernel and API layer That layer now exists. AccountConfig carries vlm, query_planner, embedding and vectordb, and there is a runtime endpoint for it. This request asks for no new kernel behavior — only the missing Studio surface on top of the API that already ships.
#5044 — support managing and configuring model endpoints (VLM / Query Planner) in Web Studio UI Open, label studio, no comments A Studio page over model settings, on the premise that the only path was editing ov.conf and running docker restart openviking; it also proposed new endpoints (GET/PUT /api/v1/admin/config/models) The configuration API it proposed already exists and is hot-reloaded, and its premise no longer holds. More importantly, its target layer is not writable at runtime: Cluster vlm, query_planner, embedding, storage, parser and retrieval fields are startup-only (they are not declared as runtime fields), so a Cluster model form cannot be expressed through the runtime API. This request is scoped to the Account layer, which is the layer the runtime API can actually read and write.

If the maintainers judge this should be folded into #5044 instead of tracked separately, I am happy to move it there — please say so and I will not keep this open.

Problem Statement

OpenViking Server serves Web Studio at /studio, and Studio is already the main operational surface for Users, Groups, API Keys, resource ACL, per-user memory policy, Agent Experience and monitoring. Account-level model configuration is the one administrative area that has no UI at all.

Source-level evidence, read at 1f4f7039f (static inspection of the repository; not end-to-end reproduced against a running server):

  1. Studio navigation has no entry for it. web-studio/src/components/app-shell.tsx declares NAV_SECTIONS as workspace and operations, plus a settings group whose only items are "Connection" (/settings) and "Users" (/users). There is no Models / Account Configuration route.
  2. /settings is not it. web-studio/src/routes/settings/route.tsx is connection and identity only (server URL, API key, account/user identity, cross-device verify). It never touches a configuration endpoint.
  3. /users is not it either. web-studio/src/routes/users/route.tsx exposes exactly three tabs — users, groups, permissions (ACL).
  4. The only place Studio touches /api/v1/admin/accounts/{account_id}/configuration is ACL. web-studio/src/lib/resource-acl.ts reads and writes settings.acl.enabled only; it never reads or writes vlm / query_planner.
  5. The server side already supports what is missing in the UI. openviking/server/routers/admin.py exposes GET and PATCH /api/v1/admin/accounts/{account_id}/configuration, and openviking/config/account_config.py defines AccountVLMConfig with model, credentials and timeout.

So today, rotating an Account VLM API key, switching an Account to a different endpoint, or pointing one Account at a lower-latency Query Planner model means leaving Studio and hand-crafting an HTTP PATCH. That is worse than it sounds, for three concrete reasons:

  • There is no CLI or SDK substitute. ov --sudo admin set-account-settings only takes --acl-enabled. docs/en/api/08-admin.md states plainly that the Python SDK, the CLI and the other SDK Account-creation wrappers do not expose a settings argument and that the HTTP API must be used for this capability. A curl command is therefore the only path, which means an API key gets typed into a shell or a commit-pasted snippet.
  • The payload is easy to get silently wrong. Credential arrays replace wholesale rather than merging by id; vlm and query_planner have different precedence rules against Cluster configuration; and a null leaf means "delete this Account override", not "keep it unchanged". None of that is discoverable without reading the reference.
  • "Read" is misleading without the UI knowing the difference. The GET endpoints return only values explicitly persisted at the Account layer. They do not expand Cluster values or business-resolved defaults. An Account with no vlm section legitimately returns no vlm key while actually using the Cluster VLM at runtime. A raw JSON response gives an operator no way to tell "not configured" from "configured to empty".

This is also inconsistent inside Studio itself: ACL and per-user memory policy are both Account-scoped settings that already have UI, so the model settings end up as the only Account-scoped settings you cannot click.

Proposed Solution

Add an Account model-configuration surface to Studio, backed by the existing endpoints — no new server API is required.

1. Entry point and role gating

  • A new page under the settings group, e.g. /settings/models, or an additional tab on the existing account management page.
  • Studio already computes a ROOT capability flag (resolveStudioManagementCapabilities → canManageAccounts, gated on the control credential plus the observed role), and the server already enforces the same boundary with _ROOT_ONLY_ACCOUNT_CONFIG_SECTIONS = {vlm, query_planner, embedding, vectordb}. Reuse that flag to hide the page for non-ROOT identities, and render the server's 403 PERMISSION_DENIED as an explicit "ROOT only" state rather than a generic error, so an ADMIN is not left guessing.
  • Studio is account-scoped through its account switcher, so the page should always target the currently selected Account and make that explicit.

2. What the page shows and edits

  • vlm and query_planner, each with model, an ordered credentials list, and an optional timeout.
  • Per credential: provider (restricted to the validated provider set), model, api_base, api_key, api_version, extra_headers, extra_request_body, reasoning_effort, max_tokens, keepalive_expiry, forward_api_key.
  • Per section, show whether it is explicit for this Account or inherited from Cluster, derived from whether the key is present in the GET response, and say which one is in effect. Do not render an absent section as an empty form that silently implies "no model".
  • Because vlm and query_planner credential arrays replace wholesale, edits should be submitted as a whole array from the form rather than a per-item PATCH.
  • Query Planner precedence (Account query_planner → Account vlm → Cluster query_planner → Cluster vlm) is worth a one-line inline hint, or operators will set vlm and wonder why the planner behavior did not change.

3. Handling credentials

  • The configuration GET returns credentials verbatim; there is no masking anywhere in the config layer. Mask api_key by default in the form and require an explicit reveal or replace action, and never write a masked placeholder back as the stored value.
  • Provide a "reset to Cluster" action per section, which is a null at the section path — and label it as "inherit from Cluster", not "clear", since the Account keeps working afterwards.

4. Validation

  • Validate the payload against the documented contract before submitting (non-empty model, non-empty credentials, valid credentials[].provider, timeout > 0) and surface 400 INVALID_ARGUMENT messages inline, since a rejected PATCH persists nothing and currently only shows up as a raw API error.
  • A "test connection" button is a nice-to-have but is not part of this request; the existing API validates schema and completeness, and deliberately does not probe remote endpoints. If such a button is wanted later, it needs a server-side endpoint first, because a browser-side probe would hit CORS and would leak the credential.

Alternatives Considered

  • Do nothing and keep using curl. This is the status quo, and it is what the issue is about. It is workable for a single operator rotating a key occasionally, and it is what I do today.
  • Add the missing CLI and SDK support instead. Also worth doing — the docs explicitly call out that no SDK wrapper exposes settings — but it does not address the request, because the audience that lives in Studio would still be sent back to a terminal.
  • Reuse the ov.conf editing flow from #5044. Not applicable: Account configuration is persisted runtime configuration, and ov.conf is explicitly the immutable startup baseline that the runtime configuration API never rewrites. Editing ov.conf for this would require a restart and would not represent the same setting.
  • Expose Cluster model settings instead. Not expressible: Cluster vlm / query_planner / embedding are startup-only and not on the runtime surface, so this would require new kernel work first. Deliberately out of scope here.
  • Fold this into #5044. Offered above as a maintainer decision.

Feature Area

Model Integration

Use Case

A deployment hosts several Accounts on one OpenViking cluster, and they must not share model endpoints:

  • Account A uses a hosted VLM for stronger multimodal capability, and its provider rotates API keys on a schedule.
  • Account B must keep multimodal understanding local for confidentiality reasons and uses a different, local-only endpoint.

The operator who runs this deployment is a ROOT user working in Studio — they manage users, groups and ACL there, and they are the same person who has to rotate those two Accounts' model credentials. Today that one task forces a terminal and a hand-written PATCH, and a mistake in the credential array (forgetting that arrays replace wholesale) silently drops a failover entry instead of erroring.

The same applies to a smaller, more common case: a single operator wants to move one Account's Query Planner to a different model to control retrieval latency, and has to read the precedence rules out of the API reference to be sure the change took effect.

Example API (Optional)

No new server API is requested. These already exist and are what a Studio page would call:

http
GET   /api/v1/admin/accounts/{account_id}/configuration
PATCH /api/v1/admin/accounts/{account_id}/configuration
Content-Type: application/json
json
{
  "settings": {
    "vlm": {
      "model": "vision-deployment-v2",
      "timeout": 30,
      "credentials": [
        {
          "id": "primary",
          "provider": "openai",
          "model": "vision-deployment-v2",
          "api_key": "sk-****",
          "api_base": "https://llm-gateway.example/v1"
        }
      ]
    },
    "query_planner": null
  }
}

A null at query_planner means "delete this Account override and fall back", which is what the proposed "inherit from Cluster" action would send.

Sketch of the Studio route, offered only to show the intended shape:

/studio  →  Settings  →  Account: acme  →  Models

  VLM            [ inherited from Cluster ▾ ]   [ Configure for this Account ]
  Query Planner  [ explicit for this Account ]  [ Edit ] [ Inherit from Cluster ]

Additional Context

  • Everything above is a static, source-level reading of the repository at 1f4f7039f, including web-studio/src/components/app-shell.tsx, web-studio/src/routes/settings/route.tsx, web-studio/src/routes/users/route.tsx, web-studio/src/lib/resource-acl.ts, web-studio/src/lib/studio-permissions.ts, openviking/server/routers/admin.py, openviking/config/account_config.py and docs/en/api/08-admin.md. I did not run a server and drive the flow end to end, so treat the UI-side specifics as a reading of the current tree rather than a reproduced trace.
  • The UI gap is the only part claimed here. The Account-layer API behavior described above is documented in docs/en/api/08-admin.md and docs/design/runtime-configuration-design.md, and I am relying on that documentation rather than on my own verification of runtime semantics.
  • I am not proposing a specific visual design or framework-level approach; the maintainers' choice on placement (/settings/models versus a tab on the existing account page) is fine either way as long as the page is account-scoped and ROOT-gated.
  • Related but separate, and deliberately not bundled here: #5044's Cluster-level model settings, which would need new kernel work, and any "test connection" endpoint.

Contribution

  • I am willing to contribute to implementing this feature