SEZ9 opened a new pull request, #11548: URL: https://github.com/apache/seatunnel/pull/11548
### Purpose of this pull request Implements #11547 — adds a `bedrock-mantle` provider so the CLI can use OpenAI-family Bedrock models (e.g. `openai.gpt-5.6-terra`, `openai.gpt-5.6-sol`) that are served exclusively via the OpenAI Responses API on the dedicated `bedrock-mantle` endpoint. These models are not in the foundation-model catalog and reject `Converse`/`InvokeModel`/`ChatCompletions`, so neither the existing `bedrock` nor `openai` provider can reach them (see the issue for the exact rejections). Implementation: - **Endpoint & auth**: `https://bedrock-mantle.{region}.api.aws/openai/v1`; a short-term bearer token is derived from the caller's AWS credentials via `aws-bedrock-token-generator` and refreshed automatically every 30 minutes — no separate OpenAI account or long-lived key needed. - **Format conversion**: bidirectional mapping between the CLI's internal Converse-shaped message format and Responses API items — text messages, `function_call`/`function_call_output` round-trips for the multi-agent tool loop, and streaming event mapping (`output_text.delta`, `output_item.added/done`, `function_call_arguments.delta`, `response.completed`) into the CLI's internal event stream. - **Parameter handling**: these models reject `temperature`; the provider never sends it. - New optional dependency extra `bedrock-mantle` in `pyproject.toml` (boto3 + openai + aws-bedrock-token-generator). Usage: ```bash pip install -e ".[bedrock-mantle]" export AI_PROVIDER=bedrock-mantle export AWS_REGION=us-east-1 export OPENAI_MODEL='openai.gpt-5.6-terra' seatunnel "Sync MySQL users table to S3 Parquet" ``` ### Does this PR introduce _any_ user-facing change? Yes — a new opt-in provider (`AI_PROVIDER=bedrock-mantle`) and a new optional dependency extra, documented in the seatunnel-cli README (Provider Configuration → Option A2). No change to existing providers. ### How was this patch tested? - 9 new unit tests in `tests/test_llm_provider_bedrock_mantle.py`: message/tool format conversion both ways, chat response mapping (text, tool calls, malformed tool-call arguments degrading to `{}`), system-prompt passing as `instructions`, streaming event mapping including integration with `collect_stream`, and bearer-token TTL refresh. Full suite passes (54 tests). - Verified end-to-end against the real `openai.gpt-5.6-terra` and `openai.gpt-5.6-sol` models on Bedrock (us-east-1): non-streaming chat, streaming with tool calls, and multi-turn tool-result round-trips through the CLI's full Planner→Generator→Validator pipeline. Both models completed a 100-task CLI accuracy benchmark through this provider (~2,900 and ~2,500 API calls respectively) without protocol errors. -- 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]
