honcho/docs/v3
Vansh-Sharma27 e83ab842c1
fix(embedding): configurable tokenizer for non-OpenAI embedding models
The embedding client resolved every model's tokenizer through tiktoken,
silently falling back to cl100k_base for models tiktoken doesn't know
(e.g. baai/bge-m3). cl100k_base undercounts vs the model's real
tokenizer on technical/mixed text (runtime-measured +44% for bge-m3),
so prepare_chunks emits "within-limit" chunks the provider then rejects
with HTTP 400. The reconciler retries the unchanged payload 20 times
over ~3h, marks MessageEmbedding.sync_state='failed', and the message
is permanently excluded from vector search (search.py filters
embedding IS NOT NULL).

Add EMBEDDING_MODEL_CONFIG__TOKENIZER: unset keeps tiktoken
auto-detection (backwards compatible); tiktoken:<encoding>, hf:<repo>,
or file:<path> select an explicit tokenizer. HF/file tokenizers use the
optional honcho[tokenizers] extra. The HuggingFace adapter encodes
without special tokens and reserves the special-token overhead
([CLS]/[SEP]) from the chunk budget so provider-side counts stay
exactly within limit. Unknown models now log a warning pointing at the
new setting. Invalid specs raise ValidationException (repo-standard).
The singleton rebuild signature includes tokenizer so runtime config
changes take effect.

Runtime-verified end-to-end without a live provider: 24,360 chars of
technical text with bge-m3 went from 1 chunk (8,355 real tokens > 8,192
-> provider 400 -> failed) to 2 chunks (8,192 / 1,803, both within
limit).

Out of scope (noted for follow-up): recovery/reindex of existing failed
rows, scripts/generate_message_embeddings.py chunk-identity bug,
ConclusionCreate o200k_base validator alignment, typed
dimension-vs-token-limit exceptions, live-embedding CI matrix.

Fixes #827
2026-08-20 01:49:49 +05:30
..
api-reference chore(docs): SDK Updates (#867) 2026-07-02 13:00:14 -04:00
contributing fix(embedding): configurable tokenizer for non-OpenAI embedding models 2026-08-20 01:49:49 +05:30
documentation fix(filter): make the filter DSL reject bad input instead of 500ing, and fix negation over unset fields (#947) 2026-08-13 10:39:19 -04:00
guides docs: updating claude-codes with recent changes (#1021) 2026-08-14 17:39:14 -04:00
migrations sdks: add set peer card function (#371) 2026-02-09 15:35:57 -05:00
README.md feat: honcho 3.0, sdks 2.0, excise stainless, update v3 docs, changelogs (#331) 2026-01-22 15:16:28 -05:00
openapi.json August Changelog Docs Sync (#1009) 2026-08-12 17:35:51 -04:00

README.md

This subdirectory contains the peer-paradigm documentation for Honcho (Honcho v2.0.0 onwards).