#2343 lowered the shipped default of vlm.max_concurrent (semantic-stage LLM
concurrency) from 100 to 64 in openviking_cli/utils/config/vlm_config.py, but
the config docs still documented it as 100.
* fix: embedding images directly
* fix: skip default values in CLI config serialization, relax ovcli.conf validation
- Rust: add skip_serializing_if to Config/UploadConfig fields to avoid
writing null/default values into ovcli.conf
- Python: change OVCLIConfig/OVCLIUploadConfig model_config from
extra: "forbid" to extra: "ignore" for forward compatibility
- Simplify handle_extra_headers_aliases now that extra fields are ignored
- Add VLMProviderAdapter and integrate VLMFactory into _make_provider
* fix(bot): remove unused OpenAI provider and refresh config docs
Drop the unused OpenAI-compatible provider and its stale exports/tests now that explicit provider configs go through the VLM adapter path. Refresh the bot configuration docs with redacted remote OpenViking examples and clarify gateway/chat usage alongside Feishu configuration.
* revert: drop unrelated embedding changes from PR
Restore the embedder and queuefs files to match the upstream volcengine/OpenViking main branch so this PR only carries the bot provider cleanup and documentation updates.
* revert: align remaining embedding helpers with upstream
Restore the context, embedder base, embedding utils, and local index files to match volcengine/OpenViking main so the PR stays focused on bot-only changes.
* docs: sync cn
* feat: 主站和文档站共享cookie配置(主题色&中/英文切换)
* fix: preserve local main site link path
* fix: support configurable docs main site link
---------
Co-authored-by: linweiye <linweiye.voph@bytedance.com>
The 视频/音频 rows in docs/zh/concepts/06-extraction.md had the
parser names swapped — 视频 was mapped to AudioParser and 音频 to
VideoParser. The English doc (docs/en/concepts/06-extraction.md) is
correct, and the source of truth in openviking/parse/parsers/media/
confirms VideoParser handles .mp4/.avi/etc. and AudioParser handles
.mp3/.wav/etc.
Also expanded the extension lists to match constants.py exactly
instead of "等".
* docs(retrieval): note intent-analysis model is configurable via query_planner (#2224)
* docs(retrieval): note intent-analysis model is configurable via query_planner (#2224)
* feat: add batch add_messages API for faster message ingestion
Previously, adding messages required one HTTP request per message,
making bulk operations (e.g. memory extraction, history migration)
very slow due to network round-trip overhead.
Changes:
- Add POST /api/v1/sessions/{id}/messages/batch endpoint
- Add BatchAddMessageRequest model with max_length=500 limit
- Extract _resolve_message_parts() helper to deduplicate part resolution
- Add _defer_meta_save parameter to Session.add_message() for batch optimization
- Add batch_add_messages method to Python SDK clients (base/http/sync)
- Add batch_add_messages to Session wrapper class
- Update LangChain integration to use batch API
- Update Rust CLI add_memory to use batch API
* refactor: rename batch_add_messages to add_messages and add CLI add-messages command
- Rename batch_add_messages → add_messages across Python SDK, server router, and client
- Add 'ov session add-messages' CLI command with parse_messages() helper
- Update API docs (en/zh) to reflect new naming and CLI usage
- HTTP route path /messages/batch unchanged for backward compatibility
* fix: improve input validation and revert router function name
- parse_messages: return explicit errors for invalid JSON instead of silent fallback
- add_messages: validate spec keys to raise ValueError instead of KeyError
- Revert router endpoint function name to batch_add_messages
* revert: restore batch_add_messages naming across all Python layers and docs
* fix: keep Session.add_messages() as core method name, only SDK/Client/Router use batch_add_messages
* docs: overhaul agent-integrations section for clarity and beginner-friendliness
Restructure the agent-integrations documentation (EN + ZH) to be concise,
beginner-friendly, and consistently structured across all runtimes.
* docs(mcp-clients): clarify OAuth flow for Claude Desktop / Claude.ai
* docs(mcp-clients): add public access guide link for OAuth section
* docs: address review — clarify dev-mode auth, add missing import
* docs(mcp-guide): update verified platforms, fix OAuth section scope
Use explicit clawhub: prefix across all install paths (README, INSTALL, INSTALL-ZH, INSTALL-AGENT, SKILL.md) since bare specs resolve to npm on current OpenClaw. Restructure ClawHub README with Quick Start first screen, How It Works, Tools table, Data Flow and Privacy section. Move engineering details into collapsible section. Demote ov-install to fallback. Fix ov-install params, OpenClaw min version, and parameter table. Allow images in ClawHub bundle.
Co-authored-by: Cursor <cursoragent@cursor.com>
Follow-up to #2160 (console removal) and #2170 (OAuth UI moved to web-studio).
Six guides still showed the old `python -m openviking.console.bootstrap`
launch + `-p 8020:8020` docker run snippets, which now fail because the
console package is gone and the image no longer exposes 8020.
- docs/{en,zh}/getting-started/04-setup-for-agent.md: drop `-p 8020:8020`
from docker run and the "ports: 1933:1933, 8020:8020" summary; note that
Web Studio is served by the OV server at `/studio` so no extra port is
needed.
- docs/{en,zh}/guides/03-deployment.md: drop 4× `-p 8020:8020` snippets,
replace "OpenViking Console on port 8020" with the inline `/studio`
mention, and update the "access this after startup" list to point at
`http://localhost:1933/studio` (with 1934 documented as a legacy Caddy
fallback consistent with the updated 12-public-access guide).
- docs/{en,zh}/guides/05-observability.md: rewrite the "Web Studio for
web-based investigation" section. The standalone-bootstrap launch is
gone; instead direct readers to `/studio` and its observability-relevant
pages — Home (token/retrieval/context-commit trends, /api/v1/console/*
BFF), Request Logs (audit), Resources, Retrieval, Sessions. Update the
"choose an entry point" table accordingly.
docs/design/mcp-oauth2-1.md is intentionally untouched — it's a historical
design document. The README inside openviking/observability/usage_audit/
and 12-public-access.md were already updated in earlier PRs.
#2160 dropped the legacy `/console` standalone service but deliberately
left the OAuth authorize page's `/console` link and Quick-authorize panel
in place, calling out a follow-up to re-point them at web-studio. This
PR is that follow-up.
Backend
- `provider.authorize()` now defaults to redirecting to
`/studio/oauth/consent` (same-origin SPA) instead of the server-rendered
`/oauth/authorize/page`. New `FALLBACK_AUTHORIZE_PAGE` constant exposed
for callers that need to opt into the legacy path.
- New public endpoint `GET /api/v1/auth/oauth/pending/{pending_id}` returns
the minimum info the consent UI needs (client_name, redirect_host,
scopes); deliberately does NOT expose display_code or full redirect_uri.
- `POST /api/v1/auth/oauth-verify` now accepts either `pending_id`
(Studio consent path) or `code` (cross-device fallback).
- HTML `/oauth/authorize/page` template stripped of `/console` link, the
`/console/api/v1/...` JS, and the Quick-authorize same-origin panel.
It now serves as a pure cross-device fallback that points users at
`/studio/oauth/verify` on another already-signed-in device.
Web Studio
- New `<IdentityPicker>` shared component: "current identity" or
"use a different API key" — the temporary key is never persisted.
- New routes `/studio/oauth/consent` (same-device consent card) and
`/studio/oauth/verify` (cross-device code entry).
- ConnectionDialog gains an "OAuth client OTP" section (same
IdentityPicker), driving `POST /api/v1/auth/otp`.
- API key storage is unchanged: only sessionStorage. No new localStorage
writes, no cross-tab channels — the consent UI runs inside Studio's own
tab, so it reads the session-stored key directly.
Docs
- 11-oauth.md (zh/en): refreshed quickstart, How-it-works, Claude.ai
walkthrough, curl example, and troubleshooting around the Studio
consent / cross-device verify split.
- 12-public-access.md (zh/en): rewritten to lead with public HTTPS;
the `:1934` Caddy block is now a one-paragraph compatibility note for
deployments that already bookmarked it.
- mcp-oauth2-1.md: top-level "Studio migration" note explains the new
default path; Phase 1 history retained.
- Caddyfile / docker-compose.yml comments reworded from "aggregated
proxy" to "legacy fallback" to match the new docs.
Tests
- `tests/server/oauth/test_router.py` fixture pins to
FALLBACK_AUTHORIZE_PAGE so existing end-to-end assertions keep working.
- 4 new tests cover the pending-info endpoint and pending_id verify path.
- 55 passed locally; ruff format+check, web-studio tsc/eslint/prettier
all clean.
Security notes
- Consent UI requires explicit user click; client_name + redirect_host
shown for phishing identification.
- Knowing a pending_id does not bypass Bearer auth.
- display_code is not returned by GET pending — the cross-device
brute-force protection is preserved.
- `ctx.from_oauth` gate (router.py) untouched: OAuth bearer still
cannot mint new OAuth state or OTPs.
The OpenViking docker image still launched the legacy `openviking/console`
standalone service on port 8020. Now that web-studio is bundled into the OV
server itself at /studio (see #2156), that process is redundant and the
port is just a confusing artefact.
This change retires the old console (python package + 8020 + console-frontend
favicons) but **keeps the in-compose Caddy as a stable single-ingress on
port 1934**, just simplified to one upstream now that there's no 8020. The
server-side BFF at `openviking/server/routers/console.py` (under
`/api/v1/console/*`) is also kept — web-studio uses the same endpoints.
**The OAuth authorize page (`openviking/server/oauth/router.py`) is
deliberately untouched in this PR** — the console-link button and Quick
authorize same-origin panel will be re-pointed at web-studio in a focused
follow-up.
BREAKING CHANGES:
- Port 8020 is gone from the docker image and docker-compose.yml; Caddy at
1934 now forwards everything to 1933 (web-studio lives at /studio there).
Anything bookmarked at `http://host:8020/...` must migrate to
`http://host:1933/studio/`.
- `python -m openviking.console.bootstrap` no longer exists; the python
package `openviking.console` has been removed.
Pip packaging:
- web-studio dist is now shipped inside the wheel under
`openviking/web_studio/dist/` (mirroring the old `openviking/console/static/`
layout). The dockerfile copies `--from=web-studio-builder /web-studio/dist`
into the source tree before `uv sync`, so the wheel produced by the
default docker build always carries the SPA. Building the wheel without
running `npm run build` first leaves the directory empty, which gracefully
degrades /studio to a 404 without breaking server startup.
- Favicon assets (`favicon.ico` / `favicon-32.png` / `apple-touch-icon.png`,
~11 KB total) are duplicated into `openviking/server/static/` and shipped
via package-data so `/favicon.*` and `/mcp/favicon.*` routes are always
registered, regardless of whether the web-studio dist is bundled.
- `pyproject.toml` and `setup.py` `package-data` drop `console/static/**`
and add `server/static/**` + `web_studio/dist/**`.
- New favicons (the 16/32/180 set in both `openviking/server/static/` and
`web-studio/public/`) are downscaled from the canonical
`web-studio/public/openviking-icon.png`, so the small-icon family matches
the SPA's high-res rel="icon" target — the studio tab icon now stays
consistent whether the browser uses the HTML link tag or falls back to
auto-fetching `/favicon.ico`.
Server:
- `openviking/server/app.py` now reads `/studio` from
`Path(__file__).parent.parent / 'web_studio' / 'dist'` by default;
`OPENVIKING_WEB_STUDIO_DIR` still wins for dev mode pointing at a
repo-local build. Favicon routes are unconditionally registered and
load from `openviking/server/static/`.
- `openviking/observability/usage_audit/projection.py` drops the legacy
`/console/*` skip prefix (the BFF prefix `/api/v1/console/*` remains).
Docker:
- `web-studio-builder` stage moved earlier (Stage 2) so its dist can flow
into `py-builder` before `uv sync` runs.
- Runtime stage no longer separately copies the dist or sets
`OPENVIKING_WEB_STUDIO_DIR`; the in-package path is the default.
- Entrypoint renamed `openviking-console-entrypoint.sh` -> `openviking-entrypoint.sh`
and stripped of the `python -m openviking.console.bootstrap` launch.
- `EXPOSE 1933 8020` -> `EXPOSE 1933`.
- `docker-compose.yml` drops the openviking service's 8020 port mapping;
the caddy service stays but no longer needs port 8020 exposed.
- `Caddyfile` simplified to a single `:1934 { reverse_proxy openviking:1933 }`
— the legacy `/console/*` route to :8020 is gone.
Docs:
- en/zh quickstart updated to drop the 8020 mapping and explain that the
API server now also serves `/studio`.
- Other guides (`12-public-access.md`, `11-oauth.md`, `05-observability.md`,
`04-setup-for-agent.md`, `03-deployment.md`) are intentionally left for a
focused follow-up PR alongside the OAuth quick-authorize reintroduction.
Tests:
- Deleted `tests/misc/test_console_{proxy,static_assets}.py` (covered the
removed console package). `tests/observability/test_console_router.py`
stays — it covers the BFF, which remains.
* feat(mcp): progressive single-entrypoint upload for local files
Extends `add_resource` MCP tool to handle local-file paths via a server-orchestrated
two-step flow, eliminating the need for `ov` CLI in sandboxed agent environments
(Claude web, Manus) where local FS is unavailable and CLI install is blocked.
Behavior:
- Remote URL → unchanged.
- Local path → server mints a 6-char base62 token, returns prose Step 1 / Step 2
instructions pointing at /api/v1/resources/temp_upload_signed.
Agent uploads, then re-calls add_resource(temp_file_id=...).
- temp_file_id → resolved against per-tenant subdir, ingested via existing pipeline.
Token: in-memory dict, 10-min TTL, dict.pop doubles as replay protection.
Per-tenant temp-dir isolation ({root}/{aid}/{uid}/{tfid}); legacy CLI uploads
keep flat layout via dual-lookup in resolve_uploaded_temp_file_id.
Public base URL resolves env > config > listen-host fallback (12-factor: runtime
env trumps image-baked config; production deployments behind MCP proxy + nginx
must set OPENVIKING_PUBLIC_BASE_URL since the agent-facing URL is not derivable
from the server's request scope).
* feat(mcp): infer public base URL from request headers + emit fallback hint
Adds a third fallback layer between explicit operator config and listen-host
fallback: capture X-Forwarded-Host / X-Forwarded-Proto / Host headers in the
MCP identity middleware and use them when neither OPENVIKING_PUBLIC_BASE_URL
nor ServerConfig.public_base_url is set.
Resolution order is now: env > config > X-Forwarded-* > Host > listen-host.
The first two are explicit; the rest are inferred. When an inferred source is
used, the add_resource prose response appends a troubleshooting hint asking
the user to set OPENVIKING_PUBLIC_BASE_URL on the server if upload fails —
because inferred URLs can be wrong if the reverse-proxy chain doesn't forward
X-Forwarded headers, or if the server listens on 0.0.0.0.
Documents the variable in docker-compose.yml (commented-out env block) and
in the MCP integration guides (zh + en) — covers when it's required and the
full resolution chain.
* fix(mcp): address Copilot review on PR #1847
- Relax temp_file_id regex from `[a-zA-Z0-9]+` extension to any non-separator
chars, and dedupe to a single TEMP_FILE_ID_RE in local_input_guard. The old
pattern rejected `Path("report.my-file").suffix == ".my-file"` and similar
legitimate filenames, breaking the progressive upload flow.
- Hoist `_resolve_temp_or_path` import to module level in mcp_endpoint
(verified no circular import).
- Add `_is_safe_namespace_component` defense-in-depth at the signed-upload
route so a future code path that mints tokens from less-trusted input
still cannot escape the per-tenant directory.
- Broaden partial-file cleanup to any exception via try/finally + flag,
not just HTTPException — prevents OSError/IO failures from leaving
half-written files behind.
- Scope `_cleanup_temp_files` to the tenant subdir at the signed-upload
route to bound the rglob scan; the legacy `/temp_upload` route still
cleans the root level.
- Add round-trip test for unusual filename extensions (.my-file, .bak~, .中文).
* docs(mcp): reflect server-minted temp_file_id in progressive-upload flow
Post-rebase onto TempUploadStore, the agent no longer learns the temp_file_id
from the MCP prose — the server mints it at upload time and returns it in the
JSON response body. Update both en + zh docs accordingly. Also note that the
signed endpoint shares the same persistence layer as /temp_upload, so
local/shared modes (and multi-worker via shared) apply uniformly.
* fix(mcp): address Copilot review on rebased PR #1847
- Drop `upload_signed_max_bytes` config field. The signed endpoint now relies on
TempUploadStore's streaming `temp_upload.shared_max_size_bytes` check (single
source of truth, fires even when Content-Length is missing/chunked). Map
oversize from InvalidArgumentError back to 413.
- Normalize `X-Forwarded-Host` / `X-Forwarded-Proto` to the first comma-separated
value in `_resolve_public_base_url`, matching the OAuth issuer resolver. Fixes
malformed upload URLs under multi-hop proxy chains.
- Complete the `public_base_url` field comment to reflect all five fallback layers
in the resolver, not just env > field > listen.
- Add `watch_interval` / `to` parameters to the MCP tool tables in both en + zh
integration guides — they were merged in from main's Watch Management API
during the rebase but the table wasn't updated.
* feat(embedder): expose encoding_format for OpenAI/Azure providers
The OpenAI Python SDK 2.x defaults to encoding_format="base64" so the
client can decode embeddings into native float arrays locally. Some
self-hosted or vendor-fronted OpenAI-compatible gateways cannot
deserialize base64 embedding payloads coming back from upstream models
and silently hang for tens of seconds before returning HTTP 500 (e.g.
gateways that wrap providers like Qwen, GLM, Doubao, etc. behind a
strongly-typed Java SDK).
Add an optional `encoding_format` field on EmbeddingModelConfig that
gets forwarded to OpenAIDenseEmbedder. The field is unset by default,
so existing deployments keep the SDK's default behavior. Users hitting
the base64 incompatibility can set:
"embedding": {
"dense": {
"provider": "openai",
"encoding_format": "float",
...
}
}
Wiring is intentionally limited to provider="openai" and
provider="azure" — the only two factory branches that route to
OpenAIDenseEmbedder for an actual upstream HTTP gateway. Other
providers either don't expose this knob (volcengine/vikingdb/jina/...)
or run against local stacks where the issue cannot occur (ollama).
* test(embedder): improve encoding_format validation error handling
- Add ValidationError import from pydantic for explicit exception handling
- Update test_rejects_unknown_value to assert ValidationError instead of generic Exception
- Improve test specificity by catching the exact validation error type raised by pydantic models
* docs(embedder): complete encoding_format configuration guide
---------
Co-authored-by: qin-ctx <qinhaojie.exe@bytedance.com>