PSA-Team-source opened a new pull request, #13260:
URL: https://github.com/apache/seatunnel/pull/13260

   ### Purpose of this pull request
   
   Adds `uberllm` as a provider for the SeaTunnel AI CLI (`AI_PROVIDER=uberllm` 
/ `--provider uberllm`). UberLLM is an OpenAI-compatible gateway: one prepaid 
key for many chat models (Claude, GPT, Gemini, DeepSeek, Qwen, GLM, ...) at 
`https://api.uberllm.dev/v1`, with `vendor/model` ids that `GET /v1/models` 
lists without a key. That lets a CLI user pick a strong model for planning and 
a cheap one for the fast-model calls on the same key, e.g. 
`deepseek/deepseek-v4-pro` + `deepseek/deepseek-v4.1-flash` (the defaults here; 
both support tool calls for the connector-lookup loop).
   
   Mirrors #11997 (OrcaRouter): `UberLLMProvider` subclasses `OpenAIProvider` 
and only sets the base URL, `UBERLLM_API_KEY`, `UBERLLM_MODEL` / 
`UBERLLM_SMALL_FAST_MODEL` and `UBERLLM_ECHO_REASONING_CONTENT`. It is 
registered in `_PROVIDERS`, `_auto_detect_provider` (after OrcaRouter, before 
OpenAI), the config-file model overrides, `--provider`, the `--init` wizard 
(choice 6) and `/status`. Docs: `seatunnel-cli/README.md`, `README.zh-CN.md`, 
`env.example.sh`, `setup.sh`, `docs/en|zh/ai-cli/overview.md` and 
`quickstart.md`.
   
   ### Does this PR introduce _any_ user-facing change?
   
   Yes: a new `uberllm` value for `AI_PROVIDER` / `--provider`, a sixth choice 
in `seatunnel --init`, and the docs above. Existing providers behave as before.
   
   ### How was this patch tested?
   
   - New `tests/test_llm_provider_uberllm.py` (defaults, missing key, 
echo-reasoning env, streaming and non-streaming through the OpenAI path, 
config-file overrides) and a routing case in 
`tests/test_cli_provider_routing.py`.
   - `python -m pytest tests` in `seatunnel-cli`: 385 passed (378 before this 
change). `ruff check .` (0.16.7): all checks passed.
   - Live run through `create_provider()` with `AI_PROVIDER=uberllm`: `chat()` 
and `chat_stream()` both returned 200 with real output.
   
   Tested with deepseek/deepseek-v4.1-flash: `create_provider().chat()` 
answered "SeaTunnel MySQL CDC source connector" (stopReason `end_turn`, 
reasoning content kept as `reasoningContent`), and `chat_stream()` returned 
"OK".
   
   Per-model prices: https://uberllm.dev/models
   
   ### Check list
   
   * [ ] If any new Jar binary package adding in your PR, please add License 
Notice according
     [New License 
Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/developer/new-license.md)
 (no new jars)
   * [x] If necessary, please update the documentation to describe the new 
feature. https://github.com/apache/seatunnel/tree/dev/docs
   * [ ] If necessary, please update `incompatible-changes.md` to describe the 
incompatibility caused by this PR. (no incompatible change)
   * [ ] If you are contributing the connector code, please check that the 
following files are updated: (not a connector)
   
   I work on UberLLM.
   


-- 
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