Skip to content

feat: add Morse preset to LLM specs - #407

Merged
msoedov merged 1 commit into
msoedov:mainfrom
askmorse:feat/morse-provider
Dec 1, 2026
Merged

msoedov merged 1 commit into
msoedov:mainfrom
askmorse:feat/morse-provider

Conversation

@askmorse

@askmorse askmorse commented Dec 1, 2026 •

Copy link
Copy Markdown

What this changes

Adds a Morse preset to the LLM specs, in the same three-file shape as the TeamoRouter preset (#395, commit 762f851) that CONTRIBUTING.md points to. Morse is an OpenAI-compatible inference API for open-weight models (DeepSeek, GLM, Qwen, Kimi, Gemma and others), including uncensored variants of DeepSeek, GLM, Qwen and Kimi, that keeps no data on any model, so people serving or fine-tuning those models can point a scan at them through one key.

  • agentic_security/routes/_specs.py: a POST https://inference.trymorse.ai/v1/chat/completions spec (Bearer $MORSE_API_KEY, model deepseek/deepseek-v4.1-flash) appended to _SPECS after TeamoRouter, and the matching {"name": "Morse", ...} row appended to LLM_CONFIGS, so the zip stays aligned (both lists are 21 long).
  • agentic_security/static/base.js: the same spec and name appended to the UI lists, with the fallback icon like the other recent presets.
  • tests/unit/test_morse_spec.py: asserts the spec parses (method, URL, Bearer $MORSE_API_KEY, model, text modality) and drives one request through httpx.MockTransport (patched in for httpx.AsyncHTTPTransport), checking method, URL and that the prompt goes out as the single user message. No network.

Keys come from https://console.trymorse.ai; the model list is public at GET https://inference.trymorse.ai/v1/models.

I'm on the Morse team.
Morse also runs Built with Morse, a revenue share for open-source projects that ship Morse as a provider: terms and sign-up.
More about the Morse inference API.

How it was tested

  • I don't have Python 3.15 here, so I couldn't run the full suite. I ran test_morse_spec.py and test_teamorouter_spec.py under Python 3.12 against http_spec.py and routes/_specs.py from this branch, with config.settings_var and core.app.get_secrets stubbed out (and the one 3.14-style except A, B: line parenthesised in that scratch copy only): 4 passed. CI will run the real thing.
  • _SPECS and LLM_CONFIGS are both 21 entries, last pair Morse with its own URL (checked with ast).
  • node --check agentic_security/static/base.js passes; py_compile passes on both Python files.
  • black --check, flake8 and codespell are clean on the changed Python files (not the full pre-commit run --all-files).
  • The key-shape grep from CONTRIBUTING.md on the diff finds nothing.
  • No live scan and no call to the chat endpoint (no key used).

Checklist

  • No real API key, token or customer endpoint anywhere in the code, tests, docs or this description (CONTRIBUTING.md).
  • pytest passes and new behaviour has a test. Tests don't call paid APIs.
  • pre-commit run --all-files is clean.
  • Docs updated if behaviour changed. (No behaviour change: a new preset only.)

@msoedov

msoedov commented Dec 1, 2026

Copy link
Copy Markdown
Owner

@askmorse thx for the patch!

@msoedov
msoedov merged commit a308fe4 into msoedov:main Dec 1, 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.

3 participants