You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by "davsclaus (via GitHub)" <gi...@apache.org> on 2026/10/17 06:06:41 UTC
[PR] CAMEL-23688: camel-jbang - An LLM given with --url is the only one used [camel]
davsclaus opened a new pull request, #27994:
URL: https://github.com/apache/camel/pull/27994
As decided on [CAMEL-23688](https://issues.apache.org/jira/browse/CAMEL-23688) (raised in #27967): **an LLM given with `--url` is the only one used.**
### The change
When the LLM given with `--url` did not answer, `LlmClient.detectEndpoint` went on to detect another provider: the Ollama of `camel infra` or of the host (with `--api-type=ollama`), or, without an API type, the whole detection: a hosted provider with an API key in the environment (Anthropic, Azure OpenAI, Gemini, OpenAI, watsonx) or Ollama. The prompts then went to a provider the user did not choose.
Now an explicit URL is the only endpoint the client tries:
- `camel ask`, `camel explain` and `camel overview --ai` fail with their "not reachable" error when the `--url` does not answer.
- The AI panel of the Camel TUI says which URL of its settings does not answer (`No LLM service reachable at <url> (the URL of the AI settings).`), instead of the hint to set an API key.
- Without a URL the provider is detected as before. `camel doctor` and the Ollama tab of the TUI probe without one, so they still find the Ollama of `camel infra` or `localhost:11434`. `camel harden` has its own client and already did not fall back.
### Tests
- `LlmClientExplicitUrlTest` (new): with an Ollama of `camel infra` always there to find (a pid file in a home of the test and a fake server), an unreachable URL fails with and without an API type and keeps its URL, a URL that answers is used, and without a URL the Ollama of `camel infra` is found. Without the change the two tests of an unreachable URL fail.
- `OllamaDoctorSupportTest` asserted the fallback; it asserts that an unreachable URL is not running now, on every host.
- `OverviewTest.aiWithoutAnLlmIsAFailure` no longer skips itself on a host that runs Ollama.
The AI providers page says what `--url` does, and the change is in the 4.24 upgrade guide.
`mvn test` of the LLM client, overview, explain, harden, ask and doctor tests of camel-jbang-core: all pass (160, none skipped). The TUI module compiles.
_Claude Code on behalf of davsclaus_
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01DDRLJAyf8cDXSg8iX785My
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-23688: camel-jbang - An LLM given with --url is the only one used [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27994:
URL: https://github.com/apache/camel/pull/27994#issuecomment-6230864696
<!-- ci-tested-modules -->
:test_tube: **CI tested the following changed modules:**
- `docs`
- `dsl/camel-jbang/camel-jbang-core`
- `dsl/camel-jbang/camel-jbang-plugin-tui`
---
<details><summary>:microscope: Scalpel shadow comparison — Scalpel: 5 of 706 tested, 8 compile-only — current: 5 all tested</summary>
[Maveniverse Scalpel](https://github.com/maveniverse/scalpel) detected **5 affected modules** (current approach: 5).
**Skip-tests mode would test 5 modules** (3 direct + 4 downstream), **skip tests for 8** (generated code, meta-modules)
<details><summary>Modules Scalpel would test (5)</summary>
- `camel-jbang-mcp` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-mcp` ← downstream of org.apache.camel:camel-jbang-core
- `camel-jbang-plugin-tui` ← dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/AiPanel.java
- `camel-jbang-plugin-validate` ← downstream of org.apache.camel:camel-jbang-core
- `camel-launcher-container` ← downstream of org.apache.camel:camel-launcher
</details>
<details><summary>Modules with tests skipped (8)</summary>
- `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`
</details>
> :information_source: Shadow mode — Scalpel observes but does not affect test execution. [Learn more](https://github.com/maveniverse/scalpel)
</details>
:warning: **Some tests are disabled on GitHub Actions** (`@DisabledIfSystemProperty(named = "ci.env.name")`) and require manual verification:
- `dsl/camel-jbang/camel-jbang-core`: 2 test(s) disabled on GitHub Actions
:bulb: **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
> ```
<details><summary>All tested modules (15 modules, 1m 40s total)</summary>
**Total reactor time:** 1m 40s
| Module | Duration | Status |
| --- | --- | --- |
| Camel :: JBang :: Plugin :: Validate | 33.5s | SUCCESS |
| Camel :: JBang :: MCP | 21.1s | SUCCESS |
| Camel :: Docs | 14.6s | SUCCESS |
| Camel :: JBang :: Plugin :: Testing | 13.4s | SUCCESS |
| Camel :: JBang :: Plugin :: Kubernetes | 10.7s | SUCCESS |
| Camel :: JBang :: Plugin :: MCP | 1.5s | SUCCESS |
| Camel :: JBang :: Plugin :: Generate | 1.4s | SUCCESS |
| Camel :: Coverage | 1.4s | SUCCESS |
| Camel :: JBang :: Plugin :: Edit | 1.4s | SUCCESS |
| Camel :: JBang :: Main | 0.8s | SUCCESS |
| Camel :: JBang :: Core | n/a | |
| Camel :: JBang :: Integration tests | n/a | |
| Camel :: JBang :: Plugin :: TUI | n/a | |
| Camel :: Launcher | n/a | |
| Camel :: Launcher :: Container | n/a | |
**Top 20 slowest modules:**
- `Camel :: JBang :: Plugin :: Validate` (33.5s)
- `Camel :: JBang :: MCP` (21.1s)
- `Camel :: Docs` (14.6s)
- `Camel :: JBang :: Plugin :: Testing` (13.4s)
- `Camel :: JBang :: Plugin :: Kubernetes` (10.7s)
- `Camel :: JBang :: Plugin :: MCP` (1.5s)
- `Camel :: JBang :: Plugin :: Generate` (1.4s)
- `Camel :: Coverage` (1.4s)
- `Camel :: JBang :: Plugin :: Edit` (1.4s)
- `Camel :: JBang :: Main` (0.8s)
</details>
---
:gear: [View full build and test results](https://github.com/apache/camel/actions/runs/39009473983)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-23688: camel-jbang - An LLM given with --url is the only one used [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus commented on code in PR #27994:
URL: https://github.com/apache/camel/pull/27994#discussion_r4301707823
##########
dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/AiPanel.java:
##########
@@ -644,9 +644,12 @@ private void initClient() {
toolSet.setMode(normalizeToolMode(TuiSettings.load().getAiTools()));
}
client = created;
+ // a url that is set is the only one tried, so say which one does not answer
Review Comment:
Done in the latest commit: the comment says that detectEndpoint() sets the url of the provider it detects when none is set, so the url is read before it, and that a url that is set is the only one tried.
_Claude Code on behalf of davsclaus_
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-23688: camel-jbang - An LLM given with --url is the only one used [camel]
Posted by "davsclaus (via GitHub)" <gi...@apache.org>.
davsclaus merged PR #27994:
URL: https://github.com/apache/camel/pull/27994
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-23688: camel-jbang - An LLM given with --url is the only one used [camel]
Posted by "gnodet-bot (via GitHub)" <gi...@apache.org>.
gnodet-bot commented on code in PR #27994:
URL: https://github.com/apache/camel/pull/27994#discussion_r4301696696
##########
dsl/camel-jbang/camel-jbang-plugin-tui/src/main/java/org/apache/camel/dsl/jbang/core/commands/tui/AiPanel.java:
##########
@@ -644,9 +644,12 @@ private void initClient() {
toolSet.setMode(normalizeToolMode(TuiSettings.load().getAiTools()));
}
client = created;
+ // a url that is set is the only one tried, so say which one does not answer
Review Comment:
Nit: the intent of capturing `configuredUrl` before `detectEndpoint()` is subtle — it prevents reading a URL potentially overwritten by fallback paths inside detection. A short inline comment would make this ordering explicit for future readers:
```suggestion
// capture before detectEndpoint(): fallback paths may overwrite url on auto-detect branches
String configuredUrl = client.endpointUrl();
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] CAMEL-23688: camel-jbang - An LLM given with --url is the only one used [camel]
Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on PR #27994:
URL: https://github.com/apache/camel/pull/27994#issuecomment-6230508763
:star2: Thank you for your contribution to the Apache Camel project! :star2:
:robot: CI automation will test this PR automatically.
:camel: 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](https://camel.apache.org/community/team/#committers) have access to the summary.
:warning: Be careful when sharing logs. Review their contents before sharing them publicly.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@camel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org