Repository navigation
agentcore: add native Anthropic API, direct CLI engine, Tern-style model gateway, and matrix evals - #390
Merged
Conversation
…del gateway, and matrix evals
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 full multi-backend model-calling & CLI benchmarking stack across
agentcoreandevals/:/v1/messagesAPI inagentcore(agentcore/src/model.rs,agentcore/src/turn.rs):Api::Anthropic(explicitapi: "anthropic"or URL auto-detection forapi.anthropic.com//anthropic).tool_resultblocks into oneusermessage), attachescache_control: ephemeralon system prompt & last tool, mapseffortto extended thinking budgets, and streams SSE (text_delta,thinking_delta,input_json_delta, cache-awareTokensusage).agentcore(agentcore/src/cli.rs,agentcore/src/main.rs):agentcore cli <claude|codex|pi|omp|opencode> [program] [-- extra_args...]speaks the exact same Bate engine JSON-lines protocol (PROTOCOL.md) without requiring npm ACP adapters.Events (Text,Thinking,ToolStart,ToolEnd,Usage,TurnEnd), preserves multi-turn session continuity (--resume/exec resume/--session), forwards Bate MCP connectors toclaude --mcp-config, and cleanly kills the child process onOp::Abort.evals/gateway.py):/v1/chat/completions,/v1/responses,/v1/models,/health) + Unix control socket (serve+ctl status|stats|route|dump|stop).openai,anthropic,gemini,omp(omp auth-gateway stdio),cli, andmockbackends while logging per-request latency & token usage togateway_trace.jsonl.evals/driver.py,evals/run.py,evals/analyze.py,evals/README.md):--api anthropic,--cli <kind>,--gateway <backend>,discover,gateway serve|ctl,matrix, andleaderboard(ranked pass@1 / pass^k + pairwise exact McNemar comparisons).Evidence
cargo test -p agentcore:agentcore/tests/backends.rspass (end-to-end native Anthropic tool loop + headers,agentcore cli claudewith--mcp-config&--resume,agentcore cli codexwithexec resume)python3 -B -m unittest discover -s evals -v: 10/10 pass (incl. OpenAI↔Anthropic, OpenAI↔Gemini, live HTTP + Unixctlsocket lifecycle, and multi-backend leaderboard).evals/run.py discoverandevals/run.py matrix --spec mock_a=mock --spec mock_b=mockend-to-end against compiledagentcore.cd window/ui && npm ci && npm run build && npm test(147/147 pass)cargo fmt --all --checkcargo clippy --workspace --all-targets --locked -- -D warningscargo test --workspace --lockedMerge Danger
Api::Chat,Api::Responses, andagentcore acppaths are untouched and continue passing all 94 engine + 11 ACP + 12 harness scorecard tests. NewApi::Anthropicandagentcore climodes are strictly opt-in.Device decision
/Applications/Bate.app) or user data (~/.bate) changes required; pure engine backend + local eval/gateway tooling.