Skip to main content

Capability Contracts

This inventory is enforced by scripts/test-capability-contracts.mjs. A provider capability is not complete until its schema and catalog mapping, executable handler, matching browser client, named UI action, documentation, focused behavioral test, and bundled manifests agree.

CapabilityPlugin typesExecutable routeBrowser clientUI actionDocumentationFocused behavior testsBundled definitions
Chat / completionchat, completionWS /ws (chat_stream)frontend/src/hooks/useChat.tsfrontend/src/pages/ChatPage.tsxhandleSendMessagedocs/08-PLUGIN_ARCHITECTURE.mdscripts/test-chat-provider-selection.mjs (test:package) — exact plugin routing reaches the selected provider for regular and streaming requestsanthropic, codex-oauth, gemini, github, groq, huggingface, kimi-code, llama-cpp, mistral, mlx-lm, openai, openrouter
EmbeddingsembeddingPOST /api/ollama/embed
GET /api/embeddings/models (discovery only)
frontend/src/utils/api/modelApi.tsfrontend/src/components/ModelManager.tsxhandleGenerateEmbeddingsdocs/09-RAG_FEATURE.mdscripts/test-plugin-capability-routing.mjs (test:package) — Hugging Face capabilities ignore the generic Chat endpoint and use task payloadshuggingface
Image generationimagePOST /api/image-gen/generatefrontend/src/utils/api/imageGenApi.tsfrontend/src/components/ImageGenerationPanel.tsxhandleGeneratedocs/38-MEDIA_GENERATION.mdscripts/test-image-generation-routing.mjs (test:package) — image generation uses the selected provider and user-scoped OpenAI settingscomfyui, huggingface, openai, openrouter
Speech to textsttPOST /api/stt/transcribefrontend/src/utils/api/sttApi.tsfrontend/src/components/ChatInput.tsxtoggleDictationdocs/42-SPEECH_TO_TEXT.mdscripts/test-stt-routing.mjs (test:package) — STT sends an OpenAI-compatible multipart request to the selected route
frontend/e2e/stt.spec.ts (test:e2e) — provider speech input discloses its route and transcribes recorded audio
huggingface, openai
Text to speechttsPOST /api/tts/generatefrontend/src/utils/api/ttsApi.tsfrontend/src/components/TTSButton.tsxhandlePlaydocs/38-MEDIA_GENERATION.mdscripts/test-tts-routing.mjs (test:package) — TTS routes a shared model alias through the selected plugin and user valve
frontend/e2e/tts-playback.spec.ts (test:e2e) — batched read-aloud reuses the selected saved voice for every batch
elevenlabs, huggingface, kyutai-tts-1.6b, kyutai-tts, longcat-audiodit, openai-tts, openai, openrouter, qwen-tts
Audio generationaudioPOST /api/media/sound/generatefrontend/src/utils/api/mediaApi.tsfrontend/src/components/MediaGenerationPanel.tsxhandleGeneratedocs/38-MEDIA_GENERATION.mdscripts/test-openrouter-media-routing.mjs (test:package) — OpenRouter audio-output models stream generated sound bytesopenrouter
Video generationvideoPOST /api/media/video/generate
POST /api/media/video/jobs/:jobId/resume
frontend/src/utils/api/mediaApi.ts
frontend/src/utils/api/mediaApi.ts
frontend/src/components/MediaGenerationPanel.tsxhandleGeneratedocs/38-MEDIA_GENERATION.mdscripts/test-openrouter-media-routing.mjs (test:package) — video generation submits, polls, and downloads through the provider endpoint
scripts/test-openrouter-media-routing.mjs (test:package) — prepared video and resume publications resolve lost commit acknowledgements
openrouter

Enforcement

The package gate rejects undeclared schema or plugin types, stale catalog mappings, discovery-only routes presented as execution, handlers without a matching browser transport, UI actions without an invocation and visible trigger, documentation without capability-specific claims, tests without behavior inside the named test case, stale generated inventory, and invalid manifest endpoints, model maps, or defaults.

Embedding generation executes through POST /api/ollama/embed and can route to a selected embedding plugin. GET /api/embeddings/models lists models; the gate records it as discovery-only and never accepts it as proof that embedding generation works.

The source contract identifies each focused behavior test and its runner. Backend scripts must be registered in test:package; frontend specs must be discoverable by the Playwright-based test:e2e script. Live discovery may narrow a model catalog, but it does not create a new executable capability.