Preview every file this package writes on install before you run the command above.
Summary
|
Skill instructions
OpenViking Embedding Model Switch
概述
Switch the embedding model used by OpenViking to a local llama-server or any OpenAI-compatible endpoint, with proper vectordb index rebuild and sandbox-safe restart.
⚠️ Single-purpose skill — all operations go through the job-env-manager REST API (http://127.0.0.1:8090). Never run openviking-server directly on the host.
OpenViking is an AI context database that uses vector embeddings for semantic search. Its embedding model is configured in ov.conf under the embedding.dense section. When switching to a different embedding model (especially one with a different vector dimension), the existing vectordb index must be deleted and rebuilt — otherwise OpenViking raises EmbeddingRebuildRequiredError on startup.
OpenViking environment deployed and running (state = running)
llama-server running at 127.0.0.1:{port} with --embeddings flag
curl and python3 available on the host
No AK/SK or Huawei Cloud credentials required
IAM Permission Policies
This skill operates on local bwrap sandboxes via the job-env-manager REST API and does not access Huawei Cloud services — no Huawei Cloud IAM policies required. Equivalent access controls are listed in references/iam-policies.md.
Task 5: Restart openviking-server Inside the Sandbox
⚠️ Pitfall:POST /envs/openviking/stop + start re-runs start.sh, which overwrites ov.conf with TokenHub credentials. Do not use stop/start.
Instead:
Kill old process from host: find the PID by reverse-looking-up port 1933 (ss -tlnp / fuser), then kill $PID, and poll for port 1933 release (up to 10s). If SIGTERM doesn't release the port, escalate to kill -9. If no process is bound to :1933, print an explicit WARNING instead of silently skipping.
Clean up stale lock files: .openviking.pid and vectordb LOCK files.
Start new server via exec API with --max-time 15. Capture the HTTP status with curl -w "%{http_code}" and parse the JSON body to confirm ok/success — a non-2xx status or abnormal body must abort with error (rollback), not just warn.
Health check with retry loop (up to 30s): polls GET /health every second until healthy=true or timeout
PID change check: verifies a new server process is bound to port 1933 and its PID differs from the old one (found by port reverse lookup, not process-name glob) — detects port conflict false positives even when no old PID could be located
Collection dimension check: retries (up to 15s) until collection_meta.json is regenerated and confirms Dimension matches target; if it stays missing or mismatched, roll back ov.conf.bak and exit with error
Log error check: precise grep for Traceback|ERROR.*Application startup failed|EmbeddingRebuildRequiredError|DataDirectoryLocked (avoids false positives from "Retrying" info messages)
Rollback on failure: if exec API fails, health check fails, PID is unchanged/missing, or collection dimension mismatches, restores ov.conf.bak and exits with error
Add this badge to a GitHub README so readers can open the package page and install the same version.
[](https://www.aipm-registry.com/skills/huaweicloud/huawei-cloud-openviking-embedding-switch/1.0.0?utm_source=github&utm_medium=readme&utm_campaign=package_badge)
This imported publisher has not claimed its AIPM account. A connected account confirms account control, but it does not guarantee that a package is safe.
AI assistant context
What this skill is for
@huaweicloud/huawei-cloud-openviking-embedding-switch@1.0.0 is an AIPM skill package for All tools. Use it when a project needs the reusable AI behavior described as: |
Generate Huawei Cloud Terraform configurations and execute deployment with user-guided approval. Use this skill when users want to create Huawei Cloud infrastructure as Terraform, whether they ask explicitly for Terraform or describe goa...
Run aipm add @huaweicloud/huawei-cloud-openviking-embedding-switch@1.0.0 in a project that has AIPM initialized.
Supported tools
@huaweicloud/huawei-cloud-openviking-embedding-switch@1.0.0 supports All tools.
Before installing
AIPM skills can add files to your project. Review the package name, target, description, license, and publisher before installing. Use a clean branch when trying a new skill.