Skip to content

feat(brain): add llmtr as an optional OpenAI-compatible provider - #182

Open
knowhycodata wants to merge 1 commit into
awarexone:mainfrom
knowhycodata:feat/llmtr-provider
Open

knowhycodata wants to merge 1 commit into
awarexone:mainfrom
knowhycodata:feat/llmtr-provider

Conversation

@knowhycodata

Copy link
Copy Markdown

Adds llmtr (https://llmtr.com/v1) as an optional provider for the standalone bughunter / brain.py backend, wired exactly like the existing fluxion / requesty gateways.

Closes #181.

What this does

  • OpenAI-compatible endpoint https://llmtr.com/v1, authenticated with LLMTR_API_KEY (standard Authorization: Bearer), routed through the existing _chat_openai_compat path — no new transport code.
  • Default model minimax/minimax-m3.1-flash-free; curated free-tier starter list (full catalog via GET https://llmtr.com/v1/models).
  • Registered in PROVIDER_PRIORITY (only reached when LLMTR_API_KEY is set, so it never preempts an already-configured provider), DEFAULT_MODELS, PROVIDER_KEY_ENV, _init_provider, the chat() compat set and list_models() in brain.py; plus the setup-wizard menu, env/status/tier maps, argparse choices and saved-key loader in engine.py.
  • Factual entries in config.example.json, the README "Free AI Providers" table, and CHANGELOG.md.
  • Tests mirroring the fluxion / requesty cases (test_llmtr_key_jumps_to_front, test_llmtr_init_sets_api_base).

Notes

  • llmtr's genuine free tier is why it's listed in the free-provider table; if you'd rather keep the README table as-is (as with the Fluxion delisting in chore(readme): remove Sidrune/Fluxion sponsor placement #179), just drop that one row — the provider still works from code/config.
  • Disclosure: I'm affiliated with llmtr.com. Reviewing/merging is entirely your call; happy to change the default model, naming, or priority placement.

Testing

  • pytest tests/test_brain_auto_detect.py — new + existing cases.
  • Verified the wiring end-to-end (base URL, Bearer header, free-model list, auto-detect selection, chat() routing) and confirmed the free model IDs against the live https://llmtr.com/v1/models catalog.

Wire llmtr (https://llmtr.com/v1) into the multi-provider brain the same
way as the existing fluxion/requesty gateways: OpenAI-compatible base URL
authenticated with LLMTR_API_KEY, default model
minimax/minimax-m3.1-flash-free, and a curated free-tier model list
(full catalog via GET /v1/models).

Touch points mirror the other providers: PROVIDER_PRIORITY, DEFAULT_MODELS,
PROVIDER_KEY_ENV, the _init_provider branch, the chat() OpenAI-compat set,
and list_models() in brain.py; the setup-wizard menu, env maps, provider
status/tier table, argparse choices and saved-key loader in engine.py; a
config.example.json entry; a factual row in the README provider table; and
auto-detect/init tests mirroring the fluxion/requesty cases.
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-23T10:45:39.576357Z
We couldn’t complete this review. Comment @codex review to try again.
bbdaef4 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@knowhycodata

Copy link
Copy Markdown
Author

Hi @shuvonsec, thanks for going through the backlog. I noticed #181 was closed as completed, but this PR is still open and the provider isn't on main yet, so I wanted to check whether that was intentional.

  • If you'd like it in, it still merges cleanly against current main, and I'm happy to rebase or change the default model, naming or priority placement.
  • If you'd rather not list it in the README's free-provider table (as with chore(readme): remove Sidrune/Fluxion sponsor placement #179), I can drop that row and keep only the code/config wiring.
  • If it isn't a fit for the project, that's completely fine; just let me know and I'll close this PR.

Thanks!

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add llmtr.com as an optional free-tier LLM provider

1 participant