fix(anthropic): omit incompatible tool schemas #2338
All Vouch review confidence checks passed
Residual risk 0.30 = Change Risk (0.51) × (1 − Review Confidence (0.41)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.51 · 258 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.02 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Shallow Review Depth
shallow_review_depth
0.344
Diff Size
diff_size
0.332
Ai Authored
ai_authored
0.050
Real PR Conversation Timeline
1 comments
"Review active on #2338"
general
weight: 0.35
ousamabenyounes
Resolves #2328.
Problem
The official Anthropic API rejects a request when an MCP tool has
oneOf,anyOf, orallOfat the root of its input schema. One such tool can block an otherwise unrelated prompt.Change
:443, are handled; custom endpoints keep their original tools.llm.noticeto native and requester callers, forward them through the production v2 adapter, and publish an agent warning.The rebase onto current
maindrops the legacypackages/kosongportion because upstream removed that package in #4599. The activeagent-core-v2implementation remains in this PR.Verification
e66d9c38d, affected Anthropic, model adapter, and agent requester tests: 91/91 passed. The two new adapter/warning tests failed before the follow-up and passed after it.@moonshot-ai/agent-core-v2typecheck and staged oxlint: passed.74c40e48bpassed 7,789 tests and failed 12 in four AgentSwarm/FullCompaction files. Three of those files passed in a serial replay; one compaction timeout remained. Representative failures, including that compaction case, passed in isolation on both the exact upstream base and the PR checkout. No green full-suite claim is made for the new head.lint:importsstill reports the existing violation in unchangedsrc/human/agent/origin.ts. GitHub Actions workflows for this fork require maintainer approval before remote checks run.AI assistance disclosure
This patch and PR text were AI-assisted using OpenAI Codex. The contributor remains responsible for reviewing and understanding the submitted changes.