Repository navigation
feat: add cheapaimodel preset to LLM specs - #362
Merged
Merged
Conversation
msoedov
approved these changes
Nov 4, 2026
Owner
|
@nicho810 thx for the patch |
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 cheapaimodel preset in the LLM spec list, so a model behind cheapaimodel can be picked as a scan target in the UI and through
GET /v1/llm-specs, the same way the Runcrate preset added in #361 works. cheapaimodel is an OpenAI-compatible chat completions gateway athttps://api.cheapaimodel.ai/v1(models include DeepSeek, GLM, Kimi and Grok).The preset sends
<<PROMPT>>as the user message todeepseek-v4-1-flash, withAuthorization: Bearer $CHEAPAIMODEL_API_KEY.Files (same shape as #361):
agentic_security/routes/_specs.py: spec appended to_SPECSand a matchingcheapaimodelentry 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_cheapaimodel_spec.py: the preset parses to a POST tohttps://api.cheapaimodel.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(Python 3.15,poetry install): 355 passed, 1 skipped.black --checkandflake8on the changed Python files: clean.GET https://api.cheapaimodel.ai/v1/modelswithout a key returns 401. I did not make a live model call from this branch.Disclosure: I work on cheapaimodel.