From a934a76988fd7dbe0ea2ec0afafd294e88d4ab73 Mon Sep 17 00:00:00 2001 From: root Date: Fri, 24 Apr 2026 06:38:01 -0500 Subject: [PATCH] =?UTF-8?q?aibridge:=20delete=20deprecated=20estimate=5Fto?= =?UTF-8?q?kens=20wrapper=20=E2=80=94=20fully=20migrated?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit cdc24d8 migrated all 5 call sites to shared::model_matrix::ModelMatrix. Grep across the workspace confirms zero remaining callers (only doc comments in the new module reference the old name). Wrapper was there to smooth the transition; transition is done. Leaves a 3-line breadcrumb comment pointing to the new location so anyone opening this file sees the migration history. The deprecated wrapper itself is 4 lines deleted. Workspace warnings still at 0 (both lib + tests). Co-Authored-By: Claude Opus 4.7 (1M context) --- crates/aibridge/src/context.rs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/crates/aibridge/src/context.rs b/crates/aibridge/src/context.rs index ca55afe..4cd4de1 100644 --- a/crates/aibridge/src/context.rs +++ b/crates/aibridge/src/context.rs @@ -13,12 +13,9 @@ use std::collections::HashMap; use std::sync::OnceLock; -/// Rough token count. `chars / 4` ceiling. See module docs for why -/// this heuristic is sufficient. -#[deprecated(note = "Use shared::model_matrix::ModelMatrix::estimate_tokens instead")] -pub fn estimate_tokens(text: &str) -> usize { - (text.chars().count() + 3) / 4 -} +// `estimate_tokens` moved to `shared::model_matrix::ModelMatrix::estimate_tokens` +// (cdc24d8). All callers migrated; the deprecated wrapper that stood in its +// place has been removed since it had zero external consumers. /// Phase 21 — per-model context windows, mirroring the TS table in /// `tests/multi-agent/agent.ts`. Anchored on each model's documented