Skip to content

fix(core): clarify use_target resolution errors#917

Merged
christso merged 2 commits intomainfrom
fix/helpful-use-target-error
Apr 2, 2026
Merged

fix(core): clarify use_target resolution errors#917
christso merged 2 commits intomainfrom
fix/helpful-use-target-error

Conversation

@christso
Copy link
Copy Markdown
Collaborator

@christso christso commented Apr 2, 2026

Summary

  • resolve use_target aliases through a shared helper instead of letting unresolved aliases fall through to the generic provider error
  • surface actionable errors when an env-backed alias is unset or resolves to a missing target
  • add regression coverage for delegated target resolution

Red/Green UAT

Red:

  • From D:/GitHub/WiseTechGlobal/WTG.AI.Prompts
  • Command: $env:GRADER_TARGET=''; agentv eval evals/cargowise/cw-refvessel.eval.yaml --workers 1
  • Result: repeated execution errors like grader: 'provider' is required (targets with use_target must be resolved before calling resolveTargetDefinition)

Green:

  • From D:/GitHub/WiseTechGlobal/WTG.AI.Prompts
  • Command: $env:AGENT_TARGET='copilot'; $env:LLM_TARGET='azure'; $env:GRADER_TARGET=''; bun D:/GitHub/christso/agentv.worktrees/fix-helpful-use-target-error/apps/cli/dist/cli.js eval evals/cargowise/cw-refvessel.eval.yaml --target copilot --workers 1
  • Result: repeated execution errors like Target "grader" uses use_target: ${{ GRADER_TARGET }}, but GRADER_TARGET is not set. Set GRADER_TARGET to the name of a concrete target (for example, "azure") before running the eval.

Verification

  • bun test packages/core/test/evaluation/providers/targets.test.ts
  • bun test packages/core/test/evaluation/orchestrator.test.ts
  • bun --filter @agentv/core typecheck
  • pre-push hook on git push

@cloudflare-workers-and-pages
Copy link
Copy Markdown

Deploying agentv with  Cloudflare Pages  Cloudflare Pages

Latest commit: 2153894
Status: ✅  Deploy successful!
Preview URL: https://44200525.agentv.pages.dev
Branch Preview URL: https://fix-helpful-use-target-error.agentv.pages.dev

View logs

@christso christso merged commit 6e446b7 into main Apr 2, 2026
4 checks passed
@christso christso deleted the fix/helpful-use-target-error branch April 2, 2026 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant