Skip to content

core: add configurable <context_window_guidance> message - #29936

Merged
bolinfest merged 1 commit into
mainfrom
pr29936
Jun 25, 2026
Merged

core: add configurable <context_window_guidance> message#29936
bolinfest merged 1 commit into
mainfrom
pr29936

Conversation

@bolinfest

@bolinfest bolinfest commented Jun 25, 2026

Copy link
Copy Markdown
Collaborator

Why

This PR adds a configurable <context_window_guidance> developer section immediately after <context_window>. Harness integrations need this section to give the model deployment-specific instructions for preparing for context-window transitions.

What changed

  • Add an optional features.token_budget.guidance_message config with a 1,000-byte runtime cap and generated schema support.
  • Render configured guidance as a developer ContextualUserFragment wrapped in <context_window_guidance> immediately after <context_window>.
  • Omit the section when guidance is unset, empty, or whitespace-only.
  • Preserve the resolved value in config locks and classify persisted guidance as contextual developer content.
  • Add integration coverage for rendered content and ordering.

@bolinfest
bolinfest requested a review from a team as a code owner June 25, 2026 00:49
@bolinfest
bolinfest requested a review from rka-oai June 25, 2026 00:57
@bolinfest bolinfest changed the title core: add context window guidance config core: add configurable <context_window_guidance> message Jun 25, 2026
@bolinfest
bolinfest merged commit f15df62 into main Jun 25, 2026
31 checks passed
@bolinfest
bolinfest deleted the pr29936 branch June 25, 2026 01:03
@github-actions github-actions Bot locked and limited conversation to collaborators Jun 25, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants