oscerd opened a new pull request, #24248:
URL: https://github.com/apache/camel/pull/24248

   ## CAMEL-23464
   
   ### Problem
   `BedrockAgentConfiguration.modelId` (the `aws-bedrock-agent` component) was 
declared `@Metadata(required = true)` with a stale enum of three **retired** 
Anthropic Claude model ids (`anthropic.claude-instant-v1`, 
`anthropic.claude-v2`, `anthropic.claude-v2:1`).
   
   However **none** of the operations served by `aws-bedrock-agent` read 
`modelId`:
   - Producer: `startIngestionJob`, `listIngestionJobs`, `getIngestionJob`
   - Consumer: ingestion-job poll
   
   It was a copy-paste artifact from the sibling `aws-bedrock-agent-runtime` 
component, where `modelId` is genuinely used (`retrieveAndGenerate` → 
`modelArn`). Even the dead header constant kept the runtime name: 
`BedrockAgentConstants.MODEL_ID = "CamelAwsBedrockAgentRuntimeModelId"`.
   
   Forcing users to set a stale, retired, **required** model id for an 
unrelated ingestion operation was misleading and caused endpoint-validation 
friction with no functional benefit. The component's own integration tests 
never set it.
   
   ### Fix
   Removed the `modelId` artifact from the `aws-bedrock-agent` component:
   - `BedrockAgentConfiguration`: dropped the `modelId` field + `getModelId()` 
/ `setModelId()`.
   - `BedrockAgentEndpoint`: dropped the `getServiceMetadata()` override (its 
only entry was `modelId`; it now uses the `EndpointServiceLocation` default) 
and the now-unused imports.
   - `BedrockAgentConstants`: removed the unused `MODEL_ID` header constant.
   - Regenerated the component/endpoint configurers, URI factory, component 
JSON metadata, catalog, and endpoint/component DSL builders.
   
   `aws-bedrock-agent-runtime` and `aws-bedrock` are **unaffected** — `modelId` 
remains valid and functional there.
   
   ### Breaking change
   Removing the `modelId` endpoint option is a minor breaking change: routes 
that previously set `&modelId=...` on an `aws-bedrock-agent` endpoint (a value 
that had no effect) must remove it. Documented in the 4.21 upgrade guide.
   
   ### Tests
   Added `BedrockAgentEndpointTest`:
   - `ingestionEndpointResolvesWithoutModelId` — the endpoint now resolves 
cleanly without `modelId`.
   - `modelIdOptionIsNoLongerSupported` — supplying `modelId` now fails 
endpoint resolution instead of being silently accepted.
   
   All `camel-aws-bedrock` unit tests pass (100).
   
   ### Docs
   Added an entry under the existing `camel-aws-bedrock` section in 
`camel-4x-upgrade-guide-4_21.adoc`.
   
   ---
   _Claude Code on behalf of Andrea Cosentino._
   
   🤖 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]

Reply via email to