feat: Fairly trim skill descriptions within context budget (#18925)

Preserve skill name/path entries whenever possible and trim descriptions
first, using round-robin character allocation so short descriptions do
not waste budget.
This commit is contained in:
xl-openai
2026-04-22 12:33:29 -07:00
committed by GitHub
parent ddde50c611
commit b77791c228
6 changed files with 587 additions and 50 deletions

View File

@@ -324,7 +324,7 @@ async fn turn_start_emits_thread_scoped_warning_notification_for_trimmed_skills(
assert_eq!(warning.thread_id.as_deref(), Some(thread.id.as_str()));
assert_eq!(
warning.message,
"Some enabled skills were not included in the model-visible skills list for this session. Mention a skill by name or path if you need it."
"Warning: Exceeded skills context budget of 2%. All skill descriptions were removed and 7 additional skills were not included in the model-visible skills list."
);
timeout(