mirror of
https://github.com/HKUDS/OpenSpace.git
synced 2026-08-28 05:15:00 +00:00
104 lines
4.4 KiB
Text
104 lines
4.4 KiB
Text
# ============================================
|
|
# OpenSpace Environment Variables
|
|
# Copy this file to .env and fill in your keys
|
|
# ============================================
|
|
|
|
# ── LLM Credentials ──────────────────────────────────────
|
|
#
|
|
# OpenSpace resolves LLM credentials in this order (first match wins):
|
|
#
|
|
# 1. OPENSPACE_LLM_* — explicit override, always highest priority
|
|
# 2. Provider-native vars — OPENROUTER_API_KEY, OPENAI_API_KEY, etc.
|
|
# 3. ~/.nanobot/config.json or ~/.openclaw/openclaw.json — fallback (only when no explicit or provider key found)
|
|
#
|
|
# For most users, setting ONE of the provider-native keys below is enough.
|
|
# LiteLLM reads them automatically. See https://docs.litellm.ai/docs/providers
|
|
#
|
|
# Full configuration guide: openspace/config/README.md
|
|
|
|
# --- Option A: Provider-native key (simplest) ---
|
|
# Set the key that matches your model's provider:
|
|
|
|
# OpenRouter (for openrouter/* models, e.g. openrouter/anthropic/claude-sonnet-4.5)
|
|
OPENROUTER_API_KEY=
|
|
|
|
# Anthropic (for anthropic/claude-* models)
|
|
# ANTHROPIC_API_KEY=
|
|
|
|
# OpenAI (for openai/gpt-* models)
|
|
# OPENAI_API_KEY=
|
|
|
|
# DeepSeek (for deepseek/* models)
|
|
# DEEPSEEK_API_KEY=
|
|
|
|
# --- Option B: Explicit OpenSpace override (takes priority over Option A) ---
|
|
# Use these when you need full control, e.g. custom API base or non-standard provider.
|
|
|
|
# OPENSPACE_MODEL=openrouter/anthropic/claude-sonnet-4.5
|
|
# OPENSPACE_LLM_API_KEY=sk-xxx
|
|
# OPENSPACE_LLM_API_BASE=https://openrouter.ai/api/v1
|
|
|
|
# --- Recommended split routing for OpenSpace itself ---
|
|
# Keep the main LLM on your OpenAI-compatible provider,
|
|
# but route skill embeddings separately.
|
|
#
|
|
# Example: LLM via sub2api / local gateway, skill embeddings via local fastembed
|
|
#
|
|
# OPENSPACE_MODEL=gpt-5.4
|
|
# OPENSPACE_LLM_API_KEY=sk-xxx
|
|
# OPENSPACE_LLM_API_BASE=http://127.0.0.1:8080/v1
|
|
# OPENSPACE_SKILL_EMBEDDING_BACKEND=local
|
|
# OPENSPACE_SKILL_EMBEDDING_MODEL=BAAI/bge-small-en-v1.5
|
|
|
|
# ── OpenSpace Cloud (optional) ──────────────────────────────
|
|
# Register at https://open-space.cloud to get your key.
|
|
# Enables cloud skill search & upload; local features work without it.
|
|
|
|
OPENSPACE_API_KEY=sk_xxxxxxxxxxxxxxxx
|
|
|
|
|
|
# ── GUI Backend (optional) ──────────────────────────────────
|
|
# Required only if using the GUI backend (Anthropic Computer Use).
|
|
# Uses the same ANTHROPIC_API_KEY above.
|
|
# Optional backup key for rate limit fallback:
|
|
# ANTHROPIC_API_KEY_BACKUP=
|
|
|
|
# ── Skill Embedding (optional, router-only) ─────────────────
|
|
# Controls the skill-router semantic re-rank path independently
|
|
# from the main LLM provider.
|
|
#
|
|
# OPENSPACE_SKILL_EMBEDDING_BACKEND=auto
|
|
# - auto → prefer explicit remote embedding config, then legacy OpenAI-compatible env, then local fastembed
|
|
# - local → force local fastembed model
|
|
# - remote → force remote OpenAI-compatible /embeddings endpoint
|
|
#
|
|
# OPENSPACE_SKILL_EMBEDDING_BACKEND=local
|
|
# OPENSPACE_SKILL_EMBEDDING_MODEL=BAAI/bge-small-en-v1.5
|
|
#
|
|
# Or use a dedicated remote embedding endpoint:
|
|
# OPENSPACE_SKILL_EMBEDDING_BACKEND=remote
|
|
# OPENSPACE_SKILL_EMBEDDING_API_KEY=sk-xxx
|
|
# OPENSPACE_SKILL_EMBEDDING_API_BASE=https://example.com/v1
|
|
# OPENSPACE_SKILL_EMBEDDING_MODEL=openai/text-embedding-3-small
|
|
|
|
# ── Tool / Generic Embedding (optional) ─────────────────────
|
|
# Used by tool search's semantic retrieval. Can also act as a fallback
|
|
# remote embedding endpoint for the skill router when the dedicated
|
|
# OPENSPACE_SKILL_EMBEDDING_* vars are not set.
|
|
#
|
|
# If not set, tool search uses a local embedding model (BAAI/bge-small-en-v1.5).
|
|
# EMBEDDING_BASE_URL=
|
|
# EMBEDDING_API_KEY=
|
|
# EMBEDDING_MODEL=openai/text-embedding-3-small
|
|
|
|
# ── E2B Sandbox (optional) ──────────────────────────────────
|
|
# Required only if sandbox mode is enabled in security config.
|
|
# E2B_API_KEY=
|
|
|
|
# ── Local Server (optional) ─────────────────────────────────
|
|
# Override the default local server URL (default: http://127.0.0.1:5000)
|
|
# Useful for remote VM integration (e.g., OSWorld).
|
|
# LOCAL_SERVER_URL=http://127.0.0.1:5000
|
|
|
|
# ---- Debug (Optional) ----
|
|
# OPENSPACE_DEBUG=true
|