feat(llm): add Cheaper Inference as a named OpenAI-compatible gateway - #223
Open
aiapienthusiast wants to merge 1 commit into
Open
aiapienthusiast wants to merge 1 commit into
aiapienthusiast wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.