Repository navigation
feat: add Hostinger Router as an OpenAI-compatible provider - #44863
Open
algirdasci wants to merge 1 commit into
Open
algirdasci wants to merge 1 commit into
algirdasci wants to merge 1 commit into
Conversation
algirdasci
requested review from
kerry-berri,
mateo-berri and
ryan-crabbe-berri
as code owners
October 6, 2026 14:22
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Contributor
|
Contributor
algirdasci
force-pushed
the
add-hostinger-router-provider
branch
from
October 6, 2026 15:03
4aa16ef to
4962952
Compare
Adds hostinger_router (https://router.hostinger.com/v1) to the JSON-configured openai_like providers with chat completions, responses, and messages endpoints, cost-map entries for claude-sonnet-5 and the two text-embedding-3 models (credits converted at 1 credit = $0.01), the endpoint-support matrix, Admin UI add-model form fields and logo, and respx-mocked unit tests covering all declared endpoints.
algirdasci
force-pushed
the
add-hostinger-router-provider
branch
from
October 7, 2026 05:12
4962952 to
25735ca
Compare
This branch has not been deployed
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.
TLDR
Problem this solves:
How it solves it:
hostinger_router/as a JSON-configured OpenAI-compatible providerclaude-sonnet-5andgpt-5.2so spend is trackedUser Flow
Before: a developer with a Hostinger Router key cannot route a request through LiteLLM
litellm.completion(model="hostinger_router/claude-sonnet-5", ...)BadRequestError: LLM Provider NOT providedbefore any request is sentopenai/with a manualapi_base, which loses provider naming and cost trackingAfter: the same call returns a completion and logs real spend
HOSTINGER_ROUTER_API_KEYand calllitellm.completion(model="hostinger_router/claude-sonnet-5", ...)https://router.hostinger.com/v1/chat/completionsand returns 200Pre-Submission checklist
tests/unit/llms/openai_like/test_hostinger_router_provider.py)uv run pytest tests/unit/llms/openai_like/ -q(12 hostinger_router tests pass)Screenshots / Proof of Fix
Setup: local proxy on :4000 with
HOSTINGER_ROUTER_API_KEYexported,config.yamlcontaining:Before (merge base)
chat/completions
curl http://0.0.0.0:4000/v1/chat/completions -H "Authorization: Bearer sk-1234" -d '{"model":"claude-sonnet-5","messages":[{"role":"user","content":"hi"}]}'LLM Provider NOT provided ... model=hostinger_router/claude-sonnet-5After ()
chat/completions
chat.completionbody and non-zero spend in/ui/?page=logsresponses
curl http://0.0.0.0:4000/v1/responses -H "Authorization: Bearer sk-1234" -d '{"model":"gpt-5.5","input":"hi"}'(with ahostinger_router/gpt-5.5entry added to the config)responseobjectresponses (gpt-5.2)
curl http://0.0.0.0:4000/v1/responses -H "Authorization: Bearer sk-1234" -d '{"model":"gpt-5.2","input":"hi"}'(with ahostinger_router/gpt-5.2entry in the config)responseobjectmessages
curl http://0.0.0.0:4000/v1/messages -H "x-api-key: sk-1234" -H "anthropic-version: 2023-06-01" -d '{"model":"claude-sonnet-5","max_tokens":32,"messages":[{"role":"user","content":"hi"}]}'messagebodyType
🆕 New Feature
Caveats (if any)
Medium
/v1/embeddingsis not wired: JSON-configured providers have no embedding dispatch inmain.pytoday (pre-existing gap,prismfails the same way). The two embedding models were removed from the cost map so nothing priced is unroutable.https://router.hostinger.com/v1/models(keyless, like OpenRouter's), which is also thesourceon each entrysupported_endpoints/supported_parameterson/v1/models.Low
/v1/responsesworks for GPT-family models only; Claude models do not serve it. The docs page says so explicitly.Final Attestation