Add docs/GENERATOR_METADATA.md GetCascadeTrajectoryGeneratorMetadata RPC for context token usage - #17
Add docs/GENERATOR_METADATA.md GetCascadeTrajectoryGeneratorMetadata RPC for context token usage#17Zen0-99 wants to merge 2 commits into
Conversation
…data RPC for context token usage
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds a new documentation file describing the GetCascadeTrajectoryGeneratorMetadata RPC, its request/response schema, token-usage chain, context-usage calculation, and Connect-RPC invocation details. ChangesGenerator Metadata Documentation
Estimated code review effort: 1 (Trivial) | ~5 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/GENERATOR_METADATA.md`:
- Around line 23-29: The markdown fence in GENERATOR_METADATA.md is missing a
language tag and is triggering MD040. Update this fence and the other bare code
fences in the document to use an explicit language such as text or bash, and
keep the content unchanged. Use the existing fenced blocks around the cascade
flow examples as the places to update.
- Around line 149-151: The metadata paragraph is pointing readers to the wrong
source for per-model context limits; update the reference in the docs to use
GetCascadeModelConfigs and its max_tokens field instead of
GetUserStatus/cascade_model_config_data.client_model_configs[] in
GENERATOR_METADATA.md. Keep the guidance aligned with the existing model-catalog
terminology and mention the correct symbol names so readers can locate the
source of the per-model limit.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: d6cb7eaf-e050-4e32-9877-6d4b55850959
📒 Files selected for processing (1)
docs/GENERATOR_METADATA.md
- Discover max_context_tokens via GetCascadeModelConfigs / max_tokens - Add language tags to all code fences to fix markdownlint MD040
What
Documents the GetCascadeTrajectoryGeneratorMetadata RPC, which is the endpoint the IDE uses to populate the context-usage indicator (e.g. \63% (125K / 200K)) shown in the Cascade UI.
This RPC is not covered in the existing CASCADE_PROTOCOL.md or WINDSURF_API_SPEC.md. The trajectory steps endpoint (GetCascadeTrajectorySteps) returns content only token counts live in this separate metadata stream.
Key findings
Schema included
Full field tables for:
Verification
Tested with a simple message \input_tokens=1719\ for a trivial prompt, consistent with system prompt + context overhead.
Summary by CodeRabbit