Skip to content

CAMEL-23425: camel-openai - Add reasoning_content support and generic response header extraction#22966

Open
Croway wants to merge 1 commit intoapache:mainfrom
Croway:feature/CAMEL-23425-reasoning-content-support
Open

CAMEL-23425: camel-openai - Add reasoning_content support and generic response header extraction#22966
Croway wants to merge 1 commit intoapache:mainfrom
Croway:feature/CAMEL-23425-reasoning-content-support

Conversation

@Croway
Copy link
Copy Markdown
Contributor

@Croway Croway commented May 5, 2026

Summary

  • Extract reasoning_content from API responses into a CamelOpenAIReasoningContent header, supporting thinking models like Qwen3 and DeepSeek-R1
  • Add generic additionalResponseHeader option to map any extra response field to a named Camel header (e.g. additionalResponseHeader.reasoning_content=MyHeader)
  • Both simple and agentic (MCP tool loop) non-streaming paths are covered

Test plan

  • reasoning_content extracted into built-in header when present
  • Empty content body preserved when only reasoning_content is present
  • No header set when reasoning_content is absent
  • Both inline <think> (CamelOpenAIThinkingContent) and reasoning_content headers populated independently
  • additionalResponseHeader maps field to custom header name
  • Custom header not set when field is absent
  • All existing tests pass (mvn verify — 10 unit + 18 integration tests green)

Claude Code on behalf of Federico Mariani

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🌟 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.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 5, 2026

🧪 CI tested the following changed modules:

  • catalog/camel-catalog
  • components/camel-ai/camel-openai
  • dsl/camel-endpointdsl
  • test-infra/camel-test-infra-openai-mock

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

  • components/camel-ai/camel-openai: 6 test(s) disabled on GitHub Actions
All tested modules (14 modules)
  • Camel :: AI :: LangChain4j :: Agent
  • Camel :: AI :: LangChain4j :: Tools
  • Camel :: AI :: OpenAI
  • Camel :: Catalog :: Camel Catalog
  • Camel :: Endpoint DSL
  • Camel :: JBang :: MCP
  • Camel :: JBang :: Plugin :: Route Parser
  • Camel :: JBang :: Plugin :: TUI
  • Camel :: JBang :: Plugin :: Validate
  • Camel :: Launcher :: Container
  • Camel :: Test Infra :: All test services
  • Camel :: Test Infra :: OpenAI Mock
  • Camel :: YAML DSL :: Validator
  • Camel :: YAML DSL :: Validator Maven Plugin

⚙️ View full build and test results

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants