mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-25 07:00:48 +09:00
refactor: use Twilight AI SDK for model and provider connectivity tes… (#273)
* refactor: use Twilight AI SDK for model and provider connectivity testing
Replace hand-rolled HTTP probing with the Twilight AI SDK's built-in
Provider.Test() and TestModel() methods.
- Model test now runs Provider.Test() (connectivity + auth) followed by
TestModel() (model availability) via the SDK
- Provider test auto-detects client_type from associated models and
creates the correct SDK provider for accurate auth header handling
- Embedding models use a dedicated /embeddings endpoint probe since
the SDK's chat Provider doesn't cover embedding APIs
- Latency measurement now covers the full test lifecycle
- Add TestStatusModelNotSupported for models not found by the provider
- Upgrade twilight-ai to v0.3.3-0.20260321100646-43c789b701dd which
includes fallback probing for providers without GET /models/{id}
* fix: lint
This commit is contained in:
@@ -63,11 +63,11 @@
|
||||
class="mt-2"
|
||||
:show-group-headers="false"
|
||||
>
|
||||
<template #trigger="{ open, displayLabel }">
|
||||
<template #trigger="{ open: isOpen, displayLabel }">
|
||||
<Button
|
||||
variant="outline"
|
||||
role="combobox"
|
||||
:aria-expanded="open"
|
||||
:aria-expanded="isOpen"
|
||||
class="w-full justify-between font-normal mt-2"
|
||||
>
|
||||
<span class="truncate">
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
import { computed } from 'vue'
|
||||
|
||||
const props = withDefaults(defineProps<{
|
||||
status: 'success' | 'error' | 'warning' | 'idle'
|
||||
status?: 'success' | 'error' | 'warning' | 'idle'
|
||||
}>(), {
|
||||
status: 'idle',
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user