Repository navigation
feat(providers): add LLMTR as an OpenAI-compatible gateway - #1181
Open
knowhycodata wants to merge 1 commit into
Open
knowhycodata wants to merge 1 commit into
knowhycodata wants to merge 1 commit into
Conversation
LLMTR serves other vendors' models, and a few of its own, at https://llmtr.com/v1. The entry matches the other resale gateways: OpenAI's driver, the address in config, no default model, and the published id left intact. A model published as llmtr/<name> is stored as llmtr/llmtr/<name> so that leading segment is sent upstream.
Member
Windows compatibility review — PR #1181Reviewed head FindingsNo Windows-specific issues found. The change is a provider registry entry for LLMTR plus its config field, onboarding row, pinned test counts/baselines, docs licence note, and an SVG asset. It adds no OS-specific API, path handling, subprocess, installer, or packaging surface; Verification (native Windows 11, isolated worktree)
No issues to report; no changes requested. |
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.
Summary
Adds LLMTR (https://llmtr.com) as a gateway provider. LLMTR serves other vendors' models, and a few of its own, behind one OpenAI-compatible API at
https://llmtr.com/v1. Disclosure: I maintain LLMTR.The change follows the Opper addition (#869):
raven/providers/registry.py: aProviderSpecat the end of the resale gateway block. It uses OpenAI's driver, is identified byllmtr.comin the address, usesOPENAI_API_KEYas the driver's variable, and has no default model and no shortlist.strip_model_prefixstays off. A model LLMTR publishes asllmtr/<name>is stored asllmtr/llmtr/<name>, so that segment is sent upstream. LLMTR declares a chat address only. A family guess that would send a model to /v1/responses steps aside, so a chat-only id such as qwen/qwen3.8-27b-free stays on chat completions.native_api_bases=(("chat", ...),). Raven infersresponsesforqwen,deepseek,gpt,kimiandminimaxids, and a gateway with no declared addresses accepts that guess at its default base; many LLMTR models are chat-only (qwen/qwen3.8-27b-freereturns a 400 on/v1/responses). It works the same way as for Moonshot and Groq. A user who setsprotocolexplicitly still gets what they set.raven/config/schema.py:ProvidersConfig.llmtr.raven/cli/onboard_commands.py: a row in the onboarding key group.ui-web/src/assets/providers/llmtr.svgandProviderMark.tsx: the vendor mark,hybridtone (crescent incurrentColor, star kept red), with aLICENSES/README.mdentry.ui-web/CONTEXT.md,ProviderSide.tsx,Roles.tsx, the registry docstring and the gateway block comment).NO_SHORTLIST_VENDORS,tests/data/wire_model_baseline.json(only the newllmtrblock), andllmtradded totest_an_inferred_native_protocol_steps_aside_where_the_provider_has_no_address_for_it.Keys: https://llmtr.com/dashboard/api-keys
Runcrate (#1143) and Atlas Cloud (#1009) also move the counts to fifty-seven. Whichever lands first, I'll rebase and bump the numbers.
Type
Verification
uv run --frozen --python 3.12 --all-extras pytest -q tests/test_provider_protocol.py tests/test_provider_catalog.py tests/test_provider_wire_model.py tests/test_litellm_provider_model_names.py: 839 passed, 7 skippedpytest tests -k 'protocol or provider or registry or factory': the same set of failures as onmain, nothing new.ruff check raven tests: clean.ruff format --checkon the touched Python files: already formatted.Live check with a real key through Raven's own factory:
Configwithproviders.llmtr.apiKeyand modelllmtr/qwen/qwen3.8-27b-freegives providerllmtrandget_api_basehttps://llmtr.com/v1.make_providerlogs that the responses guess steps aside to chat and returns aLiteLLMProvider. Onechat(..., max_tokens=32)call went toPOST https://llmtr.com/v1/chat/completionswith modelqwen/qwen3.8-27b-freeand returnedLLMTR_OK(finish_reason stop, 20 prompt / 5 completion tokens, about 1.3 s). Before thenative_api_basesline was added, the same call went to/v1/responsesand got a 400.Relevant tests pass locally
Relevant lint / type checks pass locally (ruff;
tyand the fullmake cinot run)User-facing docs or screenshots are updated when needed (no screenshot attached; the row shows up in Settings → Providers)
Risk
Related Issues
Fixes #1180