Skip to content

developer: use server passage budget from search#843 - #194

Open
PhantomInTheWire wants to merge 2 commits into
mainfrom
remove-cuts-search-843
Open

developer: use server passage budget from search#843#194
PhantomInTheWire wants to merge 2 commits into
mainfrom
remove-cuts-search-843

Conversation

@PhantomInTheWire

@PhantomInTheWire PhantomInTheWire commented Aug 18, 2026

Copy link
Copy Markdown
Member

Summary

  • send search#843's passage_budget on every developer-search request
  • expose --passage-budget and pass custom values through to the server
  • stop clipping readable passage output when passage_budget_applied is present
  • retain the 1,200-character formatter fallback when that response field is absent, so old servers and rollout-off responses stay bounded

The default is 4,096 approximate tokens. The old formatter capped each result's joined passages at 1,200 characters (about 300 tokens), or about 3,000 passage tokens across the default 10 results; 4,096 preserves that intent with allocation headroom.

The fallback has a TODO to remove after firecrawl/search#843 is enabled everywhere.

Verification

  • pnpm run format:check
  • pnpm run type-check
  • pnpm run build
  • pnpm run test (424 passed)

Summary by cubic

Delegate passage sizing for developer search to the server and add a --passage-budget flag. Previously readable output clipped passages to 1,200 characters; now the CLI sends a token budget and only clips locally when the server omits budget metadata. Default is 4,096 tokens.

  • Add passage_budget to all /v2/search/developer requests (default 4096; range 256–16384); --passage-budget passes through and is validated, rejecting out-of-range or non-integer values.
  • Skip local truncation when passage_budget_applied is present; keep the 1,200-character fallback for older servers.
  • Update CLI help, README examples, and tests to cover the flag, validation, and new formatting behavior.

Written for commit f3712e9. Summary will update on new commits.

Review in cubic

@PhantomInTheWire

Copy link
Copy Markdown
Member Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 18, 2026

Copy link
Copy Markdown

@cubic-dev-ai review

@PhantomInTheWire I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All reported issues were addressed across 6 files

Reply with feedback, questions, or to request a fix.

Fix all with cubic | Re-trigger cubic

Comment thread src/index.ts
@PhantomInTheWire

Copy link
Copy Markdown
Member Author

@cubic-dev-ai review

@cubic-dev-ai

cubic-dev-ai Bot commented Aug 18, 2026

Copy link
Copy Markdown

@cubic-dev-ai review

@PhantomInTheWire I have started the AI code review. It will take a few minutes to complete.

@cubic-dev-ai cubic-dev-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 6 files

Re-trigger cubic

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant