Skip to content

test(evals): allow an explicit Anthropic subscription gateway - #188

Merged
nullStack65 merged 1 commit into
release/native-0.1.10from
test/mcp-eval-claude-gateway
Nov 23, 2026
Merged

nullStack65 merged 1 commit into
release/native-0.1.10from
test/mcp-eval-claude-gateway

Conversation

@nullStack65

Copy link
Copy Markdown
Owner

The MCP tool-use eval runner can send Claude model and shell-simulator requests to an explicitly selected Anthropic-compatible gateway. The opt-in uses ANTHROPIC_GATEWAY_KEY and supports a local subscription gateway. With no flag, the runner continues to use ANTHROPIC_API_KEY for direct Claude requests.

Verified with the release-relative vp run check:changed origin/release/native-0.1.10 suite (519 eval tests) and a loopback fixture covering Sonnet and Haiku bearer routing, missing-key failure, and opt-in behavior.

Agent: Codex
Model: GPT-6.2 Sol
Harness: Codex in T3 Code
Task: Post-merge tool-use eval verification for #186
Deploy: none

@coderabbitai

coderabbitai Bot commented Nov 23, 2026

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@nullStack65

Copy link
Copy Markdown
Owner Author

Independent review of head 95c2230e93721611900dd057951b79ba9e931f41

Verdict: Approve. No Critical or Important findings.

I read the diff and the callModel/postModel path in evals/mcp-tool-use/run.ts at this head. I did not run the suite.

Checked and fine:

  • Opt-in only. The gateway is used only with --anthropic-gateway. Without it, anthropicGateway is undefined and the old ANTHROPIC_API_KEY and proxy routing are unchanged.
  • No new spend. With the flag set, apiKey is forced to "". Requests carry no x-api-key, so they cannot fall back to a paid key. The token comes only from ANTHROPIC_GATEWAY_KEY, and a missing or blank value fails fast.
  • No secret leakage. The token appears only in the Authorization header. The bearer value and its stripped form are added to privateValues, which the existing scrubbing already uses. The URL validation rejects embedded credentials, query strings and fragments, so nothing secret can sit in the URL.
  • Routing. The agent and the Claude shell simulator both use the gateway. Codex models still go through callCodex.

Minor:

  1. The failure message still says "Set ANTHROPIC_API_KEY and pass --out…". It is now reachable only when no key is set and no gateway is given, so it is accurate, but it does not mention --anthropic-gateway.
  2. A plain http:// non-loopback gateway would send the bearer token in cleartext. The README example is loopback. Consider warning or requiring loopback for http:.
  3. The loopback fixture is described in the PR body but is not committed. A small unit test of the header and routing choice would guard against regressions.

@nullStack65
nullStack65 merged commit 9c292cc into release/native-0.1.10 Nov 23, 2026
6 checks passed
@nullStack65
nullStack65 deleted the test/mcp-eval-claude-gateway branch November 23, 2026 07:57
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