feat(providers): add SAP Hyperspace (HAI) native-Anthropic provider - #34
Merged
Merged
Conversation
Adds a 'hyperspace' provider so Claude Code can route through the SAP
Hyperspace AI proxy, which exposes a native Anthropic Messages API at
/anthropic/v1 and delivers Claude, GPT, and Gemini model families through
a single approved endpoint. This lets users select a cheaper/different
model instead of the expensive org default.
Transport mirrors the OpenRouter native path (Bearer auth +
anthropic-version header, shared native SSE block policy). Wired into the
single-source provider catalog, settings (api_key/keys/base_url/proxy/
usage_limit + validators), registry factory, defaults re-export,
.env.example, and README provider docs.
Files: config/provider_catalog.py, config/settings.py, providers/defaults.py,
providers/registry.py, providers/hyperspace/{__init__,client,request}.py,
tests/providers/test_hyperspace.py, .env.example, README.md
Verification: ruff format --check + ruff check pass; full pytest suite
883 passed (5 new). ty check delta is clean — the only 2 new diagnostics
are the pre-existing environment-specific 'providers.base unresolved-import'
false positive that already affects every provider client/test locally and
passes on CI's Linux runner.
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
Adds a
hyperspaceprovider so Claude Code can route through the SAP Hyperspace AI proxy (HAI) — a native Anthropic Messages relay at/anthropic/v1that delivers Claude, GPT, and Gemini model families through one approved endpoint.Why
Lets Claude Code users pick a cheaper/different model (e.g. Gemini or GPT) instead of always paying for the most expensive default model.
How
Transport mirrors the existing OpenRouter native path (Bearer auth +
anthropic-versionheader, shared native SSE block policy). Wired into every provider registration point:config/provider_catalog.py— descriptor + default base URLconfig/settings.py— api_key/keys/base_url/proxy/usage_limit + validator listsproviders/registry.py— factory + registration (passes the sync guard)providers/defaults.py— re-exportproviders/hyperspace/{__init__,client,request}.py— the provider.env.example+README.md— user-facing docsVerification
ruff format --check✅ruff check✅pytest: 883 passed (5 new tests for init, native request body, Bearer/anthropic-version headers, and SSE pass-through)Usage: