feat(provider): add LLMTR as a bundled gateway provider - #123
Open
knowhycodata wants to merge 2 commits into
Open
feat(provider): add LLMTR as a bundled gateway provider#123knowhycodata wants to merge 2 commits into
knowhycodata wants to merge 2 commits into
Conversation
LLMTR (https://llmtr.com) is a Türkiye-based, OpenAI-compatible AI gateway. It carries chat models hosted inside Türkiye that no other provider offers - Trendyol Asure, Magibu, Muse Glimmer and local Qwen/Gemma builds - and prices global models below their list rate, so it earns a catalog entry rather than a config snippet. LLMTR is not published on models.dev, so the provider entry is built from the gateway's own public /v1/models endpoint, cached beside the models.dev cache and refreshed on the same hourly interval. Merging it in ModelsDev.get() keeps every consumer - auth login, the model picker, the app's provider settings - on a single provider list. A seeded catalog keeps the Türkiye-hosted models selectable offline and before the first refresh lands. Reasoning variants come from the per-model effort list the catalog publishes rather than the openai-compatible default, since the same upstream model is offered with different effort sets; background title/summarize calls fall back to the cheapest supported effort. Connect with LLMTR_API_KEY or `cyberstrike auth login`.
Scaling the gateway's per-token prices by a million left binary float noise behind - $1e-7/token landed on 0.09999999999999999 instead of 0.1 - and those values are what a session's cost is rendered from. Also drops the data-residency wording from the README: the gateway hosts models in Türkiye, which is the claim worth making, and the compliance framing is the operator's to make, not the client's. Verified live against the gateway: completion, streaming, tool calling, catalog-derived reasoning efforts, a Türkiye-hosted model, and a full agent run through the CLI.
Contributor
|
Thanks for your contribution! This PR doesn't have a linked issue. All PRs must reference an existing issue. Please:
See CONTRIBUTING.md for details. |
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.
Closes #122
Adds LLMTR, an OpenAI-compatible gateway with 188 chat models, including models hosted inside Türkiye (Trendyol Asure, Magibu, Muse Glimmer, local Qwen/Gemma) that no bundled provider currently reaches. Global models are priced below their list rate.
Why it needs code and not a config block: LLMTR isn't on models.dev, and
provider.tsdrops providers missing from the model list. So the entry is built from the gateway's public/v1/modelsendpoint, cached beside the models.dev cache and refreshed on the same hourly interval. Merging it inModelsDev.get()means auth login, the model picker and the app settings all pick it up without separate wiring. A seeded catalog keeps the Türkiye models selectable offline.Reasoning variants come from the per-model effort list the catalog publishes rather than the openai-compatible default — the same upstream model is offered with different effort sets (44 reasoning models, 16 distinct combinations), so the hardcoded low/medium/high guess is wrong for most of them.
Connect with
LLMTR_API_KEYorcyberstrike auth login.Verified live against the gateway, not just unit tests: completion, streaming, tool calling, a catalog-derived reasoning effort, a Türkiye-hosted model, and a full
cyberstrike runthrough the CLI. 12 new tests;bun test test/provideris 234 pass / 2 fail, both failures pre-existing ondev.Disclosure: I work at LLMTR.