Repository navigation
feat(v22): medição vendor com cursor-agent e OpenRouter - #22
Merged
gaabdotdev merged 2 commits intoOct 24, 2026
Merged
Conversation
The primary live provider is the Cursor CLI. Official JSON exposes duration only, so provider tokens and cost stay NOT_MEASURED. OpenRouter is secondary, with a cheap default model and a US$2.50 ceiling. Co-authored-by: Gaab <GaabDevWeb@users.noreply.github.com>
tree_sha is the harness commit. The Cursor CLI estimate stays NOT_MEASURED because the official JSON has no cost field. Co-authored-by: Gaab <GaabDevWeb@users.noreply.github.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.
Summary
cursor-agent(headless). O schema oficial (https://cursor.com/docs/cli/reference/output-format, 2026-10-23) publicaresult,duration_mseduration_api_ms. Tokens e custo não existem nesse contrato e ficamNOT_MEASURED, mesmo se o processo emitir um objetousage.https://openrouter.ai/api/v1, com modelo defaultgoogle/gemini-2.5-flash-lite(US$0,10 / 1M entrada e US$0,40 / 1M saída, listado em 2026-10-23).cache_controlsó entra em modelosanthropic/*. O teto do script é US$2,50.npm run v22:vendor-measureaceita--provider cursor-agent|openrouter,N=5, saída curta (teto 300 tokens) e--dry-run. A chave fica só na env e nunca é impressa. O CI não chama provider.Comandos
Dry-run do Cursor, a partir de um clone limpo, sem chave:
Corrida real do Cursor:
Argv:
cursor-agent -p --output-format stream-json --mode ask --trust. O prompt vai no stdin. Se a instalação só tiveragent, useCURSOR_AGENT_BIN=agent.OpenRouter, dry-run e corrida real:
Estimativa
O JSON commitado é o dry-run do OpenRouter.
tree_shaa11dc3cecaeb7e77f3e2bdbc878fdf310e441be0(harness). Tip do JSON:7b1e67aab8638248e95a9fd42403f470a712d983.google/gemini-2.5-flash-lite)O teto de US$2,50 aplica-se só ao OpenRouter. O CLI do Cursor não publica custo, então a estimativa em dólares fica
NOT_MEASURED. Nenhuma chave foi usada.CI
Os dois runs no tip
7b1e67aconcluíram com sucesso, sem chaves de vendor.Test plan
npx vitest run tests/unit/v22-vendor-measure.test.ts tests/unit/v22-p0-baseline.test.ts tests/unit/vendor-cache-usage.test.tsnpx tsc --noEmitbash docs/architecture/v2.2/scripts/validate-v22-artifacts.sh