Refactor
This commit is contained in:
@@ -38,3 +38,10 @@ export const AI_MODELS = Object.entries(MODELS).flatMap(([alias, models]) =>
|
||||
);
|
||||
|
||||
export const getModelKind = (m, fallback = null) => m?.kind || m?.type || fallback;
|
||||
|
||||
// Capacity metadata for UI badges — icon + label + color per capability.
|
||||
export const CAPACITY_META = {
|
||||
vision: { icon: "visibility", label: "Vision", desc: "Supports image input", color: "text-blue-500" },
|
||||
// search: temporarily hidden (feature not wired yet)
|
||||
reasoning: { icon: "neurology", label: "Reasoning", desc: "Supports reasoning / thinking", color: "text-amber-500" },
|
||||
};
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
// Provider definitions
|
||||
import REGISTRY from "open-sse/providers/registry/index.js";
|
||||
import { RISK_NOTICE } from "@/shared/constants/providersDisplay";
|
||||
|
||||
const MEDIA_ENTRY_KEYS = [
|
||||
"serviceKinds", "ttsConfig", "sttConfig", "embeddingConfig",
|
||||
@@ -15,8 +16,10 @@ function buildProviderEntry(r) {
|
||||
for (const k of MEDIA_ENTRY_KEYS) {
|
||||
if (r[k] !== undefined) mediaFields[k] = r[k];
|
||||
}
|
||||
const display = { ...(r.display || {}) };
|
||||
if (display.deprecationNotice === "RISK_NOTICE") display.deprecationNotice = RISK_NOTICE;
|
||||
return {
|
||||
...(r.display || {}),
|
||||
...display,
|
||||
id: r.id,
|
||||
alias: r.uiAlias || r.alias,
|
||||
...(r.hidden ? { hidden: true } : {}),
|
||||
|
||||
Reference in New Issue
Block a user