跪拜 Guibai
← All articles
Artificial Intelligence · Open Source · AI Programming

OpenViking on a 99-Yuan 2-Core 2G Cloud Host: Renewal Math, 128K Embeddings, and a Hidden Query Planner

By limuyang2 ·
Read original on juejin.cn ↗ Google Translate ↗ Alt translation

Self-hosted agent memory stacks don't need high-end hardware: renewal pricing, a 128K multimodal embedding model, and a dedicated query planner model decide whether a cheap cloud host works. The same cost model and configuration pattern transfer to any OpenViking deployment handling growing memory stores.

Summary

OpenViking's AI coding agent memory backend runs acceptably on a 2-core 2G Aliyun instance that renews at 99 yuan/year, a choice driven by renewal math rather than first-year promotions. All inference goes to external APIs; the machine handles storage and retrieval only, keeping memory usage at a few hundred megabytes. The central cost rule for stateful services: a host whose first-year discount balloons on renewal forces an expensive cross-cloud migration, so stable renewal pricing matters more than the initial sticker.

Embedding model selection is a one-way door. Changing it later means a full re-index of all accumulated vectors, so the choice locks in the database's geometry. The winning pick is Volcano Ark's doubao-embedding-vision-251215, a multimodal model with a 128K context window priced at 0.7 yuan per million tokens, which beat the same-priced qwen3-vl-embedding purely on that context window. Free BGE-M3 from SiliconFlow loses on recall quality and suffers from an overcrowded public free pool.

A hidden configuration switch resolves the multi-second stutter most users blame on hardware. Without an explicit query_planner, OpenViking runs every turn's intent analysis through the main VLM, which with thinking enabled can eat 6-7 seconds. The fix is a tiny domain model, tongyi-xiaomi-analysis-flash, that returns compliant JSON in about 0.8 seconds and rejects small talk in 0.4 seconds, at a price below general-purpose LLMs. Rerank stays on SiliconFlow's commercial tier, and the VLM runs at reasoning_effort: low to keep archive extraction off the critical path.

Takeaways
— Aliyun's 99 yuan/year 2-core 2G instance (ecs.e-c1m1.large) renews at the same price, while many competitors' first-year offers jump to 600-1,000+ yuan on renewal.
— OpenViking on this setup keeps daily memory usage at a few hundred megabytes when all inference is offloaded to external APIs and Swap is enabled.
— Changing the embedding model later invalidates all existing vectors and forces a full re-index, so the choice must be locked in from the start.
— doubao-embedding-vision-251215 is multimodal with a 128K context window at 0.7 yuan per million tokens, versus the same-priced qwen3-vl-embedding at 32K.
— Leaving query_planner unset makes OpenViking fall back to the main VLM for every turn's intent analysis, adding 6-7 seconds per turn when that VLM has thinking enabled.
— tongyi-xiaomi-analysis-flash completes intent planning in ~0.8 seconds (TTFT 0.31s, 200+ tok/s) and outputs 100% JSON-protocol-compliant bare JSON.
— Setting reasoning_effort: low on the VLM produces nearly identical extraction results to high while avoiding 20-48 seconds of thinking per extraction.
— Rerank via SiliconFlow's commercial tier costs a few cents per call; 4 documents score in 0.26s and 30 in 0.57s.
Conclusions

The success of a specialized model for query planning shows that intent classification is narrow enough for a fine-tuned small model to beat general-purpose LLMs on latency and format adherence, not just price.

Treating the embedding model as a one-way decision makes long-term sense because re-indexing cost grows with memory accumulation, but it also locks the stack into a single provider's geometry.

The default fallback of using the main VLM for query planning is a design trap: it couples a high-latency capability to a critical path, and the fix is a configuration detail most users never find in docs.

The renewal-price argument for cloud hosts applies specifically to stateful workloads; for stateless nodes, switching hosts is cheap and the first-year discount matters.

Concepts & terms
OpenViking
An open-source AI coding agent memory backend from ByteDance's Volcano Engine that stores conversation traces, project architecture, entity graphs, and vector indexes for retrieval by coding agents.
Query planner (query_planner)
A configurable model in OpenViking that analyzes each user turn to decide whether memory retrieval is needed and what queries to run, sitting on the critical path before an answer is generated.
Re-index
Rebuilding the entire vector index when switching embedding models; because vectors are geometry-specific, old vectors become unusable and the full store must be re-embedded.
Reasoning effort
A model parameter controlling how much chain-of-thought thinking the model does; setting it low trades a little answer depth for a large cut in latency and token cost.
Source: juejin.cn ↗ Google Translate ↗ Backup ↗