Skip to content

Commit e954df5

Browse files
Pass context_thresholds and on_context_threshold through setup_backend (#22)
These params were added to ContextManager but not exposed via setup_backend(), which is the standard consumer entry point. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent cbb5d2f commit e954df5

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/forge/server.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -412,6 +412,8 @@ async def setup_backend(
412412
cache_type_k: str | None = None,
413413
cache_type_v: str | None = None,
414414
n_slots: int | None = None,
415+
context_thresholds: list[float] | None = None,
416+
on_context_threshold: Callable[[int, int, float], str | None] | None = None,
415417
) -> tuple[ServerManager, ContextManager]:
416418
"""One-call setup: start backend, resolve budget, create ContextManager.
417419
@@ -467,5 +469,7 @@ async def setup_backend(
467469
),
468470
budget_tokens=budget,
469471
on_compact=on_compact,
472+
context_thresholds=context_thresholds,
473+
on_context_threshold=on_context_threshold,
470474
)
471475
return server, ctx_manager

0 commit comments

Comments
 (0)