Repository navigation
Add LLMTR API provider - #1141
knowhycodata wants to merge 1 commit into
Conversation
LLMTR is an OpenAI-compatible gateway at https://llmtr.com/v1. Add it as a builtin provider with a small preset model group, following the NVIDIA NIM provider. The presets include models hosted in Turkey (llmtr/...) and two routed models.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
PR Summary by QodoAdd LLMTR as a built-in OpenAI-compatible provider
AI Description
Merge Risk
|
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| llmtr_qwen3_8_27b: { | ||
| value: 'llmtr/qwen3-8-27b', | ||
| desc: 'LLMTR (Qwen 3.8 27B, hosted in Turkey)', | ||
| }, | ||
| llmtr_qwen3_6_35b: { | ||
| value: 'llmtr/qwen3-6-35b', | ||
| desc: 'LLMTR (Qwen 3.6 35B-A3B, hosted in Turkey)', | ||
| }, | ||
| llmtr_gemma_4: { | ||
| value: 'llmtr/gemma-4', | ||
| desc: 'LLMTR (Gemma 4, hosted in Turkey)', | ||
| }, | ||
| llmtr_trendyol_asure_12b: { | ||
| value: 'llmtr/trendyol-asure-12b', | ||
| desc: 'LLMTR (Trendyol Asure 12B, hosted in Turkey)', | ||
| }, | ||
| llmtr_claude_sonnet_5: { | ||
| value: 'anthropic/claude-sonnet-5', | ||
| desc: 'LLMTR (Claude Sonnet 5)', | ||
| }, | ||
| llmtr_deepseek_v4_pro: { | ||
| value: 'deepseek/deepseek-v4-pro', | ||
| desc: 'LLMTR (DeepSeek V4 Pro)', | ||
| }, |
There was a problem hiding this comment.
🟡 LLMTR labels missing from localization catalog
The new Models descriptions and ModelGroups label reach t() without English catalog entries. All seven labels violate the localization requirement to register new source strings first.
Learn more
The model picker passes model descriptions through modelNameToDesc, and the provider-type picker translates group descriptions in ApiModes. None of the six new model descriptions or the new group description has an English catalog entry. Missing translations currently display their raw English keys, so this does not block API requests.
Example: Selecting the Qwen preset displays LLMTR (Qwen 3.8 27B, hosted in Turkey) as an unregistered translation key.
Recommended fix: Add all six model descriptions and LLMTR (API) as identity key/value pairs in src/_locales/en/main.json. Preserve existing keys, and avoid duplicating unchanged labels across other locales.
Was this helpful? React with 👍 or 👎 to provide feedback.
[Medium impact] The changes add one optional provider path and a scoped configuration migration. The request path appears sound, but the required English catalog entries must be added before merging. Findings
SummaryAdds LLMTR as a built-in OpenAI-compatible provider with six optional presets.
Acknowledged validation gaps: Reviews (1) · Last reviewed commit: "Add LLMTR API provider" · Reviewed by Greptile |
| }, | ||
| llmtrApiModelKeys: { | ||
| value: llmtrApiModelKeys, | ||
| desc: 'LLMTR (API)', |
There was a problem hiding this comment.
The new LLMTR group and six model labels are passed to t(), but none is registered in src/_locales/en/main.json. AGENTS.md requires new source strings to be added there first. Add all seven labels to the English catalog before merging so translators have the new text in the shared source file.
Context Used: AGENTS.md (source)
Note: If this suggestion doesn't match your team's coding style, reply to this and let me know. I'll remember it for next time!
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 5164f8eafc
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| 'nvidiaNim_inkling', | ||
| 'nvidiaNim_minimax_m3', | ||
| ] | ||
| export const llmtrApiModelKeys = [ |
There was a problem hiding this comment.
Add an LLMTR mode to the default active model list
Profiles get their visible modes from defaultApiModeIds, and this group is not included there. Untouched profiles use that list directly, while customized profiles only receive new modes added to it through reconcileMaterializedApiModeDefaults. As a result, installing or upgrading will not expose any LLMTR model in the normal model picker unless users manually create an API mode in settings. Add at least one LLMTR preset to the default list so the provider is available through the standard flow.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
✅ No new issues found.
Approach: sound — a mechanical mirror of the existing nvidia-nim builtin provider wiring, which touches exactly the set of files that provider touches.
Reviewed changes
- Provider registry — new
llmtrbuiltin entry (https://llmtr.com/v1+/chat/completions), plusllmtr_*/llmtrApiModelKeyslegacy preset resolution inresolveProviderIdFromLegacyModelName. - Config —
llmtrApiModelKeysgroup with six presets,ModelGroups/Modelsentries,llmtrApiKeydefault,isUsingLlmtrApiModel, andllmtrinNEWLY_RESERVED_BUILTIN_PROVIDER_IDSso an existing custom provider with that id is migrated likexai/nvidia-nim/mistral. - Mappings and routing — legacy key field and group-to-provider mapping, and background routing through the OpenAI-compatible session path.
- Popup — API key setup link for the provider.
- Tests — predicates, registry resolution, thin adapter base URL/secret wiring, and migration/import fixtures extended with
llmtr.
Everything else that a provider addition has to touch is already generic: manifest.json covers the endpoint via <all_urls>, no DNR rules are provider-specific, the popup provider/model selectors are driven by ModelGroups and the registry, and README does not enumerate providers.
Validation on my side: npm test passes 1111/1111, and eslint plus prettier --check are clean on all ten changed files. Since the PR notes no live call was made, I checked the contract directly: all six preset ids appear in GET https://llmtr.com/v1/models, and POST https://llmtr.com/v1/chat/completions returns a 401 auth_error rather than a 404, so the configured base URL and path resolve as intended.
deepseek-v4.1-flash-1017 (free via Pullfrog for OSS) | 𝕏

This adds LLMTR as a builtin API provider. LLMTR is an OpenAI-compatible gateway at
https://llmtr.com/v1. It serves some models from servers in Turkey (llmtr/...ids) and routes others to their upstream providers.The change follows the NVIDIA NIM provider:
provider-registry.mjs: newllmtrbuiltin entry (https://llmtr.com/v1+/chat/completions) and legacy preset resolution forllmtr_*/llmtrApiModelKeys.openai-provider-mappings.mjs:llmtrApiKeylegacy key field and group mapping.config/index.mjs:llmtrApiModelKeysgroup ("LLMTR (API)"), six presets,llmtrApiKeydefault,isUsingLlmtrApiModel, andllmtradded toNEWLY_RESERVED_BUILTIN_PROVIDER_IDSso an existing custom provider namedllmtris migrated the same way asxai,nvidia-nimandmistral.background/index.mjs: route the group through the OpenAI-compatible path.popup/sections/GeneralPart.jsx: API key setup link forllmtr.Presets:
llmtr/qwen3-8-27b(Qwen 3.8 27B, hosted in Turkey)llmtr/qwen3-6-35b(Qwen 3.6 35B-A3B, hosted in Turkey)llmtr/gemma-4(Gemma 4, hosted in Turkey)llmtr/trendyol-asure-12b(Trendyol Asure 12B, hosted in Turkey)anthropic/claude-sonnet-5deepseek/deepseek-v4-proNone of them is enabled by default.
GeneralPart.jsxgets an API key setup link forllmtr(https://llmtr.com/dashboard/keys), like the other builtin providers.Testing:
llmtrto the "all migrations completed" fixtures.npm testontests/unit: 1111 passed.prettier --checkandeslinton the changed files: clean. The two-line setup-link case was added afterwards and only syntax-checked (esbuild); it follows the format of the cases around it.No live call to LLMTR was made for this change.
Summary by CodeRabbit