Skip to content

feat: model types — type-aware proxy, UI badges, playground tabs#24

Merged
christianromeni merged 2 commits intomainfrom
feat/model-types
Mar 24, 2026
Merged

feat: model types — type-aware proxy, UI badges, playground tabs#24
christianromeni merged 2 commits intomainfrom
feat/model-types

Conversation

@christianromeni
Copy link
Copy Markdown
Contributor

Summary

Adds model_type across the full stack so VoidLLM can distinguish chat, embedding, reranking, completion, image, audio, and TTS models.

Phase 1 — Backend + UI basics:

  • model_type column via migration 0002
  • Type field in config YAML, proxy registry, admin API
  • Type badge on Models page
  • Health checker: type-aware functional probe (skip reranking/image/audio/tts)
  • /me/available-models returns {name, type} objects

Phase 2 — Playground:

  • Type-based tabs (Chat/Embedding/Completion) — only shown when models of that type exist
  • Embedding interface: text→vector display + cosine similarity comparison
  • Type selector added to Edit Model dialog
  • TabSwitcher component (state-based, accessible)

Test plan

  • go test ./... -race passes
  • cd ui && npx tsc --noEmit && npm run lint
  • Create chat + embedding model → Playground shows both tabs
  • Chat tab: existing chat behavior unchanged
  • Embedding tab: text→vector works, similarity comparison works
  • Remove all embedding models → Embedding tab disappears
  • Edit model → can change type
  • Health checker skips functional probe for non-chat types

- Add model_type field across full stack (DB, config, registry, API, UI)
- New migration 0002_model_type.up.sql (ALTER TABLE for upgrades)
- Type badge on Models page (chat/embedding/reranking/image/etc.)
- Type selector in Create Model dialog
- Playground filters non-chat models from selector
- Available-models API returns objects with name + type
- Health checker: type-aware functional probe (skip reranking/image/audio)
- YAML config type validation
- Valid types: chat, embedding, reranking, completion, image, audio_transcription, tts
- Add TabSwitcher component (state-based, accessible with role=tablist)
- Playground: type-based tabs (Chat/Embedding/Completion), shown dynamically
- Playground: embedding interface with text→vector and similarity comparison
- EditModelDialog: add type selector
- Fix stale model cache on page navigation (refetchOnMount: always)
@christianromeni christianromeni merged commit bd05ad4 into main Mar 24, 2026
5 checks passed
@christianromeni christianromeni deleted the feat/model-types branch March 24, 2026 22:35
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.

1 participant