harness(openai): populate profile context window from the hint table#36
Conversation
derive_profile left max_input_tokens None, so SummarizationPolicy::from_profile saw no window and context-window-aware compaction fell back to a fixed generic threshold. Source it from context_window_for_model_id (stays None for unrecognized ids, so nothing is guessed).
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 34 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe ChangesContext Window Population in derive_profile
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related issues
Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Comment |
collapsible_if in StreamAccumulator::push_tool_chunk and a duplicated #[cfg(test)] on the stream test module both fail CI's cargo clippy --all-targets -- -D warnings under rust 1.96. Behavior-neutral.
|
CI guardian: the |
Summary
derive_profilenever populatedmax_input_tokens, so everyOpenAiModel/ OpenAI-compatible preset advertisedmax_input_tokens: None.SummarizationPolicy::from_profilereads the window from that field, so context-window-aware compaction fell back to a fixed generic threshold instead of the model's real window — trimming on the wrong boundary or overflowing.Change
Populate
max_input_tokensinderive_profilefrom the existing provider-neutralcontext_window_for_model_id(model)hint table (staysNonefor unrecognized ids, so nothing is guessed). No other profile fields change.Tests
derive_profile_populates_known_context_windows(known ids resolve their window; unknown staysNone).cargo fmt --check,cargo clippy --lib --tests -- -D warnings, andcargo test --liball pass.Closes tinyhumansai/openhuman#4634
Summary by CodeRabbit