Aleksey Shakhmatov 93e526af72 fix: cap overview table list and surface friendly prompt-overflow message
Two changes that together kill the "prompt is too long: 1991577 tokens"
crash on large Greenplum catalogs.

1. Overview table cap (build_overview_postgres):
   The agent re-injects the full overview into the system prompt every
   turn. On a multi-thousand-table catalog (typical for GP data lakes)
   this was megabytes per call and quickly overran even Kimi-K2's 256K
   window. Now we list at most 400 tables and replace the rest with
   per-schema counts plus a hint to call list_tables for specifics.

2. Friendly Fireworks-400 rewrite:
   Detect "prompt is too long" / "maximum context length" in the
   Fireworks 400 body and turn it into an actionable message asking
   the user to /compact, instead of leaking raw API JSON to the chat.
2026-05-07 00:12:37 +03:00
Description
No description provided
3.5 MiB
Languages
TypeScript 63.1%
Rust 33.5%
CSS 2.4%
Makefile 0.8%
JavaScript 0.1%