Skip to content

Open-source Grok Bot alternative with a virtual machine that bots can use

Merge remote-tracking branch 'gh/main' into train/nov30-r3

milind-soni40fca8a2e9b0
diff --cc server/config.ts
index 55caf95f92,6f69529628..fb2bf1f2a0
--- a/server/config.ts
+++ b/server/config.ts
@@@ -30,20 -30,19 +30,18 @@@ import { settledFileCache, settledFileS
import { isRemoteMcpServer, mcpServerServes, parseStoredMcpServer } from "./mcp-registry.ts"; import { postizKeyHeaders } from "./postiz/connection.ts";
import { parseJson, schemaIssue, type JsonObject, type JsonValue } from "./schema.ts";
import { deciderConfigSchema, type DeciderConfig } from "./decider/config.ts";
- import { fishKeyFromLiveKey, liveConfigSchema, liveConfigWithEnv, liveSettingEnv, type LiveConfig } from "./live-config.ts"; import { hearingConfigShape } from "./tts/hearing-config.ts";
+ import { fishKeyFromLiveKey, liveConfigSchema, liveConfigWithEnv, liveSettingEnv, type LiveConfig } from "./live-config.ts";
+ import { ttsConfigSchema, type TtsConfig } from "./tts/config.ts";
+ export { FISH_TTS_MODELS, type FishTtsModel } from "./tts/config.ts";
-import { browserEngineConfigSchema, isValidCdpTarget, type BrowserEngineConfig } from "./browser/config.ts";
+import { browserEngineConfigSchema, browserEnginePatchSchema, browserProfileSchema, isValidCdpTarget, legacyBrowserProfileSchema, type BrowserEngineConfig, type BrowserProfile } from "./browser/config.ts";
+export type { BrowserProfile } from "./browser/config.ts";
import { roomContextSettings } from "./room-context-settings.ts"; import { usageCapsSchema, type UsageCapsConfig } from "./usage-caps-config.ts";
import { localVmConfigSchema } from "./local-vm-settings.ts";
export * from "./local-vm-settings.ts";
export * from "./vps-config.ts";
const optionalText = z.string().optional(), secretText = z.string().trim().optional(); // secretText: a saved key without a paste's surrounding whitespace (a trailing newline), so it can go in a header.
-const LEGACY_BROWSER_PROFILE_ID = /^[A-Za-z0-9_-]{1,40}$/;
-const BROWSER_PROFILE_ID = /^[a-z0-9_-]{1,40}$/;
- /** Fish Audio speech models (`tts.fishModel`); unset means `s2.1-pro`, and `s2.1-pro-free` is Fish's free tier. */
- export const FISH_TTS_MODELS = ["s2.1-pro", "s2.1-pro-free"] as const;
- export type FishTtsModel = (typeof FISH_TTS_MODELS)[number];
-
export const DEFAULT_ROOM_TURN_TIMEOUT_MINUTES = 5;
export const MIN_ROOM_TURN_TIMEOUT_MINUTES = 1;
export const MAX_ROOM_TURN_TIMEOUT_MINUTES = 1_440;
diff --cc src/components/OpenAiCompatServers.tsx
index b420bf63b2,e7ca463865..c4c67e24e9
--- a/src/components/OpenAiCompatServers.tsx
+++ b/src/components/OpenAiCompatServers.tsx
@@@ -4,8 -4,8 +4,9 @@@ import { api, useStore, type InstanceIn
import { t } from "@/lib/i18n";
import { keySaved } from "@/lib/product-events";
import { addedServers } from "@/lib/openai-compat-endpoints";
+ import { GLM_ENDPOINTS } from "../../shared/glm-provider";
import { cn } from "@/lib/cn";
+import { useAdvancedMode } from "@/lib/interface-mode";
import { KEY_FIELD } from "./keys/KeyRow";
import { Select } from "./Select";
diff --cc src/locales/en.json
index b317e6c8d7,68ff8950fd..e24e9ad059
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@@ -7735,9 -7741,12 +7746,14 @@@
"apiInstances.key": "API key",
"apiInstances.models": "Model IDs, separated by commas (optional)",
"apiInstances.modelsHint": "Leave the model IDs empty to detect them. If the model picker then shows only sample models, this server does not list its models: enter them here.",
+ "apiInstances.localModel": "This server runs a local model",
+ "apiInstances.localModelHint": "Turn this on when the address is a tunnel, VPN or reverse proxy in front of Ollama, LM Studio or llama.cpp. Bots then handle this model's tool calls the way they do for a model on this machine.",
"apiInstances.geminiPreset": "Fill in Google Gemini",
+ "apiInstances.glmSetup": "Set up GLM",
+ "apiInstances.glmRegion": "API key region",
+ "apiInstances.glmInternational": "Z.ai (international)",
+ "apiInstances.glmChina": "Zhipu BigModel (mainland China)",
+ "apiInstances.glmNoModels": "No models found. Check your API key or enter a model ID in API keys.",
"apiInstances.geminiKeyHint": "Paste a Gemini API key from Google AI Studio (aistudio.google.com/apikey). Models are detected after you add it.",
"apiInstances.add": "Add server",
"apiInstances.adding": "Adding…",
diff --cc src/locales/pt-br.json
index 2ce32195a5,677909b278..082a13a3de
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@@ -7346,9 -7350,12 +7355,14 @@@
"apiInstances.key": "Chave de API",
"apiInstances.models": "IDs de modelos, separados por vírgulas (opcional)",
"apiInstances.modelsHint": "Deixe os IDs em branco para detectar os modelos automaticamente. Se o seletor mostrar só modelos de exemplo, este servidor não lista os modelos disponíveis. Nesse caso, digite os IDs aqui.",
+ "apiInstances.localModel": "Este servidor roda um modelo local",
+ "apiInstances.localModelHint": "Ative quando o endereço for um túnel, VPN ou proxy reverso na frente do Ollama, LM Studio ou llama.cpp. Os bots passam a tratar as chamadas de ferramenta deste modelo como as de um modelo nesta máquina.",
"apiInstances.geminiPreset": "Preencher com Google Gemini",
+ "apiInstances.glmSetup": "Configurar GLM",
+ "apiInstances.glmRegion": "Região da chave de API",
+ "apiInstances.glmInternational": "Z.ai (internacional)",
+ "apiInstances.glmChina": "Zhipu BigModel (China continental)",
+ "apiInstances.glmNoModels": "Nenhum modelo encontrado. Confira a chave de API ou informe um ID de modelo nas chaves de API.",
"apiInstances.geminiKeyHint": "Cole uma chave de API do Gemini gerada no Google AI Studio (aistudio.google.com/apikey). O app detecta os modelos depois que você adiciona a chave.",
"apiInstances.add": "Adicionar servidor",
"apiInstances.adding": "Adicionando…",