Skip to content

Make long-context pricing warnings server-driven#12227

Draft
dagmfactory wants to merge 7 commits into
masterfrom
dagm/correct-tiered-billing
Draft

Make long-context pricing warnings server-driven#12227
dagmfactory wants to merge 7 commits into
masterfrom
dagm/correct-tiered-billing

Conversation

@dagmfactory
Copy link
Copy Markdown
Contributor

@dagmfactory dagmfactory commented Jun 4, 2026

Description

Make configurable context windows and long-context pricing warnings server-driven.

  • consume server-advertised context-window bounds and per-model pricing thresholds instead of the client GPT rollout flag/hard-coded threshold
  • persist cumulative per-model long_context_used metadata through live updates, restore, and shared-session replay
  • show a fully lit yellow footer context icon and multiline OpenAI pricing warning only when the active configurable OpenAI model actually used long-context pricing
  • update the multi-agent proto dependency and conservatively initialize unrelated newer proto fields

Deployment order: deploy the corresponding warp-server GraphQL/model metadata and billing changes before shipping this client. Related changes: warp-server#11673, warp-server#11678, and warp-proto-apis#319.

Linked Issue

  • The linked issue is labeled ready-to-spec or ready-to-implement.
  • Where appropriate, screenshots or a short video of the implementation are included below (especially for user-visible or UI changes).

No linked issue.

Testing

  • ./script/format
  • cargo clippy --locked -p warp --all-targets --all-features --tests -j 10 -- -D warnings
  • cargo test --locked -p warp -j 10 long_context -- --nocapture
  • cargo test --locked -p persistence -j 10 model_token_usage -- --nocapture
  • git diff --check
  • I have manually tested my changes locally with ./script/run

Integration coverage was not added; focused unit regressions cover server-driven thresholds, active-model attribution, custom endpoint exclusion, persistence, restore, and replay behavior.

Screenshots / Videos

Final screenshots for the latest warning/normal states should be attached before marking ready for review. Iterative screenshots and review context: https://staging.warp.dev/conversation/92de2f7b-4e87-4e54-9c40-4ab72dd0b6ba

Agent Mode

  • Warp Agent Mode - This PR was created via Warp's AI Agent Mode

Related PRs: warpdotdev/warp-proto-apis#319 | https://github.com/warpdotdev/warp-server/pull/11673 | #12227

Loom

https://www.loom.com/share/2dd5937596c1469c9550b4afdb56dc8a

CHANGELOG-IMPROVEMENT: Added configurable context windows for eligible models and a warning when OpenAI long-context pricing is applied.

Co-Authored-By: Oz oz-agent@warp.dev

- removed GPTConfigurableContextWindow flag so that server controls behavior
- server determines and sends long context threshold instead of hardcoding on client
…-billing

# Conflicts:
#	crates/warp_features/src/lib.rs
@cla-bot cla-bot Bot added the cla-signed label Jun 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant