Skip to content

Commit 2d16673

Browse files
committed
v0.111.2.bright1
1 parent 0f8c47d commit 2d16673

27 files changed

Lines changed: 647 additions & 81 deletions

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ recursive-exclude cecli/website *.js
2424
recursive-exclude cecli/website *.html
2525
recursive-exclude cecli/website *.yml
2626

27-
# Bright Vision Core marketing/docs site (deploy via GitHub Pages, not PyPI)
27+
# BrightVision Core marketing/docs site (deploy via GitHub Pages, not PyPI)
2828
recursive-exclude bright_vision_core/website *

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Bright Vision Core
1+
# BrightVision Core
22

3-
**PyPI:** [`bright-vision-core`](https://pypi.org/project/bright-vision-core/) — cecli engine + headless HTTP API for the [Bright Vision](https://github.com/Digital-Defiance/bright-vision) desktop IDE.
3+
**PyPI:** [`bright-vision-core`](https://pypi.org/project/bright-vision-core/) — cecli engine + headless HTTP API for the [BrightVision](https://github.com/Digital-Defiance/bright-vision) desktop IDE.
44

55
| Piece | Role |
66
|-------|------|
@@ -19,15 +19,15 @@ bright-vision-core-serve # HTTP API at http://127.0.0.1:8741
1919
curl -s http://127.0.0.1:8741/health
2020
```
2121

22-
Editable dev install (Bright Vision monorepo submodule):
22+
Editable dev install (BrightVision monorepo submodule):
2323

2424
```bash
2525
pip install -e ./bright-vision-core
2626
```
2727

2828
The same wheel also provides the **`cecli`** CLI (`cecli`, `aider-ce`, `ce.cli`) for terminal use.
2929

30-
**Bright Vision desktop** manages Ollama locally (Terminal → Local LLM) and spawns this core on **Terminal → Start**. You do not need a separate `local-llm.sh` repo for the app.
30+
**BrightVision desktop** manages Ollama locally (Terminal → Local LLM) and spawns this core on **Terminal → Start**. You do not need a separate `local-llm.sh` repo for the app.
3131

3232
Release: [docs/PUBLISHING.md](docs/PUBLISHING.md). Lineage: [docs/LINEAGE.md](docs/LINEAGE.md). Vision API: [bright_vision_core/README.md](bright_vision_core/README.md). **Website:** [bright_vision_core/website/](bright_vision_core/website/)[bright-vision-core.digitaldefiance.org](https://bright-vision-core.digitaldefiance.org) (not `cecli/website/`).
3333

@@ -70,7 +70,7 @@ This project can be installed using several methods:
7070

7171
### Package Installation
7272

73-
**Bright Vision Core** (cecli + `bright_vision_core` + `bright-vision-core-serve`):
73+
**BrightVision Core** (cecli + `bright_vision_core` + `bright-vision-core-serve`):
7474

7575
```bash
7676
pip install bright-vision-core

bright_vision_core/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# bright_vision_core
22

3-
HTTP/SSE integration layer for **Bright Vision** on top of [cecli](https://github.com/dwash96/cecli). Ported from `aider_vision_core` — see [docs/LINEAGE.md](../docs/LINEAGE.md).
3+
HTTP/SSE integration layer for **BrightVision** on top of [cecli](https://github.com/dwash96/cecli). Ported from `aider_vision_core` — see [docs/LINEAGE.md](../docs/LINEAGE.md).
44

55
- `http_api.py` — FastAPI + SSE (`:8741`)
66
- `session.py` — headless async sessions

bright_vision_core/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
"""Bright Vision integration layer on top of cecli."""
1+
"""BrightVision integration layer on top of cecli."""
22

33
__all__ = ["__version__"]
44

bright_vision_core/brand.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1-
"""Product strings — keep aligned with outer ``src/brand.ts``."""
1+
"""
2+
Product identity — keep in sync with bright-vision/src/brand.ts
3+
"""
24

35
PRODUCT_VISION = "bright-vision"
46
PRODUCT_CORE = "bright-vision-core"
5-
DISPLAY_VISION = "Bright Vision"
6-
DISPLAY_CORE = "Bright Vision Core"
7+
8+
DISPLAY_VISION = "BrightVision"
9+
DISPLAY_CORE = "BrightVision Core"
710
DISPLAY_MONOGRAM = "BV"

bright_vision_core/http_api.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,10 +80,39 @@ async def dispatch(self, request: Request, call_next):
8080
_sessions: dict[str, Session] = {}
8181

8282

83+
class ModelPoolEntryModel(BaseModel):
84+
model: str = ""
85+
tier: str = Field(description="fast | heavy")
86+
enabled: bool = True
87+
label: str = ""
88+
89+
90+
class ModelRouterRequest(BaseModel):
91+
enabled: bool = False
92+
fast_model: str = Field(default="", description="Resolved fast tier (from hopper)")
93+
heavy_model: str | None = Field(
94+
default=None,
95+
description="Resolved heavy tier; defaults to session model",
96+
)
97+
model_pool: list[ModelPoolEntryModel] = Field(
98+
default_factory=list,
99+
description="Settings hopper: enabled models + tier",
100+
)
101+
token_fast_max: int = 4_096
102+
token_heavy_min: int = 12_000
103+
keep_alive_fast: int | str = 300
104+
keep_alive_heavy: int | str = 0
105+
escalate_on_failure: bool = True
106+
107+
83108
class CreateSessionRequest(BaseModel):
84109
workspace: str = Field(..., description="Absolute path to git workspace root")
85110
files: list[str] = Field(default_factory=list, description="Files to add to the chat")
86111
model: str | None = Field(default=None, description="LLM model name")
112+
model_router: ModelRouterRequest | None = Field(
113+
default=None,
114+
description="Optional local model tiering (fast vs heavy Ollama)",
115+
)
87116
stream: bool = True
88117
auto_yes: bool = Field(
89118
False,
@@ -110,6 +139,14 @@ class MessageRequest(BaseModel):
110139
False,
111140
description="When true with active_todo_id, prepend task spec to the message",
112141
)
142+
force_tier: str | None = Field(
143+
default=None,
144+
description="Override router: fast | heavy",
145+
)
146+
escalate_from_last: bool = Field(
147+
default=False,
148+
description="Force heavy tier (e.g. user clicked Escalate after a fast attempt)",
149+
)
113150

114151

115152
class ChecklistItemModel(BaseModel):
@@ -296,6 +333,9 @@ def health():
296333
@app.post("/sessions", response_model=SessionInfo)
297334
def create_session(body: CreateSessionRequest):
298335
try:
336+
router_payload = (
337+
body.model_router.model_dump() if body.model_router is not None else None
338+
)
299339
session = Session.create(
300340
body.workspace,
301341
files=body.files or None,
@@ -305,6 +345,7 @@ def create_session(body: CreateSessionRequest):
305345
auto_commits=body.auto_commits,
306346
dirty_commits=body.dirty_commits,
307347
dry_run=body.dry_run,
348+
model_router=router_payload,
308349
)
309350
except FileNotFoundError as err:
310351
raise HTTPException(status_code=404, detail=str(err)) from err
@@ -724,6 +765,8 @@ def generate():
724765
preproc=body.preproc,
725766
active_todo_id=body.active_todo_id,
726767
inject_todo_spec=body.inject_todo_spec,
768+
force_tier=body.force_tier,
769+
escalate_from_last=body.escalate_from_last,
727770
):
728771
yield _sse_pack(event)
729772
except (BrokenPipeError, ConnectionResetError) as err:

0 commit comments

Comments
 (0)