feat: unify llm-judge and agent-judge, add agentv provider#617
Merged
feat: unify llm-judge and agent-judge, add agentv provider#617
Conversation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace createProviderRegistry with direct createOpenAI/createAnthropic/ createAzure/createGoogleGenerativeAI calls to resolve v2/v3 spec version type compatibility issues. Parse "provider:model" strings manually via a switch statement. Simplify test mocks and add coverage for google, azure, and error cases. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Remove agent-judge as a separate evaluator type. LlmJudgeEvaluator now auto-detects mode based on the resolved judge provider: - LLM providers (azure, anthropic, gemini): structured JSON mode - Agent providers (claude-cli, copilot, etc.): delegate mode - agentv provider: built-in AI SDK agent mode with filesystem tools Closes #614
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The transpiler now handles llm-judge with rubrics the same way as agent-judge, expanding rubric items into individual NL assertion strings. Part of #614
- Add explicit guard for --model when --judge-target is agentv (was non-null assertion) - Consolidate evaluateWithJudgeTarget/evaluateWithDelegatedAgent into shared evaluateWithDelegate - Add try-catch for RegExp construction in search_files tool (prevents crash on invalid patterns) - Add comments explaining agentv exclusion from AGENT_PROVIDER_KINDS and AgentJudgeSchema backward compat Part of #614
Deploying agentv with
|
| Latest commit: |
3c9ed00
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://de46f704.agentv.pages.dev |
| Branch Preview URL: | https://feat-unify-judge-types-614.agentv.pages.dev |
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <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.
Summary
Closes #614
agent-judgeintollm-judgewith auto-detection.llm-judgenow supports three modes:generateObjectagentv, uses AI SDKgenerateTextwith sandboxed filesystem toolsprovider.invoke()agentvprovider: Built-in AI SDK provider that parsesprovider:modelstrings (e.g.,openai:gpt-5-mini) and creates LanguageModel instances via direct SDK calls. Supports openai, anthropic, azure, google.--judge-targetand--modelflags toagentv evalfor overriding judge provider across all evaluatorsagent-judgeentirely — no backward compat, no YAML remapping, as if it never existed. Onlyllm-judgeremains.cliModel!non-null assertion with explicit guard, consolidated duplicate delegate methods, added try-catch for RegExp insearch_filestoolKey changes
providers/agentv-provider.tsevaluators/llm-judge.tsevaluators/agent-judge.tstypes.tsAgentJudgeEvaluatorConfig, addedmax_steps/temperaturetoLlmJudgeEvaluatorConfigregistry/builtin-evaluators.tsagentJudgeFactory, updatedllmJudgeFactoryloaders/evaluator-parser.tsloaders/eval-yaml-transpiler.tsvalidation/eval-file.schema.tsAgentJudgeSchemaentirelyorchestrator.tsresolveJudgeProviderhandles--judge-targetoverrideapps/cli/.../run.ts--judge-targetand--modelCLI flagsexamples/features/agent-judge/CLAUDE.mdTest plan
AgentvProvider(construction, model parsing, all 4 providers, error cases)agentvtarget resolutionllm-judgerubrics in transpiler NL conversionbun testsuite: 1094 tests, 42 pass in evaluators.test.tstsc --noEmit: zero real type errors (only stale TS6305 output warnings)agentv evalwith standard llm-judge (rubric example) — score=1agentv evalwith rubric evaluator — score=1--judge-target agentvwithout--model— proper error message--judge-target agentv --model google:gemini-2.5-flashwith workspace verification — score=1, mode=built-in, steps=3, tool_calls=2🤖 Generated with Claude Code