Skip to content

[BUG]: Custom ANTHROPIC_BASE_URL cannot satisfy both the judge and the agent #55

Closed

Description

@jifeij

What happened?

Summary

With SKILL_EVAL_LLM_PROVIDER=anthropic and a custom base URL, the in-container judge and the Claude Code agent derive their endpoints from the same ProviderConfig.base_url but disagree about whether it includes /v1.
Only one of them can be right for a given value, so a Tier 3 run either scores no LLM-judge metrics or fails before the agent runs at all.

This does not affect the default api.anthropic.com, only a self-hosted or proxied Anthropic-compatible endpoint.

The disagreement

The judge appends /messages, so it needs a base that already ends in /v1:

# skillevaluator/tier3/harbor/templates/eval.py, _anthropic_url()
base_url = os.environ.get("SKILL_EVAL_LLM_BASE_URL") or os.environ.get("ANTHROPIC_BASE_URL")
url = base_url.rstrip("/") + "/messages" if base_url else "https://api.anthropic.com/v1/messages"

The agent is the Claude Code CLI, which follows the Anthropic SDK convention and appends /v1/messages itself, so it needs a base without it. Both are handed the same value: runner.py::_provider_environment sets ANTHROPIC_BASE_URL = config.base_url for the container, and _local_agent_credentials hands the agent the same field.

There is no way to give them different values.
provider_config.resolve_llm_provider reads SKILL_EVAL_LLM_BASE_URL in preference to ANTHROPIC_BASE_URL and collapses both into one base_url, and the container env allowlist (local_environment._LIVE_AGENT_KEYS) carries ANTHROPIC_BASE_URL but not SKILL_EVAL_LLM_BASE_URL.

Reproduction steps

Any Anthropic-compatible endpoint that serves /v1/messages and not /messages shows this. Tier 3 on one skill, four cases, claude-code, docker:

ANTHROPIC_BASE_URL agent judge
https://host scores 8/8 accuracy, goal_accuracy, behavior_check all 0.0
https://host/v1 fails runtime preflight, nothing scored never reached

With the first, findings.json records:

LLM judge error: HTTP 404: Not Found - {"detail":"Not Found"}

which is the judge requesting https://host/messages. With the second, the agent exits non-zero during agent-runtime-preflight, requesting https://host/v1/v1/messages.

Three of six metrics reading 0.0 is the more dangerous half: the run reports execution_status: succeeded and publishes a Skill Lift computed over the three deterministic metrics as though it were the usual six.

SkillEvaluator version or commit

e5e0702

Environment

  • --env-mode docker, agent claude-code
  • Endpoint: a LiteLLM proxy exposing the Anthropic Messages API at /v1/messages

Before submitting

Activity

  1. added
    bug
    on Aug 19, 2026
  2. added 5 commits that reference this issue on Aug 20, 2026
    828dfc1
    ca8c056
    2b833e9
    f3093f9
    01a5612
  3. self-assigned this
    on Aug 20, 2026
  4. added a commit that references this issue on Aug 21, 2026
    799f9d6
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bug

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions