honcho/src
Ken Weiner 5823f0fae9
fix: only classify genuine oversize input as a token-limit error (#791)
Callers wrapped every ValueError from the embedding client in a
"exceeds maximum token limit" message, so provider and configuration
failures (dimension mismatch, empty response, upstream error) surfaced
to users as though their input were too long.

Add EmbeddingTokenLimitError, raised only by the pre-flight token checks
in embed() and simple_batch_embed(), and narrow the remaps in search.py,
agent_tools.py, document.py and representation.py to catch it. It
subclasses ValueError so existing broad handlers keep working.

Both simple_batch_embed() remap sites pass on_oversize="truncate" and so
could never raise a token-limit error at all; their handlers only ever
mislabelled provider failures.

Fixes #568

Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
2026-08-25 09:45:01 -04:00
..
cache fix: redact Redis password from cache connection logs (#869) 2026-07-24 12:54:31 -04:00
crud fix: only classify genuine oversize input as a token-limit error (#791) 2026-08-25 09:45:01 -04:00
deriver feat(telemetry): add physical DB-connection metrics 2026-08-24 14:35:51 -04:00
dialectic feat: Add workspace-level chat (#931) 2026-08-24 15:54:23 -04:00
dreamer Scopes Phase 2a: scope-kind peers, guardrails, and scopes CRUD routes (#884) 2026-08-12 16:21:40 -04:00
llm fix(llm): preserve reasoning content across tool turns (#1034) 2026-08-20 11:12:47 -04:00
reconciler fix(embedding): truncate in batch embed and return results breakdown (#1019) 2026-08-20 11:42:38 -04:00
routers feat: Add workspace-level chat (#931) 2026-08-24 15:54:23 -04:00
schemas feat: Add workspace-level chat (#931) 2026-08-24 15:54:23 -04:00
startup Make embeddings configurable (#678) 2026-05-14 15:03:35 -04:00
telemetry review: fix db_connections_open leak on the detach path; comment/doc polish 2026-08-24 14:37:20 -04:00
utils fix: only classify genuine oversize input as a token-limit error (#791) 2026-08-25 09:45:01 -04:00
vector_store fix: reduce Honcho runtime image size (#1014) 2026-08-12 19:55:41 -04:00
webhooks Tighten Transaction Scopes (#525) 2026-04-08 11:14:50 -04:00
__init__.py v0.0.8 Documentation Updates (#55) 2024-05-15 00:07:25 -04:00
_version.py feat: add new cloudevents for api routes (#637) 2026-05-20 18:25:30 -04:00
config.py telemetry: zero-initialize bounded-label metrics so an absent series means a broken scrape (#927) 2026-08-20 10:24:49 -04:00
db.py review: fix db_connections_open leak on the detach path; comment/doc polish 2026-08-24 14:37:20 -04:00
dependencies.py add read db (#773) 2026-06-10 13:28:36 -04:00
embedding_client.py fix: only classify genuine oversize input as a token-limit error (#791) 2026-08-25 09:45:01 -04:00
exceptions.py fix(embedding): truncate in batch embed and return results breakdown (#1019) 2026-08-20 11:42:38 -04:00
main.py feat(telemetry): add physical DB-connection metrics 2026-08-24 14:35:51 -04:00
models.py Make embeddings configurable (#678) 2026-05-14 15:03:35 -04:00
security.py Fix scoped JWTs (#679) 2026-06-22 17:30:00 -04:00