Commit Graph

43 Commits

Author SHA1 Message Date
Allen Zhou c52126f198 Keep agent config validation strict 2026-05-05 15:58:10 -07:00
Allen Zhou 07614ec3b7 Add response-only harness support 2026-05-05 15:37:24 -07:00
Jude Gao 660ea3ea20 [CLI] Remove auto-retry of non-model failures (#118) 2026-04-24 21:52:45 -04:00
Jude Gao 481637dd6e Auto-retry non-model failures with configurable retry rounds (#110) 2026-04-14 23:26:27 -04:00
Allen Zhou 097490384c asserting agent behavior 2026-02-20 13:59:49 -08:00
Jude Gao 065afc909f Revert "[Classifier] Add "eval" failure type for flawed eval tests (#79)" (#82)
This reverts commit 683e681b7d.
2026-02-17 17:10:37 -08:00
Jude Gao 683e681b7d [Classifier] Add "eval" failure type for flawed eval tests (#79) 2026-02-17 16:28:03 -08:00
Jude Gao be7ca1560e [Agents] Add Cursor CLI agent with direct API support (#73)
* [Agents] Add Cursor CLI agent with direct API support

Add Cursor CLI as a new agent to the eval framework, enabling testing against Cursor models using direct API access via `CURSOR_API_KEY`. The implementation follows the established pattern from existing agents (Claude Code, Codex, Gemini) and integrates seamlessly with the sandbox infrastructure.

Cursor CLI uses a different interaction model than other agents. Unlike the `agent chat` subcommand syntax, the correct invocation is to pass the prompt as the first positional argument, then use the `--print` flag to enable non-interactive mode (required for scripts and headless execution). The `--force` flag is added to automatically approve all CLI operations without waiting for user confirmation. This combination ensures the agent completes successfully in sandboxed environments without hanging on interactive prompts.

The agent installation uses Cursor's official shell-based installation method (`curl https://cursor.com/install -fsSL | bash`), which handles proper setup of the CLI environment. Once installed, prompts are executed as `agent "<prompt>" --print --force`, capturing both stdout and stderr as output. The implementation includes transcript extraction that filters for JSON-formatted events when available, falling back to raw text output if no structured format is detected. This matches the approach used by other agents but adapts to Cursor's plain-text output characteristics.

The agent uses `composer-1.5` as the default model and integrates with all eval framework features including file capture, script validation, and test execution. Integration tests verify both basic eval execution and result output structure matching. The agent is fully typed in the framework's type system and added to the configuration schema alongside other direct-API agents.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>

* Fix missing --model and --output-format flags, update env var docs

- Pass --model to Cursor CLI so user-configured model is actually used
- Add --output-format stream-json for structured JSONL transcripts
- Update changeset to reflect correct default model (composer-1.5)
- Add GEMINI_API_KEY and CURSOR_API_KEY to README env var table

---------

Co-authored-by: Claude Haiku 4.5 <noreply@anthropic.com>
2026-02-12 15:08:22 -05:00
Jude Gao 8f198d4d18 [Agents] Add Gemini CLI agent with direct API and stream-json transcript support (#71) 2026-02-12 14:15:34 -05:00
Paolo Ricciuti fc91cfb7e2 Merge pull request #64 from vercel-labs/save-changed-files
fix: use git to get changes files
2026-02-11 21:56:10 +01:00
copilot-swe-agent[bot] 1b07100d3c docs: remove "When to use" section from copyFiles docs
Co-authored-by: paoloricciuti <26281609+paoloricciuti@users.noreply.github.com>
2026-02-11 20:54:53 +00:00
copilot-swe-agent[bot] 08505b5cc1 docs: document copyFiles configuration option
Co-authored-by: paoloricciuti <26281609+paoloricciuti@users.noreply.github.com>
2026-02-11 20:49:57 +00:00
Jude Gao cf50218fe2 Make failure classifier optional (#65) 2026-02-11 15:22:13 -05:00
Jude Gao 2b953ea015 Overhaul README with run-all, fingerprinting, classification, and housekeeping (#46)
Rewrites the README to document all features added in v0.3.0:
default run-all behavior, --smoke/--force flags, content fingerprinting
and result reuse, AI failure classification, auto-retry, and
housekeeping. Fixes outdated result file paths and summary.json format.
2026-02-08 00:40:57 -05:00
Jude Gao b841c01306 Add failure classification and auto-retry support (#40)
New classifier.ts module classifies failed evals as model, infra, or
timeout. Rule-based fast path catches ~80% of cases (timeout errors,
missing transcripts, rate limits, tiny transcripts with API errors).
Falls back to AI classification via gateway(anthropic/claude-sonnet-4-5)
with sandboxed read-only tools. Gracefully degrades to rule-based only
when AI_GATEWAY_API_KEY is not set.

shouldRetry() returns true when all failures are non-model, enabling
auto-retry of infra-failed evals.

summary.json now supports classification and valid fields. Results
marked valid: false are excluded from fingerprint reuse.
2026-02-08 00:17:03 -05:00
Allen Zhou 08499abc1b fix playground ts error 2026-02-06 17:52:30 -08:00
Allen Zhou af3df35ecc Merge pull request #20 from vercel-labs/copilot/update-readme-experimentconfig
Document ExperimentConfig model arrays and editPrompt usage
2026-02-06 14:03:09 -08:00
Allen Zhou bffe684d97 docs 2026-02-06 13:53:46 -08:00
Allen Zhou c7fa6a15fa Apply suggestion from @allenzhou101 2026-02-06 13:41:17 -08:00
copilot-swe-agent[bot] 10dbc8fc3a docs: clarify ExperimentConfig options
Co-authored-by: paoloricciuti <26281609+paoloricciuti@users.noreply.github.com>
2026-02-06 20:09:57 +00:00
Allen Zhou 27bfad6346 docs 2026-02-05 14:43:49 -08:00
Jude Gao be0ea788b4 Add CONTRIBUTING.md (#15) 2026-02-05 12:57:53 -05:00
Jude Gao 474991cb5a Remove AI SDK harness agent (#11) 2026-02-05 12:10:09 -05:00
Jude Gao 59826e7b9a [Agents] Add AI SDK Harness for evaluating any AI Gateway model (#8) 2026-02-03 19:10:44 -05:00
Jude Gao 4b2040f190 chore: change default timeout from 5 minutes to 10 minutes 2026-02-03 15:49:12 -05:00
Jude Gao 6844159ca7 [OpenCode] Fix model format and Docker file permissions for agent compatibility (#7)
OpenCode requires the vercel/ prefix in model strings (e.g., vercel/minimax/minimax-m2.1)
because the agent's opencode.json config sets up a vercel provider.

Also fixes Docker sandbox file permissions by adding chown after uploadFiles.
2026-02-03 15:14:30 -05:00
Jude Gao c22a5183d2 fix: use correct provider/model format for OpenCode models 2026-02-03 11:45:08 -05:00
Jude Gao f00bbe8b9b docs: add OpenCode model configuration section 2026-02-03 11:23:17 -05:00
Jude Gao c542f883aa feat: add OpenCode agent with Vercel AI Gateway support
Add OpenCode as a new agent option for running evals. OpenCode uses
Vercel AI Gateway for model access and supports non-interactive
execution via `opencode run` command.

- Add src/lib/agents/opencode.ts with full agent implementation
- Register agent in index.ts as 'vercel-ai-gateway/opencode'
- Add type to AgentType union in types.ts
- Add validation in config.ts schema
- Add integration tests for OpenCode sandbox execution
- Update README.md with OpenCode documentation
2026-02-03 11:01:26 -05:00
Jude Gao 9cf4477c1a feat: support EVAL.tsx for JSX-based test files
- Add EVAL.tsx to TEST_FILE_PATTERNS and EXCLUDED_FILES
- Update fixture validation to accept either EVAL.ts or EVAL.tsx
- Remove *.test.tsx and *.test.ts from TEST_FILE_PATTERNS
- Document EVAL.ts vs EVAL.tsx convention in README with examples
- Bump version to 0.0.2

This allows using React Testing Library and other JSX-based testing
approaches in eval fixtures.

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-28 22:40:30 -05:00
Jude Gao f6727dcc3a chore: prepare for publish as @vercel/agent-eval
- Update package name from agent-eval to @vercel/agent-eval
- Fix version test to read dynamically from package.json
- Update integration tests to load from .env.local
- Update README with @vercel/agent-eval usage
- Clarify Vercel employee setup instructions
- Fix lint error in runner.test.ts

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-01-28 20:10:22 -05:00
Jude Gao 19b56cfac7 chore: move to vercel-labs/agent-eval as initial release
- Rename package from @judegao/eval to agent-eval
- Reset version to 0.0.1
- Update all imports, templates, and docs to use new package name
- Point repository and git remote to vercel-labs/agent-eval
- Fix duplicate evals keys in README config example
- Rewrite environment variables docs with summary table
- Add Vercel employees section for vc env pull workflow

Co-Authored-By: Claude (claude-fudge-eap-cc) <noreply@anthropic.com>
2026-01-28 19:38:48 -05:00
Jude Gao 673a860ea2 fix: v1.1.1 - use npx agent-eval instead of npm run eval
Remove the `eval` npm script from generated projects and update all
docs/tests to use `npx agent-eval` directly, eliminating the confusing
`--` separator needed with `npm run`. Also sync cli.ts version to 1.1.1
and fix stale integration test assertion for removed scripts field.
2026-01-27 23:59:59 -05:00
Jude Gao 79f1c82f67 feat: v1.1.0 - support direct API keys as alternative to AI Gateway
- Add support for direct ANTHROPIC_API_KEY and OPENAI_API_KEY authentication
- New agent naming: 'vercel-ai-gateway/claude-code' vs 'claude-code' for direct
- Change default model to opus
- Add ESLint configuration
- Add runner tests
- Clean up legacy agent.ts code
- Update README with dual authentication documentation
2026-01-27 23:16:05 -05:00
Jude Gao bd5bb962b2 feat: v1.0.0 - AI Gateway integration and multi-agent support
- Add Codex CLI agent alongside Claude Code
- Route all agents through Vercel AI Gateway (single API key)
- Extract shared agent utilities to reduce duplication
- Simplify model types (accept any string, let CLI validate)
- Remove list command (use --dry instead)
- Update README for framework authors and A/B testing
2026-01-27 18:01:50 -05:00
Jude Gao 057c9f6faa Add ./ prefix to relative paths in result.json
Update transcriptPath and outputPaths to use explicit relative paths
(./transcript.jsonl, ./outputs/*.txt) for clarity.

- Update results.ts path generation
- Update test expectations
- Update README documentation
- Bump version to 0.1.12
2026-01-26 23:53:41 -05:00
Jude Gao 3760030255 fix: save script/test outputs to outputs/ directory
- outputs/ contains tests.txt, build.txt, etc. (not generated files)
- result.json includes paths: transcriptPath and outputPaths
- Update README to reflect correct output structure
- Bump version to 0.1.10
2026-01-26 23:15:05 -05:00
Jude Gao 8e808aef28 docs: update README to match result format design 2026-01-26 22:51:54 -05:00
Jude Gao 92290dd74d Fix ASCII box alignment in README 2026-01-26 22:37:47 -05:00
Jude Gao 6f4d0531fb Fix formatting issues in README.md 2026-01-26 22:14:03 -05:00
Jude Gao 3b54349adb Polish README: add requirements, document agent field, clarify test upload, add token setup links 2026-01-26 21:49:35 -05:00
Jude Gao 5a6050be75 Simplify CLI: remove unnecessary flags, keep only --dry 2026-01-26 21:41:30 -05:00
Jude Gao de2c709d5c Add README and fix results-dir to resolve from cwd 2026-01-26 21:38:39 -05:00