feat(openinfer): add OpenInfer as an OpenAI-compatible provider#34623
Open
AJ-ing wants to merge 1 commit into
Open
feat(openinfer): add OpenInfer as an OpenAI-compatible provider#34623AJ-ing wants to merge 1 commit into
AJ-ing wants to merge 1 commit into
Conversation
Register OpenInfer via the JSON provider registry so users can call `openinfer/<model>` with OPENINFER_API_KEY. Adds enum/constants routing, URL autodetection, endpoint matrix entry, a placeholder model price row, and unit tests. Fixes BerriAI#34357 Co-authored-by: Cursor <cursoragent@cursor.com>
Contributor
Greptile SummaryAdds OpenInfer as a JSON-configured OpenAI-compatible chat provider.
Confidence Score: 5/5The PR appears safe to merge with no concrete blocking or independently actionable issues identified. OpenInfer is consistently registered across provider resolution, shared OpenAI-compatible dispatch, endpoint metadata, model metadata, and focused configuration tests.
|
| Filename | Overview |
|---|---|
| litellm/llms/openai_like/providers.json | Registers OpenInfer with the shared OpenAI GPT configuration and chat-completions endpoint. |
| litellm/litellm_core_utils/get_llm_provider_logic.py | Adds default OpenInfer endpoint detection and environment-key resolution consistent with neighboring JSON providers. |
| litellm/types/utils.py | Adds the OpenInfer provider enum needed for provider lookup and dispatch. |
| model_prices_and_context_window.json | Adds OpenInfer model context, capability, and zero-cost metadata without an established changed-code defect. |
| tests/test_litellm/llms/openai_like/test_openinfer_provider.py | Covers provider registration, JSON configuration, prefixed routing, environment overrides, endpoint detection, and URL generation. |
Reviews (1): Last reviewed commit: "feat(openinfer): add OpenInfer as OpenAI..." | Re-trigger Greptile
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
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
openinfer) as a JSON-configured OpenAI-compatible providerhttps://api.openinfer.ai/v1(overridable viaOPENINFER_API_BASE)OPENINFER_API_KEY/v1/chat/completions(as requested in [Feature]:Add OpenInfer Provider #34357)Motivation
OpenInfer asked for a native LiteLLM provider in #34357 so users don't need the generic OpenAI-compatible path. This follows the same pattern as other JSON providers (e.g. Pinstripes).
Test plan
tests/test_litellm/llms/openai_like/test_openinfer_provider.pypytest tests/test_litellm/llms/openai_like/test_openinfer_provider.pylitellm.completion(model="openinfer/<model>", api_key=...)when a key is availableCloses #34357
Made with Cursor