davsclaus opened a new pull request, #28980: URL: https://github.com/apache/camel/pull/28980
Fixes [CAMEL-26500](https://issues.apache.org/jira/browse/CAMEL-26500). Follow-up of CAMEL-26069 (#28892). ## What and why The image generation and embedding models on Amazon Bedrock only support the Invoke API, they do not stream. Since CAMEL-26069, `invokeImageModelStreaming` and `invokeEmbeddingsModelStreaming` fail with an `IllegalArgumentException` for such a model (pointing to `invokeImageModel` / `invokeEmbeddingsModel`), and with a text model they behave exactly like `invokeTextModelStreaming`. So the two operations add nothing. ## Changes - `BedrockOperations`: `@Deprecated(since = "4.24")` with a `@deprecated` Javadoc on both constants, as `MinioOperations.getPartialObject` does. Both operations keep working. - The catalog has no way to mark a single enum value as deprecated, so the `operation` option description now says the two operations are deprecated and what to use instead (regenerated component JSON, catalog JSON, endpoint DSL and component DSL). - Component doc: the operation list marks both as `(deprecated)`, and the streaming section has a NOTE with the replacements (catalog copy regenerated). - Upgrade guide 4.24: a new `camel-aws-bedrock` section right after the existing one. - `BedrockProducer.process` has `@SuppressWarnings("deprecation")` for the switch over the deprecated constants. - No runtime WARN logging: other components with a deprecated operation (minio) do not log one either. ## Tests `BedrockProducerRequestTest.deprecatedStreamingOperationsStillStreamATextModel` checks that both constants carry `@Deprecated` (fails without this change) and that both still stream the text of a text model with a mocked async client. The existing tests that an image or embedding model fails with these operations are unchanged. `mvn clean install -Psourcecheck` in the module: 176 tests, 0 failures (43 ITs skipped, they need AWS). _Claude Code on behalf of Claus Ibsen (davsclaus)_ 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
