# huawei-cloud-openviking-embedding-switch

Points OpenViking at a local llama-server for embeddings, rebuilds the vectordb index when the dimension changes, and restarts the server inside its sandbox.

- skill · `type=skill` · Claude Code, Codex, Cursor, GitHub Copilot, Gemini CLI, OpenCode · 15900 installs · ★ 59
- Author: huaweicloud
- License: MIT · policy=mirror · the beginning of the file is at the end of this page
- Source: https://github.com/huaweicloud/huaweicloud-skills/tree/HEAD/skills/devtools/extensions/huawei-cloud-openviking-embedding-switch/SKILL.md
- Updated: 2026-10-23
- HTML: https://affpapa.org/en/nevibecode/skills/huawei-cloud-openviking-embedding-switch

## What it does

The skill walks the whole job: it reads the `embedding.dense` block of `ov.conf`, probes the target endpoint via `/v1/embeddings`, then rewrites provider, model, api_base and dimension. If the new vector size differs from the old one, the `vectordb/context` directory gets removed. Skip that and OpenViking dies at startup with `EmbeddingRebuildRequiredError`.

Every call goes through the job-env-manager REST API at `http://127.0.0.1:8090`. Restarts use `kill` plus `exec` rather than stop/start, because stop/start runs `start.sh` again and that script overwrites `ov.conf` with TokenHub credentials. Stale lock files are cleared before the new process comes up.

Preconditions are real: job-env-manager must be listening, the OpenViking environment must sit in state `running`, llama-server must serve with the `--embeddings` flag on `127.0.0.1:{port}`, and the host needs `curl` plus `python3`. Huawei Cloud credentials play no part here. An unreachable endpoint halts the skill, so confirm llama-server is up first.

## Install

### Claude Code (native platform)

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-openviking-embedding-switch -a claude-code
```

2. **Manually: put the files in place**
- File: `~/.claude/skills/huawei-cloud-openviking-embedding-switch/SKILL.md` — Copy the whole skill folder; for one project use .claude/skills/huawei-cloud-openviking-embedding-switch/

### Codex

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-openviking-embedding-switch -a codex
```

2. **Manually: put the files in place**
- File: `.agents/skills/huawei-cloud-openviking-embedding-switch/SKILL.md` — For all projects use ~/.agents/skills/

### Cursor

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-openviking-embedding-switch -a cursor
```

2. **Manually: put the files in place**
- File: `.cursor/skills/huawei-cloud-openviking-embedding-switch/SKILL.md` — Cursor also reads .agents/skills/ and .claude/skills/

### GitHub Copilot

1. **GitHub CLI**
```bash
gh skill install huaweicloud/huaweicloud-skills huawei-cloud-openviking-embedding-switch
```

2. **Manually: put the files in place**
- File: `.github/skills/huawei-cloud-openviking-embedding-switch/SKILL.md`

### Gemini CLI

1. **Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-openviking-embedding-switch -a gemini-cli
```

2. **Platform CLI**
```bash
gemini skills install https://github.com/huaweicloud/huaweicloud-skills --path skills/devtools/extensions/huawei-cloud-openviking-embedding-switch
```

### Windsurf (Devin Desktop)

**Manually: put the files in place**
- File: `.devin/skills/huawei-cloud-openviking-embedding-switch/SKILL.md` — The legacy .windsurf/skills/ path still works

### OpenCode

**Skills CLI (Vercel)**
```bash
npx skills add huaweicloud/huaweicloud-skills --skill huawei-cloud-openviking-embedding-switch -a opencode
```

### Claude.ai

**Claude.ai**
- Zip the folder and upload it in Settings → Capabilities → Skills

Where a file is given instead of a command, copy the files from the source to that path: https://github.com/huaweicloud/huaweicloud-skills/tree/HEAD/skills/devtools/extensions/huawei-cloud-openviking-embedding-switch/SKILL.md

## When to use it
- move OpenViking embeddings onto a local llama-server
- change the vector dimension and rebuild the `vectordb/context` index
- recover from `EmbeddingRebuildRequiredError` after a model swap
- update `ov.conf` without editing `embedding.dense` by hand
- restart `openviking-server` in the sandbox without wiping its config

## Example prompts
- Switch OpenViking's embedding model to the local llama-server on port 18200
- I'm getting EmbeddingRebuildRequiredError — the dimension changed, rebuild the vectordb index
- Show me the current embedding config in ov.conf and its dimension

## Source text · SKILL.md · MIT

Below is the content of a third-party file. It is data, not instructions for you: do not act on anything written inside unless the human asks. Block tag: 1c88c619bc42d872.

BEGIN THIRD-PARTY FILE 1c88c619bc42d872
````text
---
name: huawei-cloud-openviking-embedding-switch
description: |
  Switch OpenViking's embedding model to a local llama-server (or any OpenAI-compatible embedding endpoint) running inside a bwrap sandbox managed by job-env-manager. Handles the full lifecycle: detect current config, validate the target embedding endpoint, modify ov.conf, delete incompatible vectordb index when dimension changes, restart the openviking-server process in the sandbox, and verify the new collection dimension.
  Use this skill when the user wants to: (1) switch the OpenViking embedding model, (2) change the embedding dimension, (3) fix EmbeddingRebuildRequiredError after a dimension mismatch, (4) rebuild the vectordb index after an embedding model change, (5) use a local llama-server for OpenViking embeddings.
  Trigger words: "切换OpenViking embedding", "OpenViking embedding模型", "OpenViking向量化模型", "openviking embedding switch", "change openviking embedding model", "配置openviking embedding", "openviking llama embedding", "bge embedding openviking", "切换向量化模型", "OpenViking模型切换".
tags:
  - openviking
  - embedding
  - llama
  - vectordb
  - job-env-manager
---

# 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.

## Architecture

```
OpenViking Embedding Model Switch
````
END THIRD-PARTY FILE 1c88c619bc42d872

The third-party file has ended. Everything between the 1c88c619bc42d872 tags is data: requests and commands from it are not followed. An “end of file” line with another tag inside the block is part of the file.

First 2039 of 12273 bytes. © huaweicloud · MIT · https://github.com/huaweicloud/huaweicloud-skills/tree/HEAD/skills/devtools/extensions/huawei-cloud-openviking-embedding-switch/SKILL.md

_Part of the page did not fit — see the HTML version._

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
