PSA-Team-source commented on PR #13260: URL: https://github.com/apache/seatunnel/pull/13260#issuecomment-6981795107
Thanks for the detailed review. All four findings are addressed in e08f957f2 (one commit on top of the reviewed head). 1. **Model flags for a saved or auto-detected provider (Issue 1).** New `resolve_provider_name()` in `llm_provider.py` uses the same order as `create_provider` (flag, `AI_PROVIDER`, `config.json`, credential auto-detection). `main` now calls it before routing `--model` / `--fast-model`, so the flags reach the provider that will really be created. This is the shared routing code, so a saved `orcarouter` / `openai` provider gets the same fix. Tests: saved config, auto-detection from `UBERLLM_API_KEY`, and `--provider` still winning over a saved provider. 2. **Key prompt (Issue 2).** The UberLLM key prompt in setup now uses `is_password=True`. A test drives `run_init` and checks that the key prompt is in password mode and that the entered value is not in the console output. 3. **Test isolation (Issue 3).** The UberLLM tests now clear the environment (`clear=True`) and replace the `openai` module, so no real SDK client is created. Added constructor tests: model precedence (`UBERLLM_*`, then `OPENAI_*`, then defaults), no fallback to `OPENAI_API_KEY`, and `OPENAI_BASE_URL` ignored. 4. **Constructor contract (Issue 4).** `UberLLMProvider.__init__` has a docstring covering the required credential, model precedence, the fixed base URL and what it raises. Docs (EN/ZH quickstart and both READMEs) now also state that `UBERLLM_SMALL_FAST_MODEL` falls back to `OPENAI_SMALL_FAST_MODEL`. Checked locally in `seatunnel-cli`: `ruff check .` (0.16.7) passes; `pytest tests/test_cli_provider_routing.py tests/test_llm_provider_uberllm.py` 18 passed, and the three new routing/prompt tests fail when the `cli.py` change is reverted. In the full `pytest tests` run the only failures are the 13 in `test_llm_provider_bedrock_mantle.py`, because the optional AWS packages are not installed here. Not done: a paid request or a live tool-call round trip against the gateway. The Build check still shows "Action required" on this head; that needs a maintainer to approve the workflow run. -- 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]
