Repository navigation
feat: add Runcrate preset to LLM specs - #361
Merged
Merged
Conversation
Owner
|
@heydryft thx for the patch |
Contributor
Author
|
Thanks @msoedov for merging the preset! Glad agentic_security can scan against Runcrate models out of the box. |
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.
What this adds
A Runcrate preset in the LLM spec list, so a Runcrate-hosted model can be picked as a scan target in the UI and through
GET /v1/llm-specs, the same way the Together.ai and OpenRouter presets work. Runcrate serves open-weight models (DeepSeek, Qwen, Kimi, GLM, gpt-oss and others) behind an OpenAI-compatible chat completions API athttps://api.runcrate.ai/v1.The preset sends
<<PROMPT>>as the user message todeepseek-ai/DeepSeek-V4-Flash, withAuthorization: Bearer $RUNCRATE_API_KEY.Files:
agentic_security/routes/_specs.py: spec appended to_SPECSand a matchingRuncrateentry appended toLLM_CONFIGS(same position, so thezipthat buildsLLM_SPECSstays aligned). It uses the existing fallback icon,/icons/myshell.png.agentic_security/static/base.js: the same spec and config appended to the UI lists.tests/unit/test_runcrate_spec.py: the preset parses to a POST tohttps://api.runcrate.ai/v1/chat/completionswith the right model and text modality, andprobe()sends the prompt as a valid JSON user message (the HTTP call is stubbed).Checks run
pytest tests/unit: 353 passed, 1 skipped.pytest tests: 430 passed, 3 skipped, 22 deselected, 1 error. The error istests/system/test_lib.py::TestLibraryLevel::test_class(FileNotFoundError), and it errors the same way onmainwithout this change.black --checkandflake8on the changed Python files: clean.Runcrateentry fromLLM_SPECS, put a real key in place of$RUNCRATE_API_KEY, and ranLLMSpec.verify(). It returned HTTP 200 fromdeepseek-ai/DeepSeek-V4-Flashwith finish reasonstop.This PR was prepared with AI assistance (omp with Claude): the preset, the test and this description were written with it, and the commands and live call above were run as described.