plano/crates
Adil Hafeez 321c28da37 fix: truncate oversized user messages in orchestrator routing prompt
The orchestrator trimmer had a bypass that kept the latest user message
whole even when it alone exceeded the configured token budget. This
caused brightstaff to send a ~500KB prompt to the Plano-Orchestrator
model, which rejected it with a 400 "context length exceeded" from the
upstream 32K-token window. Brightstaff then surfaced a confusing
"missing field id" parse error instead of the real upstream message.

Fix the bypass by trimming the overflowing user message from the end
toward the beginning until it fits in the remaining token budget. The
beginning of the message (where user intent usually lives) is preserved
and the tail is dropped. Added a UTF-8-safe byte-truncation helper and a
regression test that mirrors the production payload (a single ~500KB
user message with a small budget).
2026-04-17 18:00:02 -07:00
..
.vscode use standard tracing and logging in brightstaff (#721) 2026-02-09 13:33:27 -08:00
brightstaff fix: truncate oversized user messages in orchestrator routing prompt 2026-04-17 18:00:02 -07:00
common Zero-config planoai up: pass-through proxy with auto-detected providers (#890) 2026-04-17 13:11:12 -07:00
hermesllm planoai obs: live LLM observability TUI (#891) 2026-04-17 14:03:47 -07:00
llm_gateway fix: passthrough_auth accepts Anthropic x-api-key and normalizes to upstream format (#892) 2026-04-17 17:23:05 -07:00
prompt_gateway Rename all arch references to plano (#745) 2026-02-13 15:16:56 -08:00
build.sh Use mcp tools for filter chain (#621) 2025-12-17 17:30:14 -08:00
Cargo.lock Redis-backed session cache for cross-replica model affinity (#879) 2026-04-13 19:30:47 -07:00
Cargo.toml use standard tracing and logging in brightstaff (#721) 2026-02-09 13:33:27 -08:00