[
https://issues.apache.org/jira/browse/CAMEL-23959?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Federico Mariani updated CAMEL-23959:
-------------------------------------
Attachment: OpenAIEmbeddingsStoreFullResponseTest.java
> camel-openai: storeFullResponse is silently ignored by the embeddings
> operation
> -------------------------------------------------------------------------------
>
> Key: CAMEL-23959
> URL: https://issues.apache.org/jira/browse/CAMEL-23959
> Project: Camel
> Issue Type: Bug
> Components: camel-openai
> Affects Versions: 4.21.0
> Reporter: Federico Mariani
> Priority: Minor
> Labels: ai
> Attachments: OpenAIEmbeddingsStoreFullResponseTest.java
>
>
> The {{storeFullResponse}} option (documented as "Store the full response in
> the exchange property 'CamelOpenAIResponse' in non-streaming mode") is
> honored by the chat-completion and audio-transcription producers but not by
> {{OpenAIEmbeddingsProducer}}, which never reads it. Users who set it on an
> {{openai:embeddings}} endpoint silently get no {{CamelOpenAIResponse}}
> property, losing access to response metadata that is not mapped to headers.
> Reproducer attached ({{OpenAIEmbeddingsStoreFullResponseTest}}, using
> {{camel-test-infra-openai-mock}}); it asserts the documented behavior and
> fails on current main:
> {noformat}
> storeFullResponse=true must store the full CreateEmbeddingResponse in the
> CamelOpenAIResponse exchange property ==> expected: not <null>
> {noformat}
> h3. Suggested fix
> Set {{exchange.setProperty(OpenAIConstants.RESPONSE, response)}} in
> {{OpenAIEmbeddingsProducer.processInternal}} when
> {{config.isStoreFullResponse()}} is true, consistent with the other
> producers. Same defect class as CAMEL-23946 (documented option never wired in
> camel-langchain4j-web-search).
> _This issue was drafted by Claude Code on behalf of Federico Mariani_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)