v-claw-provider
v0.1.2
Published
OpenClaw SDK plugin for V-Claw/SubProvider.
Readme
v-claw-provider
OpenClaw provider plugin for V-Claw token gateway (token.v-claw.org).
Runtime status: end-to-end verified with real OpenClaw calls against the live V-Claw AIAPI surface.
Baseline
- OpenClaw baseline target:
2026.4.1 - Provider id:
v-claw - User-facing title:
V-Claw/SubProvider
Install into OpenClaw (real usage)
- Build plugin package:
npm install
npm run build- Ensure plugin manifest and dist output exist:
openclaw.plugin.jsondist/**
Add this plugin package to OpenClaw plugin loading flow according to your OpenClaw
2026.4.1setup (local path or packed tarball).Configure runtime auth/config in OpenClaw environment:
VCLAW_API_KEY=...
VCLAW_BASE_URL=https://token.v-claw.orgOptional envs:
VCLAW_DEFAULT_MODEL=gpt-5.4
VCLAW_CATALOG_MODE=catalog-endpoint
VCLAW_BOOTSTRAP_CONTEXT='{"base_url":"https://...","default_model":"...","models":["..."]}'
VCLAW_CATALOG_ENDPOINT_URL=https://.../provider-catalog- Verify plugin package locally:
npm run testPlugin config schema summary
baseUrl?: stringdefaultModel?: stringcatalogMode?: "static" | "bootstrap-context" | "catalog-endpoint"catalogEndpointUrl?: stringbootstrapContext?: objectstaticModels?: Array<{ id: string; ... }>
Catalog source-of-truth
Nguồn metadata runtime/provider chính là GET /v1/provider-catalog.
GET /v1/models chỉ được dùng như:
- fallback signal
- live availability check
Nếu cả hai path live đều không usable, plugin vẫn fallback về static catalog để giữ safety net.
Current aiapi.linkto.com.vn endpoint surface (runtime probe)
Probe runtime gần nhất cho thấy surface đang hiện hữu như sau:
GET /v1/provider-catalog→ live endpoint, nhưng hiện có thể trả403 INSUFFICIENT_BALANCEvới API key không đủ balanceGET /v1/models→ live endpoint, cùng gating balance như trênPOST /v1/responses→ live endpoint cho OpenAI-compatible responses flowPOST /v1/chat/completions→ live endpoint cho OpenAI-compatible chat flowPOST /v1/messages→ có route nhưng chỉ usable theo group/platform phù hợp; với key OpenAI hiện probe public có thể không usable như Claude laneGET /v1beta/models→ live Gemini-compatible listing surfaceGET /antigravity/models→ live Antigravity listing surfaceGET /api/v1/groups/available→ cho thấy group surface user đang được cấpGET /api/v1/keys→ trả API key + bound group runtime
Runtime state observed from admin/user surface
- Hiện có 2 group chính:
OpenAIvàAntigravity. - Key
openaiđang bound vào group OpenAI (group_id=10). - Group OpenAI hiện
default_mapped_model = gpt-5.4. - Surface admin cho thấy runtime account mappings hiện expose rộng family
google-claude-*,google-gemini-*,gpt-oss-120b-medium, vàtab_flash_lite_preview. - Một số live gateway endpoints hiện bị gate bởi balance/eligibility, nên plugin không được giả định rằng probe không-auth hoặc low-balance sẽ always trả catalog JSON.
Catalog modes (xwp.2 + provider-catalog primary)
Plugin hiện hỗ trợ 3 mode catalog, với default là catalog-endpoint:
catalog-endpoint(mặc định): gọi endpoint catalog (mặc định${baseUrl}/provider-catalog, hoặc override bởicatalogEndpointUrl/VCLAW_CATALOG_ENDPOINT_URL) để hydrate metadata chính.bootstrap-context: hydrate từbootstrapContext(plugin config hoặcVCLAW_BOOTSTRAP_CONTEXT).static: dùngstaticModelstrong config/plugin.
Hydration mapping
Các field được map ở mức bounded:
base_url -> baseUrldefault_model -> defaultModelmodels -> staticModels(nhận cả string model id hoặc object model)
Nếu endpoint trả non-200 hoặc payload không hợp lệ, plugin tự động fallback về static/default để tránh fail cứng.
Khi provider-catalog không usable, plugin sẽ probe /v1/models như availability signal (không dùng payload này làm metadata source-of-truth).
Current packaging strategy (xwp.1)
- Runtime/package compatibility is declared via
peerDependencies.openclaw(>=2026.4.1 <2027). - Local development currently uses a repo-reference dev dependency:
openclaw: file:../../reference/openclaw
- TypeScript compile currently uses a local declaration shim for
openclaw/plugin-sdk/provider-entrybecause the localfile:../../reference/openclawdependency is used as source reference in this phase.
This strategy is dev-only and keeps the repo self-contained for now. It should be replaced by pure package-based SDK type resolution once the OpenClaw package surface used by this plugin is available as stable consumable types for external plugins.
Current limitations
openclaw: file:../../reference/openclawvẫn đang là dev dependency local để compile/test trong giai đoạn baseline này.- Shim type
types/openclaw-provider-entry.d.tsvẫn được giữ để tránh kéo compile graph xuyên repo. - Chưa implement transport chuyên biệt cho Anthropic/Gemini; scope hiện tại là canonical
v-clawdưới user-facing titleV-Claw/SubProvider.
Verify
npm run build
npm run testRuntime smoke in isolated OpenClaw profile (headless bootstrap)
Use the repo-local helper below to run runtime verification without manual JSON editing.
Single-command headless flow
VCLAW_API_KEY=... npm run runtime:smoke:headlessWhat it does:
- installs this plugin into profile
v-claw-provider-smoke - seeds provider auth with
models auth paste-token(non-interactive) - runs
plugins list,plugins inspect v-claw-provider,models list --all --provider v-claw,plugins doctor
Notes
- Script path:
scripts/runtime-smoke-headless.sh - Defaults:
OPENCLAW_PROFILE=v-claw-provider-smokeOPENCLAW_PROVIDER=v-clawOPENCLAW_AUTH_PROFILE_ID=v-claw:default
- Optional overrides:
OPENCLAW_BIN=/opt/homebrew/bin/openclaw(force a specific OpenClaw binary)OPENCLAW_SKIP_INSTALL=1(skip reinstall if plugin is already installed in profile)
- If
VCLAW_API_KEYis missing, the script skips seeding and uses whatever auth is already in OpenClaw store.
Phase2 closeout status (reporting clarity)
- Repo verification status: PASS (build/test pass).
- Execution telemetry note: callback/session-resolution telemetry for run
v-claw-provider-phase2-20260403t0214was not fully clean. - This repository does not claim that observability for that run was fully clean.
