mirror of
https://github.com/vxcontrol/langchaingo.git
synced 2026-08-24 21:31:28 -04:00
2ab7977c19
Two conversations are rejected locally on the Anthropic door and were sent anyway on both Bedrock doors: one ending in an assistant turn on a model that does not take a prefill, and a forced tool choice combined with manual budget thinking. Each cost a round trip to come back as a documented 400. Both refusals now run once in the Bedrock entry point, ahead of the split between InvokeModel and Converse, so the two transports answer alike. The predicates are model-keyed, so a non-Claude id such as Amazon Nova passes through untouched. The two error types move to llms/reasoning, which both doors already import, and the anthropic package keeps its names as aliases so existing callers and their errors.As checks are unaffected. The prefill and forced-tool detectors move to llms beside the types they inspect, replacing the anthropic-private copies. Verified by mutation: removing the guard reddens all four rows. PAGI-132 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>