feat(providers): Support DeepInfra as an LLM provider#5521
Open
ats3v wants to merge 1 commit intoNousResearch:mainfrom
Open
feat(providers): Support DeepInfra as an LLM provider#5521ats3v wants to merge 1 commit intoNousResearch:mainfrom
ats3v wants to merge 1 commit intoNousResearch:mainfrom
Conversation
15cc954 to
e3cc103
Compare
9b24f0c to
c7fe34f
Compare
c7fe34f to
2da92e5
Compare
2da92e5 to
48e309d
Compare
48e309d to
47de1be
Compare
Author
|
@alt-glitch PR up to date and passing all tests. Would really appreciate a review. Thank you! |
ebd0a12 to
65845f4
Compare
65845f4 to
6f97129
Compare
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.
What does this PR do?
Adds DeepInfra as a first-class LLM provider, giving users access to 100+ top open source and frontier models (GLM-5, DeepSeek-V3+, Qwen3+, Kimi-K2+, Nemotron, etc.) via a single API key.
DeepInfra is one of the largest open-model inference platforms and a top provider on OpenRouter. This integration lets users connect directly — lower latency, simpler billing, no middleman.
The implementation follows the exact same pattern as HuggingFace, KiloCode, and other API-key providers. Purely additive — no changes to existing provider behavior.
Related Issue
N/A — new provider integration.
Type of Change
Changes Made
hermes_cli/auth.py— RegisterdeepinfrainPROVIDER_REGISTRY(api_key auth,https://api.deepinfra.com/v1/openai) +deep-infraaliashermes_cli/config.py— AddDEEPINFRA_API_KEYandDEEPINFRA_BASE_URLtoOPTIONAL_ENV_VARShermes_cli/models.py— Add 19 curated models, provider label, alias, and display orderinghermes_cli/main.py— Add to provider selection menu,--providerCLI choices, and_model_flow_api_key_providerdispatchagent/auxiliary_client.py— Registermistralai/Mistral-Nemo-Instruct-2407as default auxiliary model (fast, cheap, reliable for summarization)agent/model_metadata.py— Adddeepinfra/deep-infrato provider prefixes andapi.deepinfra.comto URL-to-provider mapping.env.example/cli-config.yaml.example— Document the new env var and provider optiontests/test_api_key_providers.py— 7 new tests: registration, env vars, base URL, alias resolution, auto-detection, model list consistencyHow to Test
hermes model # Select "DeepInfra" from the menu
hermes chat --provider deepinfra -m "deepseek-ai/DeepSeek-V3-0324" -q "Hello"
hermes chat --provider deepinfra -m "deepseek-ai/DeepSeek-V3-0324" -t terminal -q "List files in the current directory"
With only DEEPINFRA_API_KEY set (no other provider keys), hermes chat auto-selects DeepInfra.
pytest tests/test_api_key_providers.py -k deepinfra -v
Checklist
Code
fix(scope):,feat(scope):, etc.)pytest tests/ -qand all tests passDocumentation & Housekeeping
docs/, docstrings) — or N/Acli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/AScreenshots / Logs