Repository navigation
Conversation
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.
Thanks for the quick pace on the providers here: the Requesty and Fluxion entries made this one a straight copy of a pattern that already works.
Summary
Adds a
runcrateprovider to the standalonebughunter/brain.pyLLM layer. Runcrate is an AI cloud with an OpenAI-compatible API (https://api.runcrate.ai/v1) that serves open models, so it plugs into the existing_chat_openai_compatpath like the other gateways. It is opt-in: it is not inPROVIDER_PRIORITY, but a setRUNCRATE_API_KEYmoves it to the front of auto-detect the way the other keyed providers do.Type
Changes
bughunter/brain.py:runcrateinDEFAULT_MODELS(Qwen/Qwen3-235B-A22B-Instruct-2507),PROVIDER_KEY_ENV,_init_provider(Bearer key fromRUNCRATE_API_KEY, basehttps://api.runcrate.ai/v1), the OpenAI-compatible chat dispatch tuple, a shortlist_modelsstarter list, and the module docstring.bughunter/engine.py: setup wizard option 12,--providerhelp andsetup --providerchoices, key maps forsetupandproviders(tierpay-as-you-go), saved-key loading, and the docs header.README.mdprovider table row and aCHANGELOG.mdentry under Unreleased.tests/test_brain_auto_detect.py: five tests (key jumps to the front of auto-detect, init sets base URL and Bearer header and default model, no key stays unavailable, opt-in only, chat uses the OpenAI-compatible path).Test Plan
pytest tests/passes locally:pytest -qgives 1158 passed (1153 onmainbefore this change, plus the 5 new tests), Python 3.12.pytest tests/test_brain_auto_detect.py -q: 20 passed.[CONFIRMED]/[POSSIBLE]/[INFORMATIONAL]confidence states (n/a, no scanner changes)The model ids in the default and starter list exist in
GET https://api.runcrate.ai/v1/modelstoday. I did not make a live chat call, so the request path is covered by the unit tests and the shared OpenAI-compatible code only.Related Issue
None, this adds a provider.
Notes
Disclosure: I work on Runcrate.
This change was prepared with AI assistance (omp with Claude): the code, tests and this description were written with it, and the test commands above were run as part of preparing it.