Repository navigation
feat(llm): add Cheaper Inference as a named OpenAI-compatible gateway - #223
Conversation
LauraGPT
left a comment
There was a problem hiding this comment.
Reviewed 8469e38fb8203d01df26f7f41cbfd21dcb80d501. No blocking regression found in the changed gateway routing.
I independently ran the new provider tests together with the existing OpenAI, OrcaRouter and MiniMax routing/launcher tests: 26 passed. An additional 9 boundary cases passed, executing the actual llm_inference function extracted from the launcher and the actual client wrapper with recording doubles. These checked all four dropdown models plus a custom model, preservation of the system prompt and combined user prompt/subtitles, explicit-key precedence, whitespace/empty base-URL handling, environment-key trimming, and omission of an empty system prompt.
The provider's public documentation confirms https://api.cheaperinference.com/v1 for the OpenAI-compatible client and bare model IDs. Its GPT-5.4 Mini page also shows the bare ID in a chat-completions example. The other model choices appear in the provider's documentation or linked model catalogue.
The checks use mocked completions and execute the launcher function without loading the full Gradio app. I did not repeat the paid live request or a video-clipping/UI run, so these results establish the local routing contract rather than live provider availability or clipping quality.
LauraGPT
left a comment
There was a problem hiding this comment.
The local routing checks and published provider documentation are covered in review #5451920150. The previously approval-held Tests workflow (37007022772) has now completed successfully.
Summary
cheaperinference/model in LLM Model Name, paste the key in APIKEY, and click 'LLM Inference'.CHEAPER_INFERENCE_API_KEYand optionalCHEAPER_INFERENCE_API_BASEalso work.User impact
Users with a Cheaper Inference key can run LLM clipping without code changes.
FunClip removes the
cheaperinference/prefix and sends the bare model id, likeatlascloud/andminimax/.Other providers do not change.
Details
Files:
funclip/llm/openai_api.py: base URL, prefix, and env key in_resolve_model_config.funclip/launch.py: prefix list,openai_callroute, and 4 dropdown models.README.md,README_zh.md: short optional section after OrcaRouter.tests/test_cheaperinference_api.py,tests/test_cheaperinference_launch_integration.py: same cases as the OrcaRouter tests.Live check:
gpt-5.4-minireturned a reply throughopenai_call(..., "cheaperinference/gpt-5.4-mini", ...).Validation
python -m pytest -q tests/test_github_templates.py tests/test_funasr_requirement.py tests/test_installation_docs.py tests/test_openai_api.py tests/test_cheaperinference_api.py tests/test_cheaperinference_launch_integration.py tests/test_orcarouter_api.py tests/test_orcarouter_launch_integration.py tests/test_minimax_api.py tests/test_minimax_launch_integration.py: 40 passedpython -m pytest -q tests/test_gradio_runtime_compat.py tests/test_installation_docs.py tests/test_cli_stage_help.py(gradio 4.44.1): 14 passedpython3 -m py_compile funclip/launch.py funclip/videoclipper.py funclip/utils/subtitle_utils.py: passgit diff --check: cleanScreenshots or clips
No screenshots. The UI change adds 4 entries to the existing LLM model dropdown. I tested the LLM call path, not a full video clip.
Notes for reviewers
Dropdown models:
gpt-5.4-mini,gpt-5.4,claude-sonnet-5,deepseek-v4-flash. Other model ids also work with thecheaperinference/prefix.