Problem Statement
Problem
The OpenClaw openviking plugin currently works with apiKey, but it does not properly
support multi-tenant production usage with explicit accountId and userId.
Before patching locally, the plugin always sent requests effectively as default/default,
because X-OpenViking-Account and X-OpenViking-User were not configurable through plugin
config and were hardcoded to empty values in the client setup.
This causes a problem when OpenViking is running in production mode with root_api_key:
root_api_key can authenticate successfully
- but requests are still routed to the default tenant
- newly created real accounts/users are not actually used by the plugin
As a result, OpenClaw appears to work, but all memory/session/resource writes still go into
the default tenant instead of the intended production account.
Expected behavior
The plugin should support tenant-aware configuration, for example:
and pass them through as:
X-OpenViking-Account
X-OpenViking-User
This is required when using root_api_key with a real OpenViking account/user in
production.
Additional issue
Even after adding accountId / userId support in code, Gateway config validation fails
unless the plugin schema also includes these fields.
So this needs to be fixed in both:
- runtime plugin config parsing
- plugin config schema / metadata
Proposed Solution
Proposal
Add first-class multi-tenant support to the OpenClaw openviking plugin.
Proposed changes
-
Extend plugin config with:
-
Pass these values through on every OpenViking request as:
X-OpenViking-Account
X-OpenViking-User
-
Update the plugin config schema so Gateway accepts these fields.
-
Optionally allow env fallback, for example:
OPENVIKING_ACCOUNT_ID
OPENVIKING_USER_ID
Why
This makes the plugin work correctly with OpenViking production mode when using
root_api_key, and prevents requests from silently falling back to the default tenant.
Without this, OpenClaw may appear functional, but all data is written to the wrong tenant.
Alternatives Considered
No response
Feature Area
Core (Client/Engine)
Use Case
Openclaw
Example API (Optional)
Additional Context
No response
Contribution
Problem Statement
Problem
The OpenClaw
openvikingplugin currently works withapiKey, but it does not properlysupport multi-tenant production usage with explicit
accountIdanduserId.Before patching locally, the plugin always sent requests effectively as
default/default,because
X-OpenViking-AccountandX-OpenViking-Userwere not configurable through pluginconfig and were hardcoded to empty values in the client setup.
This causes a problem when OpenViking is running in production mode with
root_api_key:root_api_keycan authenticate successfullyAs a result, OpenClaw appears to work, but all memory/session/resource writes still go into
the
defaulttenant instead of the intended production account.Expected behavior
The plugin should support tenant-aware configuration, for example:
accountIduserIdand pass them through as:
X-OpenViking-AccountX-OpenViking-UserThis is required when using
root_api_keywith a real OpenViking account/user inproduction.
Additional issue
Even after adding
accountId/userIdsupport in code, Gateway config validation failsunless the plugin schema also includes these fields.
So this needs to be fixed in both:
Proposed Solution
Proposal
Add first-class multi-tenant support to the OpenClaw
openvikingplugin.Proposed changes
Extend plugin config with:
accountIduserIdPass these values through on every OpenViking request as:
X-OpenViking-AccountX-OpenViking-UserUpdate the plugin config schema so Gateway accepts these fields.
Optionally allow env fallback, for example:
OPENVIKING_ACCOUNT_IDOPENVIKING_USER_IDWhy
This makes the plugin work correctly with OpenViking production mode when using
root_api_key, and prevents requests from silently falling back to thedefaulttenant.Without this, OpenClaw may appear functional, but all data is written to the wrong tenant.
Alternatives Considered
No response
Feature Area
Core (Client/Engine)
Use Case
Openclaw
Example API (Optional)
Additional Context
No response
Contribution