Repository navigation
feat: add hostinger router provider - #699
Open
ricardasbitinas-jpg wants to merge 1 commit into
Open
ricardasbitinas-jpg wants to merge 1 commit into
ricardasbitinas-jpg wants to merge 1 commit into
Conversation
Add Hostinger Router (https://router.hostinger.com/v1) as an OpenAI-compatible provider, with a generator that builds the config from the public /v1/models endpoint and is wired into the update workflow. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
CONTRIBUTING.md.What
Adds Hostinger Router as an
openai-compatprovider.https://router.hostinger.com/v1$HOSTINGER_ROUTER_API_KEYclaude-sonnet-5(large),gpt-5-mini(small)claude-sonnet-5-eu) for data residencyFollows the Atlas Cloud pattern (#463):
cmd/hostinger-router/main.go: generator that reads the public, unauthenticatedGET /v1/modelsinternal/providers/configs/hostinger-router.json: generated outputproviders.go,KnownProviders(),Taskfile.yaml(gen:hostinger-router) andupdate.yml, so the 6-hourly job keeps the list currentModel selection
A model is included if the catalog lists it on
/v1/chat/completions, with text in/out,toolssupport and a context window of at least 20k. That leaves out embeddings, image, audio and Responses-only models. These are the same filters as the OpenRouter and Atlas Cloud generators.Data source
All values come from
/v1/models:input_cache_readmaps tocost_per_1m_out_cachedandinput_cache_writetocost_per_1m_in_cached.context_windowcomes fromcontext_length.default_max_tokensuses the Atlas Cloud rule: half ofmax_output_tokens, capped at 15% of the context window.supports_attachmentsis set whenarchitecture.input_modalitiesincludesimage.can_reasonandlow/medium/highlevels are set for models whosesupported_parametersincludereasoning_effort(66 of 119). Claude and Phi models are left out: withreasoning_efforton chat completions, Claude replies with Anthropic finish reasons (tool_useinstead oftool_calls), which stops Crush's tool loop, and the Phi reasoning models reject the parameter.Testing
go build ./...,go vet ./...,gofmt -l .,gofumpt -l: cleango test ./...: pass (includingTestValidDefaultModelsandTestKnownProvidersMatchesRegistry)golangci-lint run ./...(v2.13.1, Go 1.26.10): 0 issuesgo run ./cmd/hostinger-router/main.go:Generated hostinger-router.json with 119 modelsmain, built locally) withCATWALK_URL=http://localhost:8080against this branch's server (thetask run+task run:catwalksetup):crush models hostingerlists all 119hostinger-router/*modelsLive test (2026-10-23, base URL and model IDs from the generated JSON):
reasoning_effort: mediumwas also sent to each base model that gets reasoning levels here, plus a few regional variants. All returned HTTP 200, streaming and non-streaming.Disclosure: I work at Hostinger. I'm happy to keep this provider's model list up to date.
馃 Generated with Claude Code