Skip to content

OpenViking Gateway configuration reference ​

This page is for operators editing ov.conf, gateway.conf or environment variables, and for anyone mapping a Studio label to its management API name. Every table gives the name, default and accepted values; what a setting does and when to change it are on the feature page linked from each section.

Where the settings live ​

An embedded and a standalone gateway share most fields; they differ in which file holds them and how you create it. The Form column under Gateway fields marks the fields that only one form uses.

EmbeddedStandalone
FileThe gateway section of ov.confThe root of gateway.conf, with no gateway wrapper
Created byopenviking-server initopenviking-gateway init
Which file is readThe server's own ov.conf--config or OPENVIKING_GATEWAY_CONFIG_FILE, which must point to an existing file; otherwise the first of ~/.openviking/gateway.conf and /etc/openviking/gateway.conf that exists
Host, port and workersCome from the serverThe host, port and workers fields

OPENVIKING_CONFIG_FILE only selects the server's configuration; it never points a standalone gateway at a file.

Gateway fields ​

FieldFormDefaultAccepted valuesMeaning
enabledEmbeddedfalseTurns the gateway on inside the server
openviking_urlStandalone— (required)HTTP(S) URLAddress of the OpenViking Server
hostStandalone127.0.0.1Listen address
portStandalone19351–65,535Listen port
workersStandalone11–64Worker processes
public_urlBothemptyHTTP(S) URL, without /gatewayThe external address clients use; the gateway appends /gateway itself. When empty, an embedded gateway uses the server's public address; with neither, setup guides use the request's origin, and MCP file uploads and downloads do not work unless mcp_file_links is direct. See Public address
mcp_file_linksBothproxyproxy, directHow links from the MCP upload and download tools reach the client. proxy rewrites them to public_url plus /gateway/uploads or /gateway/downloads and needs public_url. direct passes OpenViking's links through unchanged and needs the server's OPENVIKING_PUBLIC_BASE_URL (or server.public_base_url) to be reachable by the client
storage_pathBoth~/.openviking/gatewayLocal storage directory
encryptionStandalonenot set (plain text)Same fields as the encryption section of ov.confEncrypts stored data; see Encryption. Embedded gateways use the server's section
management_keyBothemptyAt least 32 charactersOptional gateway management key
min_server_versionBoth0.4.16Version stringLowest OpenViking Server version a standalone gateway accepts
session_ttl_daysBoth301 or moreDays of inactivity before a conversation expires
response_ttl_secondsBoth2592000 (30 days)60 or moreSeconds to remember which upstream created a Responses response
log_retention_daysBoth301 or moreDays to keep request logs
max_body_bytesBoth33554432 (32 MiB)1,024 or moreSize limit for requests and uploads, in bytes
upstream_timeout_secondsBoth600More than 0Timeout for provider requests
health_interval_secondsBoth601 or moreSeconds between OpenViking status checks

Environment variables ​

Every gateway field can be set as an environment variable named OPENVIKING_GATEWAY_ plus the field name in upper case, in both forms:

bash
OPENVIKING_GATEWAY_PUBLIC_URL=https://ov.example.com
OPENVIKING_GATEWAY_MANAGEMENT_KEY='<management-key>'
  • Environment variables override the file. A non-empty variable wins over the value in the file; an empty variable counts as unset.
  • Values that start with tcp:// or udp:// are ignored, so the variables Kubernetes sets for a Service named openviking-gateway (such as OPENVIKING_GATEWAY_PORT=tcp://…) do not override the file.
  • A value in the file can also be a "$VAR" reference, resolved from the environment.
  • The encryption block can only be set in the file.
  • Containers usually need no file: set the fields they need as variables.

Validation ​

WhatRule
openviking_url and public_urlHTTP(S), with no credentials, query or fragment
Upstream base_urlIts own rules; see Endpoint
management_keyAt least 32 characters once $VAR references are resolved; an unresolved $VAR fails
Unknown fieldsFail validation
Removed fieldsIgnored, with a startup warning: encryption_key_env, and in ov.conf also the v0.5 fields listed in Migration

Context profile settings ​

In Studio: Profiles → a profile. The tables follow the editor's sections, with the Studio label first and then the name in the management API, which calls context profiles policies. Name (name, default Default) is the profile's display name; what each section does is explained in Context profiles.

Recall memory ​

Explained in Recall memory.

Studio labelAPI nameDefaultRangeMeaning
Recall memoryrecalltrueSearch memory for each new user message.
User profile at conversation startprofiletrueProvide the user profile when a conversation starts, independently of recall.
Opening context budgetprofile_max_tokens40000–32,000Separate budget for the profile and catalogs; 0 leaves them out. Catalogs need the OpenViking read tool (openviking_read).
Show recall summaryshow_recallfalseStart the reply with a summary of what OpenViking added, or why recall failed. The model never sees it.
Sourcescontext_typesmemory, resource, skillAt least one while recall is on (checked by Studio only)What to search: memories, resources, skills.
Budget per messagemax_tokens160064–32,000Most tokens added to one message.
Budget per context windowsession_max_tokens300000 or moreMost tokens added within one context window; resets after each compaction. 0 turns recall off.
Relevance thresholdscore_threshold0.350–1Lowest relevance score accepted.
Time limitrecall_timeout2 (seconds)More than 0, up to 30How long a search may take before the message goes on without memory.
Query lengthquery_max_chars80003–32,000Characters of the message used as the search query.
Limit by categoryquotas{} (off)Keys: events, entities, preferences, experiences, resources, skills; when set, at least one above 0 (checked by Studio only)Most entries per category; only categories above 0 are searched.

The management API saves context_types and quotas without checking them. An unknown quotas key makes every recall fail, because OpenViking rejects it.

Save conversations ​

Explained in Save conversations.

Studio labelAPI nameDefaultRangeMeaning
Save conversationscapturetrueSave finished turns to OpenViking.
Save the latest reply afteridle_seconds600 (seconds)1 or moreQuiet time before the last turn is saved and the session committed.
Commit aftercommit_tokens200001 or moreTokens waiting in the session that trigger a commit.
Keep recent messageskeep_recent_messages100–1,000Messages left in the session after a commit.

Long conversations ​

Explained in Long conversations in the gateway.

Studio labelAPI nameDefaultRangeMeaning
CompactioncompactiontrueReplace the earlier part of a conversation with a summary near the context window.
Compact atcompaction_threshold0.90.5–0.98Share of the context window that triggers compaction.
Summary lengthsummary_max_tokens80001,000–32,000Most tokens in one summary.
Default context windowcontext_windowNot set (1,000,000 assumed)1,024 or moreWindow used when the upstream does not list the model; see Set the model's context window.
Agent-managed context windowsagent_windowsfalseExperimental. Let the model start new context windows itself; needs OpenViking tools.
Soft reminder atwindow_soft_ratio0.70.3–0.95, below window_hard_ratioShare of the window at which the model is reminded to start a new window soon.
Hard reminder atwindow_hard_ratio0.850.4–0.97Share of the window at which the model is told to start a new window now.

OpenViking tools ​

Explained in Choose tools and Limits.

Studio labelAPI nameDefaultRangeMeaning
OpenViking toolsgateway_toolstrueOffer OpenViking tools for Chat Completions, full-history Responses and Anthropic Messages.
Tools (unchecked boxes)disabled_toolsThe 8 tools that change dataOpenViking tool names, without openviking_Tools new conversations do not get; every other available tool is offered, including ones added later.
Show tool callsshow_tool_callstrueAdd a one-line notice to the reply for each OpenViking tool call.
Rounds per requesttool_max_roundsnull (no limit)1 or moreTool rounds after which further OpenViking calls are refused.
Time limit per calltool_timeout_seconds30 (seconds)More than 0, up to 120A slower call returns an error to the model.
Result sizetool_result_bytes65536 (bytes)1,024–1,048,576Longer results are cut off before the model sees them.
Total timetool_total_secondsnull (no limit)More than 0Seconds after which a request still using tools fails.
Token budgettool_total_tokensnull (no limit)1,024 or moreEstimated tokens tool calls and results may add to one request before further OpenViking calls are refused.

API requests that omit disabled_tools get the default list; an empty list with gateway_tools on offers every available tool.

Upstream settings ​

In Studio: Upstreams → an upstream. The tables follow the editor's four sections; what each field does is explained in Upstreams.

Endpoint ​

Studio labelAPI nameDefaultAccepted valuesMeaning
Namename— (required)Display name.
Providervendorgenericgeneric, anthropic, openai, deepseek, ark (Volcano Engine Ark), byteplus (BytePlus ModelArk)Studio offers only the protocols a provider supports; the API accepts any pair.
Protocolprotocol— (required)anthropic (Anthropic Messages), chat (Chat Completions), responses (Responses)The API this upstream speaks.
Base URLbase_url— (required)HTTP(S) URLProvider address; defaults are in What an upstream is and path rules in Endpoint.
Append protocol endpoint pathappend_endpoint_pathtrueAppends the selected protocol's path; when false, uses base_url as the complete request URL.

Credentials ​

Studio labelAPI nameDefaultAccepted valuesMeaning
Who provides the API keyauth_modemanagedmanaged (the gateway holds the API key), passthrough (each client sends its own key)See Credentials.
Send the key askey_headerauthorizationauthorization (Bearer), api-key, x-api-keyIgnored when base_url contains {api_key}.
API keyapi_keyemptyWrite-only; see Credentials.
Extra headersheaders{}Header name → valueWrite-only; see Credentials.
This key is a Coding Plan or subscription keycoding_planfalseRejects requests to this upstream unless allowed.
Allow this plan through the gatewayallow_coding_planfalseAllows use of a key marked as Coding Plan.

Models ​

Studio labelAPI nameDefaultAccepted valuesMeaning
Modelsmodels[]Model namesModel names served; empty accepts any name.
Model aliasesaliases{}Name clients use → model sent to the upstream
Context windowscontext_windows{}Model → tokens, each at least 1,024Each model's context window; see Set the model's context window.

Routing ​

Studio labelAPI nameDefaultAccepted valuesMeaning
Prioritypriority0IntegerHigher values win for new conversations.
EnabledenabledtrueA turned-off upstream receives no requests.
Allow OpenViking toolsallow_gateway_toolstrueWhether OpenViking tools can be offered through this upstream.
Restore reasoning the client dropsreplay_reasoningnull (follows the provider)null, true, falsePuts reasoning the client dropped back on earlier replies. null means on for deepseek, ark and byteplus and off for other providers; true or false overrides that. Studio saves null while the switch matches the provider default.
Minimum cacheable promptcache_min_tokens10240 or moreArk and ModelArk only; affects how cache eligibility is reported.

Next steps ​

Open source under the AGPL-3.0 License. Font licenses