Skip to content

chore: fix Vertex AI global region URL in LlmClient (backport) - #25949

Merged
Croway merged 1 commit into
camel-4.22.xfrom
backport/CAMEL-vertex-ai-global-region-4.22.x
Aug 31, 2026
Merged

chore: fix Vertex AI global region URL in LlmClient (backport)#25949
Croway merged 1 commit into
camel-4.22.xfrom
backport/CAMEL-vertex-ai-global-region-4.22.x

Conversation

@davsclaus

Copy link
Copy Markdown
Contributor

Straight cherry-pick backport of #25936 (squash-merged as e3f7f4c on main) onto camel-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 the global location, whose actual host is aiplatform.googleapis.com with no region prefix.
  • With CLOUD_ML_REGION=global set, requests went to the non-existent host global-aiplatform.googleapis.com, causing the TUI's F8 AI panel and camel ask/explain/harden to 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 install on camel-jbang-core (this branch)
  • Clean cherry-pick, no conflicts

Claude Code on behalf of davsclaus

🤖 Generated with Claude Code

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>
@github-actions github-actions Bot added the dsl label Aug 31, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🌟 Thank you for your contribution to the Apache Camel project! 🌟
🤖 CI automation will test this PR automatically.

🐫 Apache Camel Committers, please review the following items:

  • First-time contributors require MANUAL approval for the GitHub Actions to run
  • You can use the command /component-test (camel-)component-name1 (camel-)component-name2.. to request a test from the test bot although they are normally detected and executed by CI.
  • You can label PRs using skip-tests and test-dependents to fine-tune the checks executed by this PR.
  • Build and test logs are available in the summary page. Only Apache Camel committers have access to the summary.

⚠️ Be careful when sharing logs. Review their contents before sharing them publicly.

@Croway
Croway merged commit 80c05d9 into camel-4.22.x Aug 31, 2026
4 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • dsl/camel-jbang/camel-jbang-core

🔬 Scalpel shadow comparison — Scalpel: 7 tested, 8 compile-only — current: 6 all tested

Maveniverse Scalpel detected 15 affected modules (current approach: 6).

⚠️ Modules only in Scalpel (9)
  • camel-jbang-core
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-launcher
  • coverage

Skip-tests mode would test 7 modules (1 direct + 6 downstream), skip tests for 8 (generated code, meta-modules)

Modules Scalpel would test (7)
  • camel-jbang-core
  • camel-jbang-mcp
  • camel-jbang-plugin-mcp
  • camel-jbang-plugin-route-parser
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-launcher-container
Modules with tests skipped (8)
  • camel-jbang-it
  • camel-jbang-main
  • camel-jbang-plugin-edit
  • camel-jbang-plugin-generate
  • camel-jbang-plugin-kubernetes
  • camel-jbang-plugin-test
  • camel-launcher
  • coverage

ℹ️ Shadow mode — Scalpel observes but does not affect test execution. Learn more

⚠️ Some tests are disabled on GitHub Actions (@DisabledIfSystemProperty(named = "ci.env.name")) and require manual verification:

  • dsl/camel-jbang/camel-jbang-core: 1 test(s) disabled on GitHub Actions

💡 Manual integration tests recommended:

You modified dsl/camel-jbang/camel-jbang-core. The related integration tests in dsl/camel-jbang/camel-jbang-it are excluded from CI. Consider running them manually:

mvn verify -f dsl/camel-jbang/camel-jbang-it -Djbang-it-test
All tested modules (15 modules)
  • Camel :: Coverage
  • Camel :: JBang :: Core
  • Camel :: JBang :: Integration tests
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Main
  • Camel :: JBang :: Plugin :: Edit
  • Camel :: JBang :: Plugin :: Generate
  • Camel :: JBang :: Plugin :: Kubernetes
  • Camel :: JBang :: Plugin :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Testing
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher
  • Camel :: Launcher :: Container

⚙️ View full build and test results

@github-actions
github-actions Bot deleted the backport/CAMEL-vertex-ai-global-region-4.22.x branch August 31, 2026 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants