Skip to content

feat(provider): add LLMTR as a bundled gateway provider - #123

Open
knowhycodata wants to merge 2 commits into
CyberStrikeus:devfrom
knowhycodata:feat/llmtr-provider
Open

feat(provider): add LLMTR as a bundled gateway provider#123
knowhycodata wants to merge 2 commits into
CyberStrikeus:devfrom
knowhycodata:feat/llmtr-provider

Conversation

@knowhycodata

@knowhycodata knowhycodata commented Aug 29, 2026

Copy link
Copy Markdown

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.ts drops providers missing from the model list. So the entry is built from the gateway's public /v1/models endpoint, cached beside the models.dev cache and refreshed on the same hourly interval. Merging it in ModelsDev.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_KEY or cyberstrike 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 run through the CLI. 12 new tests; bun test test/provider is 234 pass / 2 fail, both failures pre-existing on dev.

Disclosure: I work at LLMTR.

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.
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant