Skip to content

camel-ai fixes backport to camel-4.22.x (CAMEL-24527, CAMEL-24540, CAMEL-24533) - #25996

Merged
Croway merged 3 commits into
apache:camel-4.22.xfrom
oscerd:backport/camel-ai2-4.22.x
Sep 1, 2026
Merged

camel-ai fixes backport to camel-4.22.x (CAMEL-24527, CAMEL-24540, CAMEL-24533)#25996
Croway merged 3 commits into
apache:camel-4.22.xfrom
oscerd:backport/camel-ai2-4.22.x

Conversation

@oscerd

@oscerd oscerd commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Straight cherry-pick backport to camel-4.22.x of three camel-ai fixes already reviewed and merged on main:

Each commit is a clean cherry-pick of the merged main commit (no manual conflict resolution). The affected code is present on camel-4.22.x, and the added tests compile and pass on this branch.

Claude Code on behalf of oscerd

oscerd and others added 3 commits September 1, 2026 11:06
…task, not only chat

The authToken option (and the token resolved from an OAuth profile) was honoured
only by the chat task predictor, which passed it as an explicit token= kwarg to
transformers.pipeline(). The other nine task predictors — text generation,
summarization, question answering, classification, sentence embeddings, ASR, TTS,
text-to-image and zero-shot classification — never received it, so loading a
gated or private model failed with HTTP 401 even when a token was configured.

Apply the token centrally in AbstractTaskPredictor.loadModel() by exporting it as
the standard HF_TOKEN environment variable at the top of the generated handler
script, which transformers/huggingface_hub read automatically. This covers all
ten tasks in one place instead of threading a token clause through each
predictor's Python template, and removes the now-redundant per-task clause from
ChatPredictor. The token value is escaped when interpolated into the script to
prevent breaking out of the Python string literal, and the generated script is
logged at DEBUG before the token line is prepended so the token itself is never
written to the log.

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>

Closes apache#25899

(cherry picked from commit e65d869)
…ce-embeddings and text-to-image, and set the text-to-image OUTPUT header

Two small correctness gaps in the task predictors:

- The configured model revision was dropped by SentenceEmbeddingsPredictor and
  TextToImagePredictor; the other eight tasks pass config.getRevision() into their
  Python script, so pinning a revision silently had no effect for these two. Pass
  the revision into sentence_embeddings.py (SentenceTransformer) and
  text_to_image.py (StableDiffusionPipeline.from_pretrained).

- TextToImagePredictor set the image bytes as the body but never set the OUTPUT
  header, although its Javadoc documents it. Set HuggingFaceConstants.OUTPUT to the
  image bytes alongside the body.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Andrea Cosentino <ancosen@gmail.com>
(cherry picked from commit 674c0e0)
…roperties on CREATE/UPDATE

WeaviateEmbeddingsDataTypeTransformer set the message body to the
embedding vector and only wrote the optional id into the Weaviate
object properties; the embedded text (the TextSegment body) was never
written under textFieldName, so the source passage was silently lost.
For a RAG pipeline this means the store cannot return the text that
produced a match. The Milvus sibling transformer already stores the
text correctly.

Write the text under textFieldName into the properties for CREATE and
UPDATE_BY_ID via a shared setProperties helper, merging into any
PROPERTIES header the caller already set rather than replacing it.
Also correct the default-branch error message, which claimed only
create and updatebyid were supported although query is handled too.

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>

Closes apache#25900

(cherry picked from commit b4c20cb)
@oscerd oscerd added the bug Something isn't working label Sep 1, 2026
@oscerd oscerd added this to the 4.22.1 milestone Sep 1, 2026
@github-actions

github-actions Bot commented Sep 1, 2026

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.

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified straight cherry-pick backport of three camel-ai fixes (#25899, #25933, #25900) to camel-4.22.x — all 338 change lines are identical to the combined originals. All three original PRs (CAMEL-24527, CAMEL-24540, CAMEL-24533) were already reviewed and approved on main. CI is green.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of Guillaume Nodet

@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

🧪 CI tested the following changed modules:

  • components/camel-ai/camel-huggingface
  • components/camel-ai/camel-weaviate

🔬 Scalpel shadow comparison — Scalpel: 12 tested, 29 compile-only — current: 12 all tested

Maveniverse Scalpel detected 41 affected modules (current approach: 12).

⚠️ Modules only in Scalpel (29)
  • apache-camel
  • camel-allcomponents
  • camel-catalog
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-csimple-maven-plugin
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • 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-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

Skip-tests mode would test 12 modules (2 direct + 10 downstream), skip tests for 29 (generated code, meta-modules)

Modules Scalpel would test (12)
  • camel-huggingface
  • camel-jbang-mcp
  • camel-jbang-plugin-mcp
  • camel-jbang-plugin-route-parser
  • camel-jbang-plugin-tui
  • camel-jbang-plugin-validate
  • camel-langchain4j-embeddings
  • camel-langchain4j-embeddingstore
  • camel-launcher-container
  • camel-weaviate
  • camel-yaml-dsl-validator
  • camel-yaml-dsl-validator-maven-plugin
Modules with tests skipped (29)
  • apache-camel
  • camel-allcomponents
  • camel-catalog
  • camel-catalog-console
  • camel-catalog-lucene
  • camel-catalog-maven
  • camel-catalog-suggest
  • camel-componentdsl
  • camel-csimple-maven-plugin
  • camel-endpointdsl
  • camel-endpointdsl-support
  • camel-itest
  • 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-kamelet-main
  • camel-launcher
  • camel-report-maven-plugin
  • camel-route-parser
  • camel-yaml-dsl
  • camel-yaml-dsl-deserializers
  • camel-yaml-dsl-maven-plugin
  • coverage
  • docs
  • dummy-component

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

All tested modules (41 modules)
  • Camel :: AI :: Hugging Face
  • Camel :: AI :: LangChain4j :: Embedding
  • Camel :: AI :: LangChain4j :: EmbeddingStore
  • Camel :: AI :: Weaviate
  • Camel :: All Components Sync point
  • Camel :: Assembly
  • Camel :: Catalog :: CSimple Maven Plugin (deprecated)
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Catalog :: Camel Report Maven Plugin
  • Camel :: Catalog :: Camel Route Parser
  • Camel :: Catalog :: Console
  • Camel :: Catalog :: Dummy Component
  • Camel :: Catalog :: Lucene (deprecated)
  • Camel :: Catalog :: Maven
  • Camel :: Catalog :: Suggest
  • Camel :: Component DSL
  • Camel :: Coverage
  • Camel :: Docs
  • Camel :: Endpoint DSL
  • Camel :: Endpoint DSL :: Support
  • Camel :: Integration Tests
  • 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 :: Kamelet Main
  • Camel :: Launcher
  • Camel :: Launcher :: Container
  • Camel :: YAML DSL
  • Camel :: YAML DSL :: Deserializers
  • Camel :: YAML DSL :: Maven Plugins
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

@Croway
Croway merged commit 5584169 into apache:camel-4.22.x Sep 1, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working components components-ai

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants