chore: fix Vertex AI global region URL in LlmClient (backport) - #25949
Conversation
CLOUD_ML_REGION=global must use the aiplatform.googleapis.com host with no region prefix; the region-prefixed host only applies to regional locations (e.g. us-east5). The unconditional prefix broke the TUI's F8 AI panel and camel ask/explain/harden when Vertex AI env vars were set to the global region. Closes #25936 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
|
🌟 Thank you for your contribution to the Apache Camel project! 🌟 🐫 Apache Camel Committers, please review the following items:
|
|
🧪 CI tested the following changed modules:
🔬 Scalpel shadow comparison — Scalpel: 7 tested, 8 compile-only — current: 6 all testedMaveniverse Scalpel detected 15 affected modules (current approach: 6).
|
Straight cherry-pick backport of #25936 (squash-merged as e3f7f4c on
main) ontocamel-4.22.x. No conflicts.Summary
LlmClient.resolveAnthropicUrl()built the Vertex AI Anthropic endpoint by always prefixing the host with<region>-. That's correct for regional locations (e.g.us-east5) but wrong for thegloballocation, whose actual host isaiplatform.googleapis.comwith no region prefix.CLOUD_ML_REGION=globalset, requests went to the non-existent hostglobal-aiplatform.googleapis.com, causing the TUI's F8 AI panel andcamel ask/explain/hardento fail with a generic "LLM request failed" error whenever the Vertex AI auto-detect path was used with the global region.Test plan
mvn -q -DskipTests installoncamel-jbang-core(this branch)Claude Code on behalf of davsclaus
🤖 Generated with Claude Code