Open-source Grok Bot alternative with a virtual machine that bots can use
TypeScript ai-agentsclaude-codecodexcomputer-usedockerelectrongrokgrok-botgrok-bot-alternativeself-hostedtypescript
Merge #7876: opt-in GPT-Live standby
milind-soni8f64d3070156
diff --cc server/live-call-controller.tsindex 9c243f4495,cbc8f086de..df33d1db3d--- a/server/live-call-controller.ts+++ b/server/live-call-controller.ts@@@ -72,7 -72,7 +72,7 @@@ export interface LiveCallDepsactivity(botId: string, threadId: string): LiveActivity;broadcast(frame: { kind: "live.call"; botId: string; threadId: string; call: LiveCallState | null }): void;/** `endpoint` null, or a `setupProblem`, refuses the call with that message (409). */- settings(botId?: string): { key: string; endpoint: LiveEndpoint | null; setupProblem?: string | null; provider?: LiveProvider; voice: string; geminiVoice?: string; readTypedReplies: boolean; idleMinutes: number };- settings(): { key: string; endpoint: LiveEndpoint | null; setupProblem?: string | null; provider?: LiveProvider; voice: string; geminiVoice?: string; readTypedReplies: boolean; idleMinutes: number; standby?: boolean; standbyIdleSeconds?: number };++ settings(botId?: string): { key: string; endpoint: LiveEndpoint | null; setupProblem?: string | null; provider?: LiveProvider; voice: string; geminiVoice?: string; readTypedReplies: boolean; idleMinutes: number; standby?: boolean; standbyIdleSeconds?: number };/** The called bot's own Live call voice, used over the app's when it is the call provider's. */botVoice?(botId: string): string | undefined;/** Why this caller may not hold a call through Azure OpenAI; null when they may. Required, so no wiring can leave it out. */diff --cc server/live-settings.tsindex 9b5af19b9c,66896ef5c9..2df9b9ab7f--- a/server/live-settings.ts+++ b/server/live-settings.ts@@@ -1,7 -1,8 +1,8 @@@-import type { LiveKeySource, LiveSettings } from "../shared/wire.ts";+import type { LiveKeySource, LiveSettings, WireBot } from "../shared/wire.ts";import { saveConfig, syncCredentialEnv, type AppConfig } from "./config.ts";import { azureLiveEndpoint, customLiveEndpoint, LIVE_NEEDS_AZURE, LIVE_NEEDS_CUSTOM, LIVE_NEEDS_ELEVENLABS, LIVE_NEEDS_FISH, LIVE_NEEDS_GEMINI, LIVE_NEEDS_KEY, openAiLiveEndpoint, type LiveEndpoint } from "./live-call.ts";- import { liveSavePatch, usableLiveKey, type LiveConfig as LiveConfigSection } from "./live-config.ts";+ import { LIVE_STANDBY_IDLE_SECONDS_MAX, LIVE_STANDBY_IDLE_SECONDS_MIN, liveSavePatch, usableLiveKey, type LiveConfig as LiveConfigSection } from "./live-config.ts";+ import { LIVE_STANDBY_IDLE_SECONDS_DEFAULT } from "../shared/live-call.ts";import { fishLiveEndpoint, usableFishAgent } from "./live-fish.ts";import { voiceCredential } from "./included-services.ts";import { elevenLabsLiveEndpoint, usableElevenLabsAgent } from "./live-elevenlabs.ts";diff --cc src/components/LiveCallSettings.tsxindex 7819bed680,e5daac6204..de019965fc--- a/src/components/LiveCallSettings.tsx+++ b/src/components/LiveCallSettings.tsx@@@ -12,9 -12,10 +12,10 @@@ import { KeysLink } from "./keys/KeysLiimport { Select } from "./Select";const IDLE_CHOICES = [1, 2, 3, 5, 10, 15, 30, 60];+ const STANDBY_CHOICES = Array.from({ length: 56 }, (_, index) => index + 5);/** With `bot`, the bot on the call: it can have a voice of its own, and the other voice is the default for every other bot. */-export function LiveCallSettings({ bot, onClose }: { bot?: Pick<Bot, "id" | "name" | "liveVoice">; onClose: () => void }) {+export function LiveCallSettings({ bot, onClose }: { bot?: Pick<Bot, "id" | "name" | "liveVoice" | "liveOverride">; onClose: () => void }) {const { state, dispatch } = useStore();const live: LiveSettings = state.config?.live ?? { configured: false, voice: "", readTypedReplies: true, idleMinutes: 5 };const [saving, setSaving] = useState(false);@@@ -32,7 -34,7 +34,8 @@@const fish = live.provider === "fish";const gemini = live.provider === "gemini";const elevenlabs = live.provider === "elevenlabs";+ const botProvider = bot?.liveOverride?.provider ?? live.provider;+ const openai = (live.provider ?? "openai") === "openai";const copy = liveKeyCopy(live.provider);const hasKey = live.keySource === (fish ? "fishAudio" : gemini ? "gemini" : elevenlabs ? "elevenlabs" : "live");// Gemini has its own voices, kept apart from the GPT-Live one.