atiaomar1978-hub commented on PR #25116:
URL: https://github.com/apache/camel/pull/25116#issuecomment-5084444478
Implementation notes for **CAMEL-23969** (`d2e6eacd95e`). _AI-generated
comment on behalf of @atiaomar1978-hub._
---
## What shipped
| Area | Details |
|------|---------|
| Operation | `openai:responses` → `OpenAIResponsesProducer` |
| Input | `OpenAIResponsesInputBuilder` — string body, text files, images
(same MIME rules as chat-completion) |
| Params | `model`, `temperature`, `topP`, `maxTokens` → `maxOutputTokens`,
`systemMessage` → `instructions` |
| State | `previousResponseId` option + `CamelOpenAIPreviousResponseId`
header |
| Tools | `builtinTools` (`web_search`, `file_search`, `code_interpreter`);
`fileSearchVectorStoreIds` required for `file_search`; `hostedMcpTools` JSON
array for Tool.Mcp |
| Output | Body = assistant text; headers for id/model/tokens;
`CamelOpenAIFinishReason` maps `completed` → `stop` |
| Full response | `storeFullResponse=true` → exchange property
**`CamelOpenAIResponsesResponse`** (`com.openai.models.responses.Response`) |
| Structured | `outputClass` / `jsonSchema` via SDK `text(...)` / JSON
schema config |
## Mock & tests
- `ResponsesRequestHandler` + `/v1/responses` routing in
`OpenAIMockServerHandler`
- `RequestContext.getResponsesInputText()` supports string `input` and
`input_text` parts (multimodal)
- **`OpenAIResponsesMockTest`**: basic call, instructions + previous id,
JSON schema, builtin tools, store full response, streaming rejected, invalid
hosted MCP JSON
Local run:
```text
JAVA_HOME=/opt/homebrew/opt/openjdk@21 \
./mvnw -pl
components/camel-ai/camel-openai,test-infra/camel-test-infra-openai-mock -am
test \
-Dtest=OpenAIResponsesMockTest
```
## Bugbot / Grok follow-ups (addressed in this commit)
- Streaming guard honors **`CamelOpenAIStreaming`** header, not only URI
`streaming=true`
- `file_search` validates at least one non-blank vector store id
- Documented `storeFullResponse` property name per operation
- Mock parses **`input_text`** content parts
- Added **`openai-responses.adoc`** usage page
## Reviewer asks
- Does the `completed` → `stop` mapping for `CamelOpenAIFinishReason` match
your expectations for Responses vs chat-completion?
- OK to defer route-backed **function tools** until CAMEL-23382 as in the
JIRA?
Thanks — CI pending (first-time contributor workflows may need manual
approval).
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]