SEZ9 opened a new pull request, #11509:
URL: https://github.com/apache/seatunnel/pull/11509
### Purpose of this pull request
Fixes #11508 — two cases where the CLI fails on or rejects valid input:
1. **Bedrock `temperature` rejection**: newer Claude models on Bedrock (e.g.
`us.anthropic.claude-sonnet-5`) reject the `temperature` inference parameter
with a `ValidationException` ("`temperature` is deprecated for this model"), so
every CLI call fails. `BedrockProvider.chat`/`chat_stream` now catch this
specific rejection, retry once without `temperature`, and cache the model id so
subsequent calls skip the failed attempt. Behavior for models that accept
`temperature` is unchanged.
2. **Engine template variables misreported**: `validate_hocon` treated every
`${xxx}` placeholder as an environment variable, so the engine-resolved file
sink template variables `${now}`, `${uuid}`, `${transactionId}` (see
`docs/en/connectors/sink/LocalFile.md`, `file_name_expression`) were reported
as "Unresolved environment variables" and valid configs were rejected — which
also caused the auto-fix loop to "repair" configs that were never broken. These
three engine template variables are now excluded from the env-var check.
### Does this PR introduce _any_ user-facing change?
No behavior change for previously-working setups. Two previously-failing
valid cases now work:
- The CLI is now usable with Bedrock models that reject `temperature`.
- Configs using `${now}`/`${uuid}`/`${transactionId}` in file sink
`file_name_expression` now pass local validation instead of being rejected.
### How was this patch tested?
- Existing test suite passes (29 tests, `python3 -m pytest tests/`).
- Fix 1 verified against the real Bedrock model
`us.anthropic.claude-sonnet-5`: first call gets rejected, retry without
temperature succeeds (both `chat` and `chat_stream` paths), model id cached so
the second call skips the retry.
- Fix 2 verified by validating a LocalFile sink config with
`file_name_expression = "${now}"`: previously `INVALID` (unresolved env var),
now passes; a genuinely-unresolved `${MY_VAR}` is still reported as before.
- Both issues were found (and the fixes exercised end-to-end) by a 100-task
accuracy benchmark run of the CLI across 7 Bedrock models.
🤖 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]