Commit Graph

16 Commits

Author SHA1 Message Date
teknium1 3f59b5c594 refactor(agent): /context breakdown and native-compaction retention use the canonical token estimator
context_breakdown._chars_to_tokens and native_compaction._approx_tokens did raw
chars//4, under-counting CJK/Cyrillic by 2-4x next to the conversation slice
that already used estimate_tokens_rough — the /context pie chart mixed two
estimators. Both now call the canonical. The four private `= 4` ratio
constants import one CHARS_PER_TOKEN from agent/model_metadata.py. Estimates
only feed UI and budgets; no prompt or message bytes change.
2026-09-13 05:09:43 -07:00
Teknium 62732c7d8b simplify(compat): tools/transcription_tools — drop 47 re-exports/aliases, repoint 4 callers + 9 test files 2026-09-03 13:17:25 -07:00
Teknium e83816a4d1 review-fix(comments): restore lost #NNNN rationale comments across non-test source (mechanical sweep, condensed, code unchanged)
For each issue anchor present in BASE 63279301bc non-test .py and absent on HEAD, the BASE comment/docstring block was re-attached at the HEAD location of the code it explained (matched by the distinctive code line / enclosing def). Sentences already covered by an existing HEAD comment were deduped; the issue number always survives. Insert-only: no code lines changed.
2026-09-03 09:44:26 -07:00
Teknium ff44eca74f refactor(tools): compact STT module docstrings and section banners, keep every invariant 2026-09-03 01:13:03 -07:00
Teknium 412ddb6772 refactor(tools): drop unreachable legacy TTS strip fallback and duplicated streamer sample rates; STT/TTS config wrappers as partials 2026-09-03 00:57:29 -07:00
Teknium d85b86e97a refactor(tools): AST-neutral closer/bracket hug pass over STT/TTS modules 2026-09-03 00:53:14 -07:00
Teknium 97b554f200 refactor(tools): fold command/plugin STT and audio prep bodies — inline single-use locals, merged guards, squeezed blanks 2026-09-03 00:48:24 -07:00
Teknium 7ed48064db refactor(tools): compact STT/TTS docstrings and comments, keep every invariant 2026-09-02 23:11:57 -07:00
Teknium d34703fa86 refactor(tools): AST-neutral layout compaction of STT/TTS modules 2026-09-02 22:45:22 -07:00
Teknium 4d37eddc2f refactor(tools): unify STT/TTS command-provider config helpers, REST STT flow, dispatch tables 2026-09-02 22:41:57 -07:00
Teknium d7cdfbc36b refactor(stt): openai-availability reason helper, one-line section banners, docstring compaction 2026-09-02 16:12:29 -07:00
Teknium 60aa491f3d refactor(stt): local backend detection helper, CPU-eviction helper, module docstrings and import packing 2026-09-02 16:10:20 -07:00
Teknium 5844839639 refactor(stt): fold no-provider error tail, drop _normalize_local_command_model alias, compact dispatcher call sites 2026-09-02 15:59:38 -07:00
Teknium a4f17d7a4b refactor(stt): shared REST transcript helper, flatten command-provider except ladder and hook override loop 2026-09-02 15:56:00 -07:00
Teknium bf427a20a1 refactor(stt): collapse duplicate validators/process-error detail/CAF converter, managed-gateway helper, read-block guard 2026-09-02 15:52:30 -07:00
Teknium 282e63f81c refactor(stt): split transcription_tools into common/audio/local/cloud/command sibling modules (re-imported into origin) 2026-09-02 15:36:59 -07:00