Repository navigation
throttle scan: a 30-second, no-key first run (0.8.0) - #94
Merged
Merged
Conversation
CallSite gains max_tokens (literal max_tokens, max_completion_tokens, max_output_tokens, maxTokens or maxOutputTokens). It is not part of the job id, approval key or saved JSON. scan_dir now uses os.walk and never enters node_modules, virtualenvs or the other SKIP_DIRS, so large repos scan in seconds. Results are unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
throttle scan [PATH] finds every OpenAI and Anthropic call in the code, prices each at list price per 1,000 calls (or per month with --calls-per-day), and names up to two cheaper models to test: one tier down from the same provider, then the other provider's model at a similar price. No API key, no network, no traffic, no writes. Every dollar figure is labelled ESTIMATE (list price x an ASSUMED 1,000 tokens in and 300 out per call, or --tokens-in/--tokens-out; a literal max_tokens caps the output). Every cheaper model is UNTESTED. Runtime models and models missing from the price table are listed, not priced. It ends with the capture/shadow/eval/report commands that test the first pick on real traffic. --json prints schema throttle.own.scan/1. Listed first in throttle --help, the welcome screen, the README and the console docs (new page getting-started/scan). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- README and docs no longer run `throttle scan` after pinning 0.7.0, which does not have it. The README says it ships in 0.8.0 (FIRST_RELEASE); a test makes the release put it in the pinned block. - Tests, specs, examples, evals and benchmarks are left out of the totals (--all puts them back). The headline cut says it weights every call site the same. - Finds client.messages.create(**params) in files that import anthropic, with_raw_response / with_streaming_response calls, and reads model and prompt from a **params dict literal (4 calls missed in anthropic-quickstarts). A local streamText(part.text) is no longer a call. - Prices a runtime model from a literal default in the code (getenv, environ.get, .get, `or`, `??`, `||`, parameter defaults), labelled "(default)", and from a new --model NAME flag, labelled "(--model)". When calls set the model at runtime, says how to price them. - Older and other-provider models say so instead of the generic message. No legacy prices added: the current OpenAI and Anthropic price pages no longer list gpt-4-turbo, gpt-3.5-turbo or Claude 3 models. - Table: priced calls only, most expensive first, up to 15; locations cut from the left so file:line stays; the cap * survives long names; legend only with candidates; expressions on one line; "Not priced" folded by file and reason; no CHANGE column under 50 columns. - Skips files without an AI call word before parsing (LibreChat 20s -> 5s). - Next steps for a Claude pick use Anthropic's OpenAI-compatible endpoint and ANTHROPIC_API_KEY; repos with no OpenAI calls get a Claude judge. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Today the first useful run needs a proxy, a candidate model, a judge key and traffic.
throttle scan .needs none of them.--allrestores),--modelprices runtime-set models,--calls-per-daygives $/month,--json(schema throttle.own.scan/1).messages.create(**params)andwith_raw_responsecalls now (noted in CHANGELOG: such jobs get a new approval key).pip install "throttle-pro==0.8.0"thenthrottle scan ..Built by an agent, adversarially reviewed against six real repos, fixed. Tests: 1392 passed locally.
🤖 Generated with Claude Code