Add LLMTR API provider
KN
12d ago+87+87+01234567890123456789-8-8-0123456789
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-pro
None of them is enabled by default. GeneralPart.jsx gets an API key setup link for llmtr (https://llmtr.com/dashboard/keys), like the other builtin providers.
Testing:
- Added cases to the provider registry, thin adapter, config predicate and migration tests, and added
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.- I did not build or load the extension in a browser.
No live call to LLMTR was made for this change.
Summary by CodeRabbit
- New Features
- Added LLMTR as a built-in provider, with six available models and a link to its dashboard for API key setup.
- LLMTR sessions now use the app’s existing OpenAI-compatible API handling, including support for legacy LLMTR model names.