Skip to content

feat: add cheapaimodel preset to LLM specs - #362

Merged
msoedov merged 1 commit into
msoedov:mainfrom
nicho810:feat/cheapaimodel-preset
Nov 4, 2026
Merged

msoedov merged 1 commit into
msoedov:mainfrom
nicho810:feat/cheapaimodel-preset

Conversation

@nicho810

@nicho810 nicho810 commented Nov 3, 2026

Copy link
Copy Markdown
Contributor

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 at https://api.cheapaimodel.ai/v1 (models include DeepSeek, GLM, Kimi and Grok).

The preset sends <<PROMPT>> as the user message to deepseek-v4-1-flash, with Authorization: Bearer $CHEAPAIMODEL_API_KEY.

Files (same shape as #361):

  • agentic_security/routes/_specs.py: spec appended to _SPECS and a matching cheapaimodel entry appended to LLM_CONFIGS (same position, so the zip that builds LLM_SPECS stays 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 to https://api.cheapaimodel.ai/v1/chat/completions with the right model and text modality, and probe() 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 --check and flake8 on the changed Python files: clean.
  • Unauthenticated check: GET https://api.cheapaimodel.ai/v1/models without a key returns 401. I did not make a live model call from this branch.

Disclosure: I work on cheapaimodel.

@msoedov

msoedov commented Nov 4, 2026

Copy link
Copy Markdown
Owner

@nicho810 thx for the patch

@msoedov
msoedov merged commit c53cf3c into msoedov:main Nov 4, 2026
2 checks passed
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.

2 participants