Andrea Cosentino created CAMEL-24539:
----------------------------------------
Summary: camel-openai: embeddings/audio store their SDK response
under the chat-typed RESPONSE property
Key: CAMEL-24539
URL: https://issues.apache.org/jira/browse/CAMEL-24539
Project: Camel
Issue Type: Bug
Components: camel-openai
Reporter: Andrea Cosentino
Assignee: Andrea Cosentino
Fix For: 4.23.0
The Embeddings (line 107), AudioTranscription (line 116) and AudioTranslation
(line 93) producers store their full SDK response object under
OpenAIConstants.RESPONSE. That constant is documented and typed as a chat
ChatCompletion response (OpenAIConstants lines 98-99), and storeFullResponse's
documentation only mentions chat completions — it omits embeddings and audio.
Because all operations reuse the same property key with different value types,
a route that performs an embeddings or audio call and then feeds the exchange
into a tool-execution step hits ToolExecutionProducer (line 86), which reads
the RESPONSE property as a ChatCompletion, gets null (wrong type), and throws.
Fix: give embeddings/audio their own response property constants (and document
them), so the chat-typed RESPONSE property is not overloaded with incompatible
types.
_Claude Code on behalf of oscerd_
--
This message was sent by Atlassian Jira
(v8.20.10#820010)