chore(api): migrate evaluator templates to new endpoint - Phase 2#3801
Merged
jp-agenta merged 4 commits intorelease/v0.86.7from Feb 23, 2026
Merged
chore(api): migrate evaluator templates to new endpoint - Phase 2#3801jp-agenta merged 4 commits intorelease/v0.86.7from
jp-agenta merged 4 commits intorelease/v0.86.7from
Conversation
Add new /preview/simple/evaluators/templates endpoint to replace the legacy GET /evaluators/ endpoint: Backend changes: - Add EvaluatorTemplate and EvaluatorTemplatesResponse models - Add list_evaluator_templates() handler to SimpleEvaluatorsRouter - Move BUILTIN_EVALUATORS to get_builtin_evaluators() function in oss/src/resources/evaluators/evaluators.py - Update db_manager.py and migrations to use new function - Remove evaluators_router.py and its mount from routers.py Frontend changes: - Update fetchAllEvaluators() to use new /templates endpoint - The evaluatorsQueryAtomFamily automatically uses the new endpoint when preview=false since it calls fetchAllEvaluators() This completes the evaluators endpoint cleanup started in Phase 1.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
FastAPI matches routes in registration order. The /{evaluator_id} route
was registered before /templates, which caused FastAPI to try matching
'templates' as a UUID path parameter, resulting in a 422 validation error.
Moving /templates registration before /{evaluator_id} ensures the literal
path is matched first.
Member
Author
Fixed: Route Registration OrderThanks Devin for catching this! The Fix: Moved Also added a comment explaining why the order matters for future maintainers. |
Per AGENTS.md guidelines: 'Use @intercept_exceptions() at the route boundary.'
Member
Author
|
Deploying to testing.preview.agenta.dev for QA @bekossy |
jp-agenta
approved these changes
Feb 23, 2026
Railway Preview Environment
Updated at 2026-02-23T12:11:17.418Z |
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
Completes the evaluator endpoints cleanup by migrating
GET /evaluators/to the new API structure.Stacked on: #3800 (Phase 1)
Changes
Backend
GET /preview/simple/evaluators/templatesendpointEvaluatorTemplateandEvaluatorTemplatesResponsemodelsBUILTIN_EVALUATORStoget_builtin_evaluators()function in shared locationdb_manager.pyand migrations to use new functionevaluators_router.pyand its mountFrontend
fetchAllEvaluators()to use the new/templatesendpointevaluatorsQueryAtomFamilyatom automatically uses the new endpoint whenpreview=falseTesting
Migration Notes
The new endpoint returns the same data structure wrapped in a response envelope:
{ "count": 12, "templates": [ {"name": "LLM-as-a-judge", "key": "auto_ai_critique", ...}, ... ] }The frontend handles both the new and old response formats gracefully.