mirror of
https://github.com/HKUDS/OpenSpace.git
synced 2026-08-28 05:15:00 +00:00
2.6 KiB
2.6 KiB
Current Routing Flow
This document records the current OpenSpace routing setup for this local environment.
Effective Split Routing
- Main LLM:
- model:
gpt-5.4 - API base:
http://127.0.0.1:8080/v1 - source:
OPENSPACE_LLM_*
- model:
- Skill embeddings:
- backend:
local - model:
BAAI/bge-small-en-v1.5 - source:
OPENSPACE_SKILL_EMBEDDING_*
- backend:
This means:
- normal OpenSpace generation and tool-calling still use the OpenAI-compatible provider path
- skill-router semantic re-rank does not depend on remote
/v1/embeddings - Codex Desktop main session remains isolated from the sidecar/provider env
Flow 1: OpenSpace CLI
flowchart LR
A["User runs ./scripts/openspace.sh"] --> B["Load openspace/.env"]
B --> C["Set OPENSPACE_LLM_*"]
B --> D["Set OPENSPACE_SKILL_EMBEDDING_*"]
C --> E["LLM client"]
D --> F["SkillRanker"]
E --> G["sub2api / local OpenAI-compatible gateway<br/>http://127.0.0.1:8080/v1"]
F --> H["fastembed local model<br/>BAAI/bge-small-en-v1.5"]
G --> I["GroundingAgent execution"]
H --> J["BM25 + vector prefilter"]
J --> I
Flow 2: Codex Desktop With OpenSpace Sidecar
flowchart LR
A["User runs ./scripts/codex-desktop-evolution app"] --> B["Create isolated CODEX_HOME overlay"]
B --> C["Main Codex Desktop session"]
B --> D["openspace_evolution MCP sidecar"]
C --> E["Normal Codex subscription/API workflow"]
D --> F["OpenSpace evolution server"]
F --> G["OPENSPACE_LLM_* -> gpt-5.4 via http://127.0.0.1:8080/v1"]
F --> H["OPENSPACE_SKILL_EMBEDDING_* -> local fastembed"]
G --> I["Evolution / skill capture"]
H --> I
Flow 3: Skill Routing Internals
flowchart LR
A["Task text"] --> B["Early abstain check"]
B --> C["BM25 rough rank"]
C --> D["Local embedding re-rank"]
D --> E["Top candidate skills"]
E --> F["Optional LLM selection"]
F --> G["Injected / selected skills"]
Key Config Inputs
OPENSPACE_LLM_API_KEYOPENSPACE_LLM_API_BASEOPENSPACE_LLM_OPENAI_STREAM_COMPATOPENSPACE_SKILL_EMBEDDING_BACKENDOPENSPACE_SKILL_EMBEDDING_MODEL
Operational Notes
- If the provider does not expose
/v1/embeddings, the main LLM path still works. - With the current setup, skill embeddings stay local, so router prefilter remains available.
- If needed later, skill embeddings can be moved to a separate remote endpoint by setting:
OPENSPACE_SKILL_EMBEDDING_BACKEND=remoteOPENSPACE_SKILL_EMBEDDING_API_KEYOPENSPACE_SKILL_EMBEDDING_API_BASEOPENSPACE_SKILL_EMBEDDING_MODEL