Add ai-21-migration module: upgrading Spring AI 2.0.x to 2.1.0, measured. One probe source tree run on 2.0.0, 2.0.2, 2.0.3 and 2.1.0 (Anthropic prompt tokens with caching, auth header, discarded temperature, thinking parts, message mutability, entity() on refusals), three compile breaks, API and configuration diffs from the jars, ChatMemory to session copy, a wrapping ToolCallingManager under tool confirmation, the OpenAI Responses switch, VectorStore.upsert on real pgvector, a grep checklist and an OpenRewrite recipe. Scripted and local fake models; no provider called. Spring Boot 4.2.0, Spring AI 2.1.0, Java 25.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Claude-Session: https://claude.ai/code/session_017ic4b7N4ZDbUtA3ofqAqRV
This commit is contained in:
Claude
2026-12-03 09:46:46 +05:30
parent 8f69e7bf50
commit c8fa0912f7
71 changed files with 1990 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#!/usr/bin/env bash
# The three spring-ai-tool-search-tool-* entries are skipped: Maven Central answered 404 for their jars.
# Download every non-starter jar listed in the Spring AI BOM of one version into target/jars/<version>.
set -euo pipefail
v=${1:?version}
dir="$(cd "$(dirname "$0")/.." && pwd)/jars-cache/$v"
base=https://repo1.maven.org/maven2/org/springframework/ai
mkdir -p "$dir"
curl -s -f --retry 5 "$base/spring-ai-bom/$v/spring-ai-bom-$v.pom" -o "$dir/../$v.bom"
sed -n 's:.*<artifactId>\(spring-ai-[^<]*\)</artifactId>.*:\1:p' "$dir/../$v.bom" | sort -u \
| grep -v -e '^spring-ai-bom$' -e '^spring-ai-starter' -e '^spring-ai-tool-search-tool-' > "$dir/../$v.artifacts"
while read -r a; do
[ -s "$dir/$a.jar" ] && continue
code=$(curl -s -f --retry 8 --retry-delay 10 -o "$dir/$a.jar" -w '%{http_code}' "$base/$a/$v/$a-$v.jar" || true)
case $code in
200) ;;
404) echo "in the BOM but not on Maven Central: $a $v" >&2 ;;
*) echo "download failed (HTTP $code): $a $v; run again later" >&2; exit 1 ;;
esac
sleep 1
done < "$dir/../$v.artifacts"
echo "$v: $(ls "$dir" | wc -l) jars"