Перейти к основному содержимому

Контракты возможностей

Перечень контролируется scripts/test-capability-contracts.mjs. Возможность полна только при согласовании схемы, каталога, handler, клиента, действия UI, документации, теста и манифестов.

ВозможностьТипыМаршрутКлиентUIДокументацияТестыОпределения
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)anthropic, codex-oauth, gemini, github, groq, huggingface, kimi-code, llama-cpp, mistral, mlx-lm, openai, openrouter
EmbeddingsembeddingPOST /api/ollama/embed
GET /api/embeddings/models (только обнаружение)
frontend/src/utils/api/modelApi.tsfrontend/src/components/ModelManager.tsxhandleGenerateEmbeddingsdocs/09-RAG_FEATURE.mdscripts/test-plugin-capability-routing.mjs (test:package)huggingface
ИзображенияimagePOST /api/image-gen/generatefrontend/src/utils/api/imageGenApi.tsfrontend/src/components/ImageGenerationPanel.tsxhandleGeneratedocs/38-MEDIA_GENERATION.mdscripts/test-image-generation-routing.mjs (test:package)comfyui, huggingface, openai, openrouter
STTsttPOST /api/stt/transcribefrontend/src/utils/api/sttApi.tsfrontend/src/hooks/useDictation.tstoggledocs/42-SPEECH_TO_TEXT.mdscripts/test-stt-routing.mjs (test:package)
frontend/e2e/stt.spec.ts (test:e2e)
huggingface, openai
TTSttsPOST /api/tts/generatefrontend/src/utils/api/ttsApi.tsfrontend/src/components/TTSButton.tsxhandlePlaydocs/38-MEDIA_GENERATION.mdscripts/test-tts-routing.mjs (test:package)
frontend/e2e/tts-playback.spec.ts (test:e2e)
elevenlabs, huggingface, kyutai-tts-1.6b, kyutai-tts, longcat-audiodit, openai-tts, openai, openrouter, qwen-tts
АудиоaudioPOST /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
ВидеоvideoPOST /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)openrouter

Контроль

Проверка отклоняет незаявленные типы, старые сопоставления, discovery как выполнение, handler без клиента, действия без вызова, неполную документацию/тесты, старый перечень и неверные endpoint/map/default.

Embedding выполняется через POST /api/ollama/embed; GET /api/embeddings/models только перечисляет. Backend-тесты в test:package, frontend — test:e2e. Discovery не создаёт возможности.