mirror of
https://github.com/domfelipe/mika-agent-assist.git
synced 2026-08-07 13:36:52 +00:00
Implement Mika runtime sync and go-live controls
This commit is contained in:
parent
cb54fa4666
commit
0df3befb67
29 changed files with 2153 additions and 94 deletions
23
supabase/functions/_shared/hermes-config.ts
Normal file
23
supabase/functions/_shared/hermes-config.ts
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
export const DEFAULT_OLLAMA_PROVIDER = "ollama-cloud";
|
||||
export const DEFAULT_OLLAMA_MODEL = "gemma4:31b-cloud";
|
||||
|
||||
const LEGACY_MODEL_ALIASES: Record<string, string> = {
|
||||
"openrouter/google/gemma-4-27b-a4b-it": DEFAULT_OLLAMA_MODEL,
|
||||
"openrouter/google/gemma-4-31b-it": DEFAULT_OLLAMA_MODEL,
|
||||
"ollama-cloud/gemma4:31b-cloud": DEFAULT_OLLAMA_MODEL,
|
||||
};
|
||||
|
||||
export function normalizeOllamaModelSelection(value?: string | null): string {
|
||||
const trimmed = (value ?? "").trim();
|
||||
if (!trimmed) return DEFAULT_OLLAMA_MODEL;
|
||||
|
||||
const mapped = LEGACY_MODEL_ALIASES[trimmed];
|
||||
if (mapped) return mapped;
|
||||
|
||||
if (trimmed.includes("/") && trimmed.includes(":")) {
|
||||
const candidate = trimmed.split("/").pop()?.trim();
|
||||
if (candidate) return candidate;
|
||||
}
|
||||
|
||||
return trimmed;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue