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:
@@ -40,5 +40,6 @@ Runnable companion code for the Spring AI articles on [ankurm.com](https://ankur
|
||||
| [`prompt-caching/`](prompt-caching) | Provider-side prompt caching on Spring AI 2.1: where each `AnthropicCacheStrategy` puts `cache_control` on the real request, what a hit, a miss and a write look like in `Usage` (`getPromptTokens()` now includes the cached tokens, which it did not on 2.0.1), what one changed word invalidates, 5-minute and 1-hour lifetimes, the 20-block lookback in a long chat, OpenAI's automatic caching with `prompt_cache_key`, and a cost table (a 5-minute entry that expires between requests makes caching cost more than none). **No vendor API called: the vendors are a local server that applies their documented rules; tokens are characters / 4 and prices are list prices read on 2026-11-24.** Spring Boot 4.2.0, Spring AI 2.1.0, Java 25. | [Prompt Caching in Spring AI](https://ankurm.com/spring-ai-prompt-caching-anthropic-openai-cost-table/) |
|
||||
| [`rag-eval/`](rag-eval) | Retrieval metrics in plain Java: hit@k, recall@k, precision@k, MRR and nDCG@k with their edge cases (duplicate chunks, short lists, no relevant passage) pinned by tests, a 30-question golden dataset with graded judgements over a 40-passage runbook, a paired bootstrap (no difference between the four retrievers had an interval that excluded zero), and a JUnit gate with a baseline, a tolerance and a no-new-misses rule that fails a build on a tokenizer that drops digits. **The retrievers are BM25, a hashed-trigram vector that is not a neural embedding, and their fusion; the corpus and questions are synthetic. No model was used.** Java 25, JUnit 6.1.3, no Spring. | [Measuring RAG Retrieval Quality in Java: recall@k, MRR, nDCG and a Golden Dataset in JUnit](https://ankurm.com/rag-retrieval-evaluation-java-recall-mrr-ndcg-golden-dataset/) |
|
||||
| [`cloud-providers/`](cloud-providers) | Keyless Spring AI on Amazon Bedrock and Azure OpenAI, with no API key or secret key in the application: the AWS default credential chain under IRSA and EKS Pod Identity, a managed identity and Microsoft Entra ID bearer tokens on Azure (and why the dedicated Azure OpenAI starter is not in the 2.1.0 BOM), an audit advisor, and the traps reproduced: a leftover static key beats the role, `AWS_REGION` is ignored by Bedrock auto-configuration, short-lived credentials refetched on every call, `azure-identity` missing from the classpath, other modalities defaulting to OpenAI, and the SigV4 session token showing up in AWS SDK DEBUG logs. **No AWS account or Azure subscription was used: a local server stands in for STS, Bedrock, the Azure identity endpoint and Azure OpenAI; the Spring AI, AWS SDK and azure-identity code is real.** Spring Boot 4.2.0, Spring AI 2.1.0, Java 25. | [Spring AI on Amazon Bedrock and Azure OpenAI: Keyless Auth with IAM Roles and Entra ID](https://ankurm.com/spring-ai-bedrock-azure-openai-keyless-auth-iam-entra-id/) |
|
||||
| [`ai-21-migration/`](ai-21-migration) | Upgrading from Spring AI 2.0.x to 2.1.0: one set of probes run against 2.0.0, 2.0.2, 2.0.3 and 2.1.0, three compile breaks, an API and configuration diff made from the jars, `ChatMemory` to session copying, `VectorStore.upsert` on pgvector, a grep checklist and an OpenRewrite recipe. Scripted and local fake models only; no provider called. Spring Boot 4.2.0, Spring AI 2.1.0, Java 25. | [Spring AI 2.0 to 2.1 Migration Guide](https://ankurm.com/spring-ai-2-0-to-2-1-migration-guide/) |
|
||||
|
||||
Upgrading from Spring AI 1.x: [migration guide](https://ankurm.com/spring-ai-1-to-2-migration-guide/).
|
||||
|
||||
Reference in New Issue
Block a user