Skip to content

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

feat(images): image generation in chat, with a base and a backup provider

Fabio Nunes Cerqueiraad3df1a13e8f
diff --git a/docs/avatar-storage.md b/docs/avatar-storage.md
index 54dba6c64a..298a554f2f 100644
--- a/docs/avatar-storage.md
+++ b/docs/avatar-storage.md
@@ -5,53 +5,12 @@ generated images therefore get the same size checks, owner-only filesystem
permissions, immutable serving URL, and raster-only MIME allowlist as message
images.
-## Image provider setup
+## Image provider
-Open a bot's profile, find **Avatar → Generate with AI**, and choose an
-**Image provider**. The selected connection is shared by all bot avatars.
-Save the connection, optionally describe the image, then choose **Generate
-avatar**. The image provider is independent of the bot's chat engine.
-
-- **OpenAI** is the default for existing installations. Save an OpenAI API
- key to use `gpt-image-2` for a low-quality 1024 × 1024 WebP draft. See the
- [OpenAI image generation guide](https://developers.openai.com/api/docs/guides/image-generation)
- and [GPT Image 2 reference](https://developers.openai.com/api/docs/models/gpt-image-2).
-- **Grok (xAI)** uses `grok-imagine-image-2.0` with a square aspect ratio and
- base64 output. Save an xAI API key, or reuse the Grok key already configured
- in Settings. Changing or removing this key also affects other Grok features.
- See the [xAI image generation guide](https://docs.x.ai/developers/model-capabilities/images/generation).
-- **Custom** accepts a compatible Images API. Enter its **Base URL**, its
- **Image model** ID, and an optional API key, then choose **Save connection**.
- Use the model ID supported by that gateway, including any provider prefix
- it requires. OpenMausBot sends only the custom key to this connection.
-
-Direct OpenAI and Grok generation require their respective API keys and API
-access. Signing into a ChatGPT, Codex, or Grok subscription does not configure
-these keys. Grok subscription billing and xAI API billing are also separate;
-see [xAI's account FAQ](https://docs.x.ai/developers/faq/accounts#if-i-already-have-an-account-for-grok-can-i-use-the-same-account-for-api-access).
-
-### Custom gateway compatibility
-
-For a local gateway such as OmniRoute, a base URL might be
-`http://127.0.0.1:20128/v1`. OpenMausBot appends `/images/generations`; pasting
-that complete endpoint is also accepted. `localhost` and `127.0.0.1` refer to
-the machine running the OpenMausBot server, including when you open the app
-remotely. Public endpoints require HTTPS. HTTP is supported for local/private
-endpoints. URLs must not contain embedded credentials, query parameters, or
-fragments.
-
-The gateway must accept a synchronous OpenAI-style Images API request with
-`model`, `prompt`, `size: "1024x1024"`, `n: 1`, and
-`response_format: "b64_json"`. Its JSON response must contain
-`data[0].b64_json` with raw base64-encoded PNG, JPEG, or WebP bytes. Chat API
-compatibility alone is insufficient; URL-only responses, redirects, and
-asynchronous job responses are not supported. Each decoded image is limited
-to 10 MiB, the response to 15 MiB, and generation to two minutes.
-
-Leave the custom key blank when initially configuring a keyless gateway. If a
-custom key was saved previously, choose **Remove saved key** to make the
-connection keyless; a blank field otherwise preserves the saved key. OpenAI
-and xAI keys are never used as fallbacks for custom connections.
+Open a bot's profile, find **Avatar → Generate with AI**, optionally describe
+the image, then choose **Generate avatar**. The provider is the base (and
+backup) set in **Settings → Image generation**, the same one bots use for
+images in a chat; see [Image generation](image-generation.md).
## Deferred cleanup
diff --git a/docs/image-generation.md b/docs/image-generation.md
new file mode 100644
index 0000000000..dd910f4b50
--- /dev/null
+++ b/docs/image-generation.md
@@ -0,0 +1,95 @@
+# Image generation
+
+Bots can create images in a chat: ask "make an image of…" and the bot calls
+its `generate_image` tool, on any engine. Bot avatars use the same providers.
+The image is attached to the bot's reply when its turn ends, like a voice note.
+
+## Setup
+
+Open **Settings → Image generation** (an AI page shown in Advanced mode; a
+link from the avatar editor opens it in Simple mode too). Choose:
+
+- **Base provider**: used first for every image.
+- **Backup provider** (optional): used only when the base could not start.
+- **Model** for each: a list with the recommended models first. For
+ OpenRouter, the rest of the list is its live image catalog
+ (`/api/v1/models?output_modalities=image`, fetched without a key and kept
+ for an hour). When the catalog cannot be loaded, the page says so and shows
+ only the recommended ones. **Other** opens a field to type any model ID.
+ Custom has no list, so its model is always typed.
+- **Images per reply**: the most images a bot may create in one turn (1–10,
+ default 4). Images still being made count, so parallel calls cannot pass it.
+ Images from Codex's own image tool count toward the same limit.
+- **Keys**: each chosen provider gets a key field on this page. The Grok and
+ OpenRouter fields save the same key as **API keys**. A key pasted into a
+ model field is refused.
+- **Test** (once a key is saved): checks the key with the provider and makes
+ no image. For OpenRouter it also checks that the chosen model exists, and
+ says when the account has no credit, since image models are paid. For the
+ other providers the model is only checked when the first image is made.
+
+Bots are shown `generate_image` only while the base or the backup has what it
+needs, so a bot never spends a turn finding out it cannot make images.
+
+| Provider | Key | Default model | Endpoint |
+| --- | --- | --- | --- |
+| OpenAI | its own, in this section | `gpt-image-2` | `api.openai.com/v1/images/generations` |
+| Grok (xAI) | in this section; the same key as under **API keys** | `grok-imagine-image-2.0` | `api.x.ai/v1/images/generations` |
+| Gemini | its own (Google AI Studio), in this section | `gemini-2.5-flash-image` | `generativelanguage.googleapis.com/v1beta/openai/images/generations` |
+| OpenRouter | in this section; the same key as under **API keys** | `google/gemini-2.5-flash-image` | `openrouter.ai/api/v1/images` |
+| Custom | optional, in this section | none: enter one | `<base URL>/images/generations` |
+
+Each key goes only to its own provider; a missing key is never borrowed from
+another one. Signing in to a ChatGPT, Claude, Gemini, Grok or Copilot
+subscription does not give API access, so it does not configure any of these.
+Bots on Codex can also use Codex's own image tool, which bills the ChatGPT
+plan; it does not use these providers, but its images count toward
+**Images per reply**.
+
+## When the backup is used
+
+The backup is tried only when the base confirmed that nothing started, the
+same rule the text backups follow:
+
+- the base has no key (or no URL and model, for Custom);
+- the connection was refused or the host was not found;
+- the base answered HTTP 401, 402, 403 or 429.
+
+A timeout or an HTTP 5xx stays on the base, because the image may already have
+been made and billed. A refused request (HTTP 400, including a moderation
+block) also stays on the base: OpenMausBot does not retry a refused prompt
+with another provider.
+
+When the backup makes the image, the bot is told why the base did not, such as
+`OpenAI image generation failed (HTTP 401, model gpt-image-2)`. When both fail,
+the error names both reasons.
+
+When the person names a provider ("make it with Grok"), the bot passes it and
+only that provider is tried; it must be the base or the backup. When the base
+and the backup are the same provider, naming it keeps the normal base-then-backup
+order.
+
+A generation stops when the bot's tool call goes away (the turn is stopped or
+the engine gives up on the call), and nothing is attached.
+
+## Custom gateway compatibility
+
+For a local gateway such as OmniRoute, a base URL might be
+`http://127.0.0.1:20128/v1`. OpenMausBot appends `/images/generations`; pasting
+that complete endpoint is also accepted. `localhost` and `127.0.0.1` refer to
+the machine running the OpenMausBot server, including when you open the app
+remotely. Public endpoints require HTTPS. HTTP is supported for local/private
+endpoints. URLs must not contain embedded credentials, query parameters, or
+fragments.
+
+The gateway must accept a synchronous OpenAI-style Images API request with
+`model`, `prompt`, `size`, `n: 1`, and `response_format: "b64_json"`. Its JSON
+response must contain `data[0].b64_json` with raw base64-encoded PNG, JPEG, or
+WebP bytes. Chat API compatibility alone is insufficient; URL-only responses,
+redirects, and asynchronous job responses are not supported.
+
+## Limits
+
+Each decoded image is limited to 10 MiB, the response to 15 MiB, and
+generation to two minutes. Provider error bodies are never shown or stored:
+an error names only the provider, the HTTP status and the model ID.
diff --git a/electron/credential-patch.mjs b/electron/credential-patch.mjs
index 22a7a76d5a..e146a658d7 100644
--- a/electron/credential-patch.mjs
+++ b/electron/credential-patch.mjs
@@ -11,6 +11,7 @@ export const CREDENTIAL_PATCH = {
workersAiToken: (value) => ({ decider: { workersAiToken: value } }),
openaiImageApiKey: (value) => ({ imageGen: { key: value } }),
customImageApiKey: (value) => ({ imageGen: { customApiKey: value } }),
+ geminiImageApiKey: (value) => ({ imageGen: { geminiKey: value } }),
openaiLiveKey: (value) => ({ live: { key: value } }),
tregApiKey: (value) => ({ treg: { key: value } }),
postizApiKey: (value) => ({ postiz: { key: value } }),
diff --git a/electron/diagnostics.mjs b/electron/diagnostics.mjs
index 6773ba2adc..a0b8ba6379 100644
--- a/electron/diagnostics.mjs
+++ b/electron/diagnostics.mjs
@@ -28,6 +28,7 @@ export const CREDENTIAL_ENV_NAMES = [
"OMB_WORKERS_AI_TOKEN",
"OMB_OPENAI_IMAGE_KEY",
"OMB_CUSTOM_IMAGE_KEY",
+ "OMB_GEMINI_IMAGE_KEY",
"OMB_OPENAI_LIVE_KEY",
"OMB_TREG_KEY",
"OMB_POSTIZ_API_KEY",
diff --git a/electron/workspace-credentials.mjs b/electron/workspace-credentials.mjs
index 0f749ac518..da279629f0 100644
--- a/electron/workspace-credentials.mjs
+++ b/electron/workspace-credentials.mjs
@@ -8,6 +8,7 @@ export const WORKSPACE_CREDENTIALS = [
{ section: "decider", field: "workersAiToken", name: "workersAiToken", env: "OMB_WORKERS_AI_TOKEN" },
{ section: "imageGen", field: "key", name: "openaiImageApiKey", env: "OMB_OPENAI_IMAGE_KEY" },
{ section: "imageGen", field: "customApiKey", name: "customImageApiKey", env: "OMB_CUSTOM_IMAGE_KEY" },
+ { section: "imageGen", field: "geminiKey", name: "geminiImageApiKey", env: "OMB_GEMINI_IMAGE_KEY" },
{ section: "live", field: "key", name: "openaiLiveKey", env: "OMB_OPENAI_LIVE_KEY" },
{ section: "treg", field: "key", name: "tregApiKey", env: "OMB_TREG_KEY" },
{ section: "postiz", field: "key", name: "postizApiKey", env: "OMB_POSTIZ_API_KEY" },
diff --git a/scripts/control-omb.ts b/scripts/control-omb.ts
index d8c2b7488e..43e69286ad 100644
--- a/scripts/control-omb.ts
+++ b/scripts/control-omb.ts
@@ -295,8 +295,13 @@ export async function launchVerificationServer(
const evidenceDir = join(tmpdir(), "openmausbot-verification-evidence");
mkdirSync(evidenceDir, { recursive: true });
const logPath = join(evidenceDir, `server-${Date.now()}-${process.pid}.log`);
+ const imageApi = parentEnv.OMB_FAKE_IMAGE_API_URL?.trim() ?? "";
+ const imageGen = /^http:\/\/127\.0\.0\.1:\d{1,5}\/v1$/.test(imageApi)
+ ? { primary: { provider: "openai" }, fallback: { provider: "custom", model: "fixture-image" }, customUrl: imageApi }
+ : undefined;
writeFileSync(join(dataDir, "config.json"), JSON.stringify({
...(boatFixtureApi ? { box: { token: "box_verification_fixture" } } : {}),
+ ...(imageGen ? { imageGen } : {}),
// A setup card's answers would be one more engine call at every new bot, taking replies a test scripts for its turns.
features: { smartSetupChoices: false },
instances: {
diff --git a/server/agents-turn.test.ts b/server/agents-turn.test.ts
index 47cdbadb16..92c5558199 100644
--- a/server/agents-turn.test.ts
+++ b/server/agents-turn.test.ts
@@ -6,7 +6,7 @@ import { TOOL_BRIDGE_ENV } from "./drivers/agents-bridge.ts";
import { agentsMcp } from "./drivers/agents-mcp.ts";
import { agentsServerEnv, COMPUTER_OFF_REFUSAL, computerPickRefusal, directTurnKind, roomSkillsRefusal, type AgentsConversation, type AgentsTurn } from "./agents-turn.ts";
-const HOST: AgentsConversation["host"] = { skillAuthoring: true, sharedComputers: true, cloudHome: false, team: false, escalations: true, voiceNotes: true, x: true, research: true };
+const HOST: AgentsConversation["host"] = { skillAuthoring: true, sharedComputers: true, cloudHome: false, team: false, escalations: true, voiceNotes: true, x: true, research: true, imageGeneration: false };
const CHAT: AgentsConversation = { threadId: "thread-1", bot: { id: "bot-1", chiefOfStaff: true }, room: false, teamComputer: false, host: HOST };
const ROOM: AgentsConversation = { ...CHAT, threadId: "room-1", room: true };
diff --git a/server/agents-turn.ts b/server/agents-turn.ts
index 9f4a6cb7ea..9bec0ba839 100644
--- a/server/agents-turn.ts
+++ b/server/agents-turn.ts
@@ -14,7 +14,7 @@ export interface AgentsConversation {
/** The bot works on its team's cloud computer, so it has no computer of its own to pick. */
teamComputer: boolean;
/** `x`: a research credential is held (a treg key or a plan's); `research`: research works for it too. */
- host: { skillAuthoring: boolean; sharedComputers: boolean; cloudHome: boolean; team: boolean; escalations: boolean; voiceNotes: boolean; x: boolean; research: boolean };
+ host: { skillAuthoring: boolean; sharedComputers: boolean; cloudHome: boolean; team: boolean; escalations: boolean; voiceNotes: boolean; x: boolean; research: boolean; imageGeneration: boolean };
}
/** What one turn may do. Its bearer carries this to the harness, which checks it on every call. */
@@ -47,6 +47,7 @@ export function agentsServerEnv(conversation: AgentsConversation, turn: AgentsTu
OMB_RESEARCH: flag(host.x && host.research && bot.xResearch !== false),
...roleToolEnv(bot),
OMB_ESCALATIONS: flag(host.escalations),
+ OMB_IMAGE_GENERATION: flag(host.imageGeneration),
OMB_COMPUTER_SELECTION: flag(!conversation.room && bot.computer !== "off" && !conversation.teamComputer),
};
}
diff --git a/server/avatar-image.test.ts b/server/avatar-image.test.ts
index 3387c46763..734896452f 100644
--- a/server/avatar-image.test.ts
+++ b/server/avatar-image.test.ts
@@ -119,7 +119,11 @@ describe("avatar image generation", () => {
it("reports the legacy OpenAI default and only the selected provider's readiness", () => {
expect(avatarImageStatus({})).toEqual({
provider: "openai", configured: false, model: "gpt-image-2", customUrl: "", customModel: "",
- openaiConfigured: false, xaiConfigured: false, customKeyConfigured: false,
+ primary: { provider: "openai", model: "gpt-image-2", configured: false }, fallback: null, ready: false, maxPerTurn: 4,
+ openaiConfigured: false, xaiConfigured: false, customKeyConfigured: false, geminiConfigured: false, openrouterConfigured: false,
+ });
+ expect(avatarImageStatus({ imageGen: { key: "k", primary: { provider: "gemini" }, fallback: { provider: "openai" } } })).toMatchObject({
+ primary: { provider: "gemini", configured: false }, fallback: { provider: "openai", configured: true }, ready: true,
});
expect(avatarImageStatus(OPENAI).configured).toBe(true);
expect(avatarImageStatus({ xai: { key: "xai-secret" } }).configured).toBe(false);
@@ -193,7 +197,7 @@ describe("avatar image generation", () => {
}), { status }));
const cfg = { ...ALL_KEYS, imageGen: { ...ALL_KEYS.imageGen, provider: "custom" as const } };
await expect(generateAvatarImage(cfg, BOT, "", fetchMock)).rejects.toMatchObject({
- message: `Custom image generation failed (HTTP ${status})`, status: status === 401 ? 401 : 502,
+ message: `Custom image generation failed (HTTP ${status}, model gateway/model)`, status: status === 401 ? 401 : 502,
});
});
@@ -262,7 +266,7 @@ describe("avatar image generation", () => {
});
await expect(generateAvatarImage(OPENAI, BOT, "", hanging, 10)).rejects.toMatchObject({
- message: "Avatar generation timed out",
+ message: "Image generation timed out",
status: 502,
});
});
@@ -272,7 +276,7 @@ describe("avatar image generation", () => {
init?.signal?.addEventListener("abort", () => reject(init.signal?.reason), { once: true });
}));
await expect(generateAvatarImage(OPENAI, BOT, "", fetchMock, 10)).rejects.toMatchObject({
- message: "Avatar generation timed out", status: 502,
+ message: "Image generation timed out", status: 502,
});
});
@@ -280,7 +284,7 @@ describe("avatar image generation", () => {
const body = new ReadableStream<Uint8Array>({ start(controller) { controller.error(new Error("private gateway secret")); } });
const fetchMock = vi.fn<typeof fetch>(async () => new Response(body));
await expect(generateAvatarImage(OPENAI, BOT, "", fetchMock)).rejects.toMatchObject({
- message: "Could not read the generated avatar response", status: 502,
+ message: "Could not read the generated image response", status: 502,
});
});
});
diff --git a/server/avatar-image.ts b/server/avatar-image.ts
index 4cbeb9860c..51cf321473 100644
--- a/server/avatar-image.ts
+++ b/server/avatar-image.ts
@@ -1,51 +1,41 @@
-import type { ReadableStreamReadResult } from "node:stream/web";
import { z } from "zod";
-import { normalizeImageGenerationUrl, type ImageGenerationConfig } from "../shared/image-generation.ts";
-import { decodeGeneratedImage } from "./generated-image.ts";
+import { IMAGE_MAX_PER_TURN_DEFAULT } from "../shared/image-generation.ts";
+import {
+ customImageUrl, generateImage, IMAGE_GENERATION_TIMEOUT_MS, imageGenerationReady, imageSlotConfigured, imageSlots,
+ type GeneratedImage, type ImageCredentials, type ImageSlot,
+} from "./image-generation.ts";
import type { BotRecord } from "./store.ts";
export const AVATAR_DIRECTION_MAX_CHARS = 400;
-export const AVATAR_IMAGE_TIMEOUT_MS = 120_000;
-const MAX_UPSTREAM_RESPONSE_BYTES = 15 * 1024 * 1024;
+export const AVATAR_IMAGE_TIMEOUT_MS = IMAGE_GENERATION_TIMEOUT_MS;
export const avatarGenerationRequestSchema = z.object({
prompt: z.string().trim().max(AVATAR_DIRECTION_MAX_CHARS).default(""),
});
-const generatedImageResponseSchema = z.object({
- data: z.array(z.object({ b64_json: z.string().min(1).optional(), url: z.string().optional() })).min(1),
-});
-
type AvatarIdentity = Pick<BotRecord, "name" | "title" | "description">;
type AvatarGenerationState = Pick<BotRecord, "avatarUrl" | "avatarCrop">;
-interface AvatarImageConfig {
- imageGen?: ImageGenerationConfig;
- xai?: { key?: string };
-}
/** Public settings describe availability without returning provider secrets. */
-export function avatarImageStatus(cfg: AvatarImageConfig) {
- const provider = cfg.imageGen?.provider ?? "openai";
- const openaiConfigured = Boolean(cfg.imageGen?.key?.trim());
- const xaiConfigured = Boolean(cfg.xai?.key?.trim());
- const customKeyConfigured = Boolean(cfg.imageGen?.customApiKey?.trim());
- const customModel = cfg.imageGen?.customModel?.trim() ?? "";
- let customUrl = "";
- try {
- if (cfg.imageGen?.customUrl?.trim()) customUrl = normalizeImageGenerationUrl(cfg.imageGen.customUrl);
- } catch {
- // A manually edited invalid URL must not become an outbound request.
- }
+export function avatarImageStatus(cfg: ImageCredentials) {
+ const { primary, fallback } = imageSlots(cfg);
+ const slotStatus = (slot: ImageSlot) => ({ ...slot, configured: imageSlotConfigured(cfg, slot) });
return {
- provider,
- configured: provider === "openai" ? openaiConfigured : provider === "xai" ? xaiConfigured : Boolean(customUrl && customModel),
- model: provider === "openai" ? "gpt-image-2" : provider === "xai" ? "grok-imagine-image-2.0" : customModel,
- customUrl,
- customModel,
- openaiConfigured,
- xaiConfigured,
- customKeyConfigured,
+ provider: primary.provider,
+ configured: imageSlotConfigured(cfg, primary),
+ model: primary.model,
+ primary: slotStatus(primary),
+ fallback: fallback ? slotStatus(fallback) : null,
+ ready: imageGenerationReady(cfg),
+ maxPerTurn: cfg.imageGen?.maxPerTurn ?? IMAGE_MAX_PER_TURN_DEFAULT,
+ customUrl: customImageUrl(cfg),
+ customModel: [primary, fallback].find((slot) => slot?.provider === "custom")?.model ?? "",
+ openaiConfigured: Boolean(cfg.imageGen?.key?.trim()),
+ xaiConfigured: Boolean(cfg.xai?.key?.trim()),
+ customKeyConfigured: Boolean(cfg.imageGen?.customApiKey?.trim()),
+ geminiConfigured: Boolean(cfg.imageGen?.geminiKey?.trim()),
+ openrouterConfigured: Boolean(cfg.openrouter?.key?.trim()),
};
}
@@ -77,137 +67,15 @@ export function avatarGenerationPrompt(bot: AvatarIdentity, direction: string):
].join("\n");
}
-export interface GeneratedAvatarImage {
- bytes: Buffer;
- mime: "image/png" | "image/jpeg" | "image/webp";
-}
-
-/** The image API returns base64 JSON, so a byte cap on the untrusted body is the real memory boundary. */
-async function boundedResponseText(response: Response): Promise<string> {
- const advertised = Number(response.headers.get("content-length"));
- if (Number.isFinite(advertised) && advertised > MAX_UPSTREAM_RESPONSE_BYTES) {
- await response.body?.cancel().catch(() => {});
- throw Object.assign(new Error("Generated avatar exceeded the response limit"), { status: 502 });
- }
- const reader = response.body?.getReader();
- if (!reader) return "";
-
- const decoder = new TextDecoder();
- const chunks: string[] = [];
- let received = 0;
- try {
- for (;;) {
- let chunk: ReadableStreamReadResult<Uint8Array>;
- try {
- chunk = await reader.read();
- } catch {
- throw Object.assign(new Error("Could not read the generated avatar response"), { status: 502 });
- }
- const { done, value } = chunk;
- if (done) break;
- received += value.byteLength;
- if (received > MAX_UPSTREAM_RESPONSE_BYTES) {
- await reader.cancel().catch(() => {});
- throw Object.assign(new Error("Generated avatar exceeded the response limit"), { status: 502 });
- }
- chunks.push(decoder.decode(value, { stream: true }));
- }
- chunks.push(decoder.decode());
- return chunks.join("");
- } finally {
- reader.releaseLock();
- }
-}
+export type GeneratedAvatarImage = GeneratedImage;
export async function generateAvatarImage(
- cfg: AvatarImageConfig,
+ cfg: ImageCredentials,
bot: AvatarIdentity,
direction: string,
fetchImpl: typeof fetch = fetch,
timeoutMs = AVATAR_IMAGE_TIMEOUT_MS,
): Promise<GeneratedAvatarImage> {
- const settings = avatarImageStatus(cfg);
- const { provider, model } = settings;
- if (!settings.configured) {
- const message = provider === "openai" ? "Add an OpenAI image API key first"
- : provider === "xai" ? "Add an xAI API key first"
- : "Set a valid custom image API URL and model first";
- throw Object.assign(new Error(message), { status: 409 });
- }
-
- const apiKey = (provider === "openai" ? cfg.imageGen?.key
- : provider === "xai" ? cfg.xai?.key : cfg.imageGen?.customApiKey)?.trim();
- const providerName = provider === "openai" ? "OpenAI" : provider === "xai" ? "xAI" : "Custom";
- const url = provider === "openai" ? "https://api.openai.com/v1/images/generations"
- : provider === "xai" ? "https://api.x.ai/v1/images/generations"
- : `${settings.customUrl}/images/generations`;
- const headers: Record<string, string> = { "content-type": "application/json" };
- if (apiKey) headers.authorization = `Bearer ${apiKey}`;
- const body = {
- model,
- prompt: avatarGenerationPrompt(bot, direction),
- ...(provider === "openai" ? { size: "1024x1024", quality: "low", output_format: "webp" }
- : provider === "xai" ? { response_format: "b64_json", aspect_ratio: "1:1" }
- : { response_format: "b64_json", size: "1024x1024", n: 1 }),
- };
-
- const timeoutSignal = AbortSignal.timeout(timeoutMs);
- let response: Response;
- try {
- response = await fetchImpl(url, {
- method: "POST",
- headers,
- body: JSON.stringify(body),
- redirect: "error",
- signal: timeoutSignal,
- });
- } catch (error) {
- const timedOut = timeoutSignal.aborted || (error instanceof Error && error.name === "TimeoutError");
- throw Object.assign(
- new Error(timedOut ? "Avatar generation timed out" : `Could not reach ${providerName} image generation`),
- { status: 502 },
- );
- }
-
- let text: string;
- try {
- text = await boundedResponseText(response);
- } catch (error) {
- // When the timeout aborts the body after headers, undici may surface TimeoutError or AbortError; the signal decides.
- if (timeoutSignal.aborted || (error instanceof Error && error.name === "TimeoutError")) {
- throw Object.assign(new Error("Avatar generation timed out"), { status: 502 });
- }
- throw error;
- }
- if (!response.ok) {
- // Upstream errors can repeat authorization headers or signed URLs: return only the provider and status, never the body.
- const message = `${providerName} image generation failed (HTTP ${response.status})`;
- throw Object.assign(new Error(message), { status: response.status === 401 ? 401 : 502 });
- }
-
- let parsedJson: unknown;
- try {
- parsedJson = JSON.parse(text);
- } catch {
- throw Object.assign(new Error(`${providerName} returned an invalid image response`), { status: 502 });
- }
- const parsed = generatedImageResponseSchema.safeParse(parsedJson);
- if (!parsed.success) {
- throw Object.assign(new Error(`${providerName} returned no generated image`), { status: 502 });
- }
- const encoded = parsed.data.data[0]!.b64_json;
- if (!encoded) {
- // Never fetch a URL a provider returns; compatible gateways must answer with inline b64_json.
- throw Object.assign(new Error(`${providerName} image generation must return base64 image data (b64_json)`), { status: 502 });
- }
- if (!/^[A-Za-z0-9+/]+={0,2}$/.test(encoded) || encoded.length % 4 !== 0) {
- throw Object.assign(new Error(`${providerName} returned invalid image data`), { status: 502 });
- }
- try {
- const image = decodeGeneratedImage(encoded);
- if (image.mime === "image/gif") throw new Error("unsupported avatar format");
- return { bytes: image.bytes, mime: image.mime };
- } catch {
- throw Object.assign(new Error(`${providerName} returned invalid or oversized image data; expected PNG, JPEG, or WebP`), { status: 502 });
- }
+ const { bytes, mime } = await generateImage(cfg, { prompt: avatarGenerationPrompt(bot, direction), draft: true }, { fetchImpl, timeoutMs });
+ return { bytes, mime };
}
diff --git a/server/config.test.ts b/server/config.test.ts
index d32be5068c..34ab8226ed 100644
--- a/server/config.test.ts
+++ b/server/config.test.ts
@@ -4,6 +4,7 @@ import { join } from "node:path";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { botThreadLimitText, defaultBotThreads, maxConcurrentBotThreads, maxConcurrentChildThreads } from "./bot-thread-limits.ts";
import type { JsonValue } from "./schema.ts";
+import { imageSlots } from "./image-generation.ts";
import { cacheUntilConfigChanges,
changedInstanceIds,
@@ -178,9 +179,19 @@ describe("configuration boundaries", () => {
provider: "custom", key: "openai-kept", customApiKey: "router-only",
customUrl: "http://127.0.0.1:4000/v1/", customModel: " local/image ",
} });
- expect(parsed.imageGen).toEqual({ provider: "custom", key: "openai-kept", customApiKey: "router-only", customUrl: "http://127.0.0.1:4000/v1", customModel: "local/image" });
+ expect(parsed.imageGen).toEqual({ primary: { provider: "custom" }, customModel: "local/image", key: "openai-kept", customApiKey: "router-only", customUrl: "http://127.0.0.1:4000/v1" });
expect(parseStoredConfig({ imageGen: { key: "legacy" } }).imageGen).toEqual({ key: "legacy" });
expect(() => parseConfigPatch({ imageGen: { provider: "unknown" } })).toThrow("provider");
+ expect(parseConfigPatch({ imageGen: { primary: { provider: "gemini", model: " gemini-2.5-flash-image " }, fallback: null, maxPerTurn: 3 } }).imageGen)
+ .toEqual({ primary: { provider: "gemini", model: "gemini-2.5-flash-image" }, fallback: null, maxPerTurn: 3 });
+ expect(() => parseConfigPatch({ imageGen: { primary: { provider: "cursor" } } })).toThrow("primary");
+ expect(() => parseConfigPatch({ imageGen: { maxPerTurn: 11 } })).toThrow("maxPerTurn");
+ expect(parseConfigPatch({ imageGen: { provider: "xai" } }).imageGen).toEqual({ primary: { provider: "xai" } });
+ for (const pasted of ["sk-or-v1-0123456789abcdef0123456789abcdef", "sk-proj-abcdefghijklmnop", "xai-abcdefghijklmnopqrstuvwx", "AIzaSyA-abcdefghijklmnopqrstuvwxyz012"]) {
+ expect(() => parseConfigPatch({ imageGen: { primary: { provider: "openrouter", model: pasted } } })).toThrow("API key");
+ expect(() => parseConfigPatch({ imageGen: { fallback: { provider: "openai", model: pasted } } })).toThrow("API key");
+ }
+ expect(parseConfigPatch({ imageGen: { primary: { provider: "openrouter", model: "openai/gpt-image-2" } } }).imageGen).toEqual({ primary: { provider: "openrouter", model: "openai/gpt-image-2" } });
expect(() => parseConfigPatch({ imageGen: { customUrl: "https://user:[email protected]/v1" } })).toThrow("customUrl");
const childEnv = { OMB_CUSTOM_IMAGE_KEY: "must-not-reach-bot" };
stripWorkspaceCredentialEnv(childEnv);
@@ -756,6 +767,37 @@ describe("loadConfig between changes", () => {
});
});
+describe("saving the image providers", () => {
+ it("keeps the model typed for Custom when the base moves to another provider and comes back", () => {
+ const path = join(DATA_DIR, "config.json");
+ mkdirSync(DATA_DIR, { recursive: true });
+ writeFileSync(path, JSON.stringify({}));
+ try {
+ saveConfig(parseConfigPatch({ imageGen: { primary: { provider: "custom", model: "local/image" } } }));
+ saveConfig(parseConfigPatch({ imageGen: { primary: { provider: "openai" } } }));
+ saveConfig(parseConfigPatch({ imageGen: { primary: { provider: "custom" } } }));
+ expect(imageSlots(JSON.parse(readFileSync(path, "utf8"))).primary).toEqual({ provider: "custom", model: "local/image" });
+ } finally {
+ rmSync(path, { force: true });
+ }
+ });
+
+ it("keeps the base and the keys when the backup is cleared", () => {
+ const path = join(DATA_DIR, "config.json");
+ mkdirSync(DATA_DIR, { recursive: true });
+ writeFileSync(path, JSON.stringify({ imageGen: { key: "openai-fixture", primary: { provider: "openai" } } }));
+ try {
+ saveConfig(parseConfigPatch({ imageGen: { fallback: { provider: "xai" } } }));
+ expect(JSON.parse(readFileSync(path, "utf8")).imageGen).toEqual({ key: "openai-fixture", primary: { provider: "openai" }, fallback: { provider: "xai" } });
+ saveConfig(parseConfigPatch({ imageGen: { fallback: null } }));
+ saveConfig(parseConfigPatch({ imageGen: { fallback: null } }));
+ expect(JSON.parse(readFileSync(path, "utf8")).imageGen).toEqual({ key: "openai-fixture", primary: { provider: "openai" } });
+ } finally {
+ rmSync(path, { force: true });
+ }
+ });
+});
+
describe("saving the newer sections", () => {
it("persists the Anthropic key, the spend limit and the price list, section by section", () => {
const path = join(DATA_DIR, "config.json");
diff --git a/server/config.ts b/server/config.ts
index 978199ece1..7ed0b84b43 100644
--- a/server/config.ts
+++ b/server/config.ts
@@ -4,7 +4,8 @@ import { homedir } from "node:os";
import { join } from "node:path";
import { isDeepStrictEqual } from "node:util";
import { z } from "zod";
-import { normalizeImageGenerationUrl, type ImageGenerationConfig } from "../shared/image-generation.ts";
+import type { ImageGenerationConfig } from "../shared/image-generation.ts";
+import { imageGenConfigSchema, imageGenPatchSchema, type ImageGenCredentialPatch } from "./image-generation-config.ts";
import { botAvatarUrlSchema } from "../shared/bot-avatar.ts";
import { writeFileAtomic } from "./atomic.ts";
import { defaultBotThreads, MAX_CONCURRENT_BOT_THREADS } from "./bot-thread-limits.ts";
@@ -403,23 +404,8 @@ const appConfigSchema = z.object({
readTypedReplies: z.boolean().optional(),
idleMinutes: z.number().int().min(1).max(60).optional(),
}).optional(),
- /** Avatar provider credentials stay separate; choosing a router never reuses a cloud key. */
- imageGen: z.object({
- provider: z.enum(["openai", "xai", "custom"]).optional(),
- key: optionalText,
- customApiKey: optionalText,
- customUrl: z.string().trim().max(2048).transform((value, ctx) => {
- if (!value) return "";
- try { return normalizeImageGenerationUrl(value); } catch (error) {
- ctx.addIssue({ code: "custom", message: (error as Error).message });
- return z.NEVER;
- }
- }).optional(),
- customModel: z.string().trim().max(200).refine(
- (value) => !["\r", "\n", "\0"].some((character) => value.includes(character)),
- "Use a model ID without control characters",
- ).optional(),
- }).optional(),
+ /** Image provider credentials stay separate; choosing a router never reuses a cloud key. */
+ imageGen: imageGenConfigSchema.optional(),
/** Non-secret profile details; aboutMe is shared with every bot. */
profile: z.object({ name: optionalText, email: optionalText, aboutMe: z.string().max(24_000).optional(), avatarUrl: z.union([z.literal(""), botAvatarUrlSchema]).optional() }).optional(),
/** UI language override (BCP-47, lowercase), absent follows the system; what a paired phone calls this computer, "" for the default. */
@@ -462,7 +448,7 @@ const storedAppConfigSchema = appConfigSchema.extend(helperStoredShape).extend({
}).optional(),
});
const appConfigPatchSchema = appConfigSchema.omit({ instances: true, mcpServers: true, cliStartup: true, customDomain: true })
- .extend({ threads: threadsPatchSchema.optional(), newBots: newBotsPatchSchema.optional() });
+ .extend({ threads: threadsPatchSchema.optional(), newBots: newBotsPatchSchema.optional(), imageGen: imageGenPatchSchema.optional() });
const jsonObjectSchema = z.record(z.string(), z.json());
export interface AppConfig extends HelperConfig {
@@ -802,6 +788,7 @@ export function loadConfig(): AppConfig {
cfg.imageGen = { ...cfg.imageGen };
if (process.env.OMB_OPENAI_IMAGE_KEY !== undefined) cfg.imageGen.key = process.env.OMB_OPENAI_IMAGE_KEY;
if (process.env.OMB_CUSTOM_IMAGE_KEY !== undefined) cfg.imageGen.customApiKey = process.env.OMB_CUSTOM_IMAGE_KEY;
+ if (process.env.OMB_GEMINI_IMAGE_KEY !== undefined) cfg.imageGen.geminiKey = process.env.OMB_GEMINI_IMAGE_KEY;
const splitEmails = (value: string) => value.split(/[,\s]+/).map((entry) => entry.trim().toLowerCase()).filter(Boolean);
if (process.env.OMB_SIGNIN_EMAILS !== undefined || process.env.OMB_SIGNIN_MEMBER_EMAILS !== undefined) {
cfg.signIn = { ...cfg.signIn };
@@ -824,7 +811,7 @@ export function cacheUntilConfigChanges<T>(derive: (config: AppConfig) => T): ()
}
/** Keeps process.env in step with a saved credential ("" drops the var), because loadConfig() prefers env. */
-export function syncCredentialEnv(patch: Partial<Omit<AppConfig, "threads" | "newBots">>): void {
+export function syncCredentialEnv(patch: Partial<Omit<AppConfig, "threads" | "newBots" | "imageGen">> & { imageGen?: ImageGenCredentialPatch }): void {
const secrets: Array<[value: string | undefined, name: string]> = [
[patch.xai?.key, "XAI_API_KEY"],
[patch.mistral?.key, "MISTRAL_API_KEY"],
@@ -846,6 +833,7 @@ export function syncCredentialEnv(patch: Partial<Omit<AppConfig, "threads" | "ne
[patch.decider?.openrouterKey, "OMB_OPENROUTER_DECIDER_KEY"], [patch.decider?.workersAiToken, "OMB_WORKERS_AI_TOKEN"],
[patch.imageGen?.key, "OMB_OPENAI_IMAGE_KEY"],
[patch.imageGen?.customApiKey, "OMB_CUSTOM_IMAGE_KEY"],
+ [patch.imageGen?.geminiKey, "OMB_GEMINI_IMAGE_KEY"],
[patch.live?.key, "OMB_OPENAI_LIVE_KEY"],
];
for (const [value, name] of secrets) {
@@ -925,9 +913,10 @@ export function onConfigSaved(listener: (before: JsonObject, after: JsonObject)
/** Secrets are never echoed back; callers report configured-or-not only. */
export function saveConfig(
- patch: Partial<Omit<AppConfig, "threads" | "newBots">> & {
+ patch: Partial<Omit<AppConfig, "threads" | "newBots" | "imageGen">> & {
threads?: z.output<typeof threadsPatchSchema>;
newBots?: z.output<typeof newBotsPatchSchema>;
+ imageGen?: z.output<typeof imageGenPatchSchema>;
},
options: { replaceInstances?: boolean } = {},
): void {
@@ -938,7 +927,7 @@ export function saveConfig(
if (parsed.success) disk = parsed.data;
} catch {
}
- const checkedPatch = appConfigSchema.partial().extend({ threads: threadsPatchSchema.optional(), newBots: newBotsPatchSchema.optional() }).parse(patch);
+ const checkedPatch = appConfigSchema.partial().extend({ threads: threadsPatchSchema.optional(), newBots: newBotsPatchSchema.optional(), imageGen: imageGenPatchSchema.optional() }).parse(patch);
const before = configSaveListeners.size ? structuredClone(disk) : disk;
const storedProfiles = storedBrowserProfilesSchema.safeParse(disk.browserProfiles);
if (storedProfiles.success) disk.browserProfiles = storedProfiles.data;
diff --git a/server/credential-env.ts b/server/credential-env.ts
index a33add7372..ba1c317902 100644
--- a/server/credential-env.ts
+++ b/server/credential-env.ts
@@ -27,6 +27,7 @@ export const WORKSPACE_CREDENTIAL_ENV = [
"OMB_WORKERS_AI_TOKEN",
"OMB_OPENAI_IMAGE_KEY",
"OMB_CUSTOM_IMAGE_KEY",
+ "OMB_GEMINI_IMAGE_KEY",
"OMB_OPENAI_LIVE_KEY", "OMB_TREG_KEY", "OMB_POSTIZ_API_KEY",
"COMPOSIO_API_KEY",
"OMB_COMPOSIO_BROKER_TOKEN",
diff --git a/server/decider/openrouter-models.ts b/server/decider/openrouter-models.ts
index 491d621c67..80c5fc3cd8 100644
--- a/server/decider/openrouter-models.ts
+++ b/server/decider/openrouter-models.ts
@@ -5,9 +5,12 @@ export interface OpenRouterModel {
id: string;
name: string;
group: "recommended" | "more";
- api: "decisions";
+ api: CatalogOutput;
}
+/** The OpenRouter output modality a catalog lists; it also tags each model. */
+export type CatalogOutput = "decisions" | "image";
+
export interface OpenRouterModelList {
source: "openrouter" | "builtin";
models: OpenRouterModel[];
@@ -33,47 +36,60 @@ const MORE_MAX = 100;
const isRecord = (value: unknown): value is Record<string, unknown> =>
Boolean(value) && typeof value === "object" && !Array.isArray(value);
-const builtin = (): OpenRouterModelList => ({
+type Curated = ReadonlyArray<{ id: string; name: string }>;
+
+const builtin = (curated: Curated, api: CatalogOutput): OpenRouterModelList => ({
source: "builtin",
- models: OPENROUTER_DECIDER_MODELS.map((model) => ({ ...model, group: "recommended" as const, api: "decisions" as const })),
+ models: curated.map((model) => ({ ...model, group: "recommended" as const, api })),
});
/** Decisions models take no JSON schema (`supported_parameters` is empty), so the only test is that Settings can save the id. */
export function decisionsModels(body: unknown): Map<string, string> | null {
+ return modelsWithOutput(body, "decisions");
+}
+
+/** OpenRouter's own routers (`openrouter/auto`) list every modality but pick a text model. */
+export function modelsWithOutput(body: unknown, output: CatalogOutput): Map<string, string> | null {
if (!isRecord(body) || !Array.isArray(body.data)) return null;
const found = new Map<string, string>();
for (const entry of body.data) {
if (!isRecord(entry) || typeof entry.id !== "string" || !entry.id) continue;
- if (entry.id.length > OPENROUTER_MODEL_ID_MAX || !OPENROUTER_MODEL_ID.test(entry.id)) continue;
- const output = isRecord(entry.architecture) ? entry.architecture.output_modalities : undefined;
- if (!Array.isArray(output) || !output.includes("decisions")) continue;
+ if (entry.id.length > OPENROUTER_MODEL_ID_MAX || !OPENROUTER_MODEL_ID.test(entry.id) || entry.id.startsWith("openrouter/")) continue;
+ const outputs = isRecord(entry.architecture) ? entry.architecture.output_modalities : undefined;
+ if (!Array.isArray(outputs) || !outputs.includes(output)) continue;
found.set(entry.id, typeof entry.name === "string" && entry.name.trim() ? entry.name.trim() : entry.id);
}
return found;
}
-export function mergeModels(decisions: Map<string, string>): OpenRouterModelList {
- const recommended = OPENROUTER_DECIDER_MODELS
- .filter((model) => decisions.has(model.id))
- .map((model) => ({ id: model.id, name: decisions.get(model.id)!, group: "recommended" as const, api: "decisions" as const }));
- const curated = new Set(OPENROUTER_DECIDER_MODELS.map((model) => model.id));
- const more = [...decisions]
- .filter(([id]) => !curated.has(id))
- .map(([id, name]) => ({ id, name, group: "more" as const, api: "decisions" as const }))
+export function mergeModels(found: Map<string, string>, curated: Curated = OPENROUTER_DECIDER_MODELS, api: CatalogOutput = "decisions"): OpenRouterModelList {
+ const recommended = curated
+ .filter((model) => found.has(model.id))
+ .map((model) => ({ id: model.id, name: found.get(model.id)!, group: "recommended" as const, api }));
+ const ids = new Set(curated.map((model) => model.id));
+ const more = [...found]
+ .filter(([id]) => !ids.has(id))
+ .map(([id, name]) => ({ id, name, group: "more" as const, api }))
.sort((a, b) => a.name.localeCompare(b.name))
.slice(0, MORE_MAX);
- return recommended.length ? { source: "openrouter", models: [...recommended, ...more] } : builtin();
+ return recommended.length ? { source: "openrouter", models: [...recommended, ...more] } : builtin(curated, api);
}
export interface OpenRouterModelCatalogDeps {
fetch?: typeof fetch;
now?: () => number;
+ /** Which models to list; decisions by default. */
+ output?: CatalogOutput;
+ /** Shown first, and alone when OpenRouter cannot be reached. */
+ curated?: Curated;
}
/** Cached an hour after an answer, a minute after a failure. Never throws and never sends a key. */
export function createOpenRouterModelCatalog(deps: OpenRouterModelCatalogDeps = {}) {
const fetchImpl = deps.fetch ?? fetch;
const now = deps.now ?? (() => Date.now());
+ const output = deps.output ?? "decisions";
+ const curated = deps.curated ?? OPENROUTER_DECIDER_MODELS;
const cache = new Map<string, { until: number; list: OpenRouterModelList }>();
async function fetchList(endpoint: URL): Promise<OpenRouterModelList | null> {
@@ -87,8 +103,8 @@ export function createOpenRouterModelCatalog(deps: OpenRouterModelCatalogDeps =
await response.body?.cancel().catch(() => undefined);
return null;
}
- const decisions = decisionsModels(await response.json());
- return decisions ? mergeModels(decisions) : null;
+ const found = modelsWithOutput(await response.json(), output);
+ return found ? mergeModels(found, curated, output) : null;
} catch {
return null;
}
@@ -97,12 +113,12 @@ export function createOpenRouterModelCatalog(deps: OpenRouterModelCatalogDeps =
return {
async load(baseUrl?: string | null): Promise<OpenRouterModelList> {
const endpoint = openrouterEndpoint(baseUrl, "models");
- if (!endpoint) return builtin();
- endpoint.searchParams.set("output_modalities", "decisions");
+ if (!endpoint) return builtin(curated, output);
+ endpoint.searchParams.set("output_modalities", output);
const cached = cache.get(endpoint.href);
if (cached && cached.until > now()) return cached.list;
const fetched = await fetchList(endpoint);
- const list = fetched?.source === "openrouter" ? fetched : builtin();
+ const list = fetched?.source === "openrouter" ? fetched : builtin(curated, output);
cache.set(endpoint.href, { until: now() + (list.source === "openrouter" ? OK_TTL_MS : FAILED_TTL_MS), list });
return list;
},
diff --git a/server/drivers/agents-bridge-wire.test.ts b/server/drivers/agents-bridge-wire.test.ts
index c53c5435d3..e2d48783aa 100644
--- a/server/drivers/agents-bridge-wire.test.ts
+++ b/server/drivers/agents-bridge-wire.test.ts
@@ -63,10 +63,12 @@ function profiles(): Record<string, Record<string, string>> {
all["skills+shared+voice+escalations"] = { ...all["skills+shared+voice"]!, OMB_ESCALATIONS: "1" };
all["skills+shared+voice+escalations+x"] = { ...all["skills+shared+voice+escalations"]!, OMB_X_RESEARCH: "1", OMB_RESEARCH: "1" };
all["skills+shared+voice+escalations+x+team"] = { ...all["skills+shared+voice+escalations+x"]!, OMB_TEAM_PEOPLE: "1" };
+ all["skills+shared+voice+escalations+x+team+images"] = { ...all["skills+shared+voice+escalations+x+team"]!, OMB_IMAGE_GENERATION: "1" };
all["default+legacy-switches"] = { ...all.default!, OMB_ROOM_TURN: "1", OMB_OWN_THREAD_CREATION: "1", OMB_EXTERNAL_RUNTIME: "1", OMB_ACTIVE_WAITS: "0" };
for (const name of ["default", "skills+shared+voice"]) all[`${name}+mausbot`] = { ...all[name]!, OMB_MAUSBOT: "1" };
all["default+no-computer-pick"] = { ...all.default!, OMB_COMPUTER_SELECTION: "0" };
for (const name of ["default", "non-chief"]) all[`${name}+room`] = { ...all[name]!, OMB_COMPUTER_SELECTION: "0", OMB_ROOM: "1" };
+ all["default+images"] = { ...all.default!, OMB_IMAGE_GENERATION: "1" };
return all;
}
@@ -74,7 +76,7 @@ const PROFILES = profiles();
/** Refused by the server to every bot that is not a Chief of Staff. */
const CHIEF_ONLY_TOOLS = ["create_bot", "list_team_setup", "propose_team_setup", "propose_bot_deletion", "manage_room", "retry_thread"];
/** The profile that mounts the most: its bridged list is checked in whole. */
-const FULL = "skills+shared+voice+escalations+x+team";
+const FULL = "skills+shared+voice+escalations+x+team+images";
/** Bytes of each bridged list when its budget was last set. A list may not
* exceed this by more than 2%, and may not undercut it by more than 2%
@@ -108,6 +110,8 @@ const BUDGET_BASELINE: Record<string, number> = {
"default+no-computer-pick": 15455,
"default+room": 15415,
"non-chief+room": 15298,
+ "skills+shared+voice+escalations+x+team+images": 17416,
+ "default+images": 16409,
};
type RpcAnswer = { id: number; result?: { tools?: unknown[]; content?: Array<{ text: string }>; isError?: boolean }; error?: { code: number; message: string } };
diff --git a/server/drivers/agents-bridge.test.ts b/server/drivers/agents-bridge.test.ts
index 9c2cf62fe8..b0b190b0b9 100644
--- a/server/drivers/agents-bridge.test.ts
+++ b/server/drivers/agents-bridge.test.ts
@@ -25,7 +25,7 @@ import {
} from "./agents-bridge.ts";
const flag = (on: boolean) => (on ? "1" : "0");
-const profile = (options: { chief?: boolean; skills?: boolean; shared?: boolean; voice?: boolean; cloudHome?: boolean; memory?: boolean; botId?: string } = {}): CatalogProfile =>
+const profile = (options: { chief?: boolean; skills?: boolean; shared?: boolean; voice?: boolean; cloudHome?: boolean; memory?: boolean; images?: boolean; botId?: string } = {}): CatalogProfile =>
catalogProfileFromEnv({
OMB_BOT_ID: options.botId ?? "bot-bridge",
OMB_CHIEF_OF_STAFF: flag(options.chief ?? false),
@@ -36,6 +36,7 @@ const profile = (options: { chief?: boolean; skills?: boolean; shared?: boolean;
OMB_MEMORY_ENABLED: flag(options.memory ?? true),
// A person's own request, which may pick its computer.
OMB_COMPUTER_SELECTION: "1",
+ OMB_IMAGE_GENERATION: flag(options.images ?? false),
});
/** Every switch combination the harness can ask for, as the wire test's
@@ -46,6 +47,7 @@ function everyProfile(): Array<{ name: string; profile: CatalogProfile }> {
all.push({ name: JSON.stringify({ chief, skills, shared, voice, cloudHome }), profile: profile({ chief, skills, shared, voice, cloudHome }) });
}
all.push({ name: "memory off", profile: profile({ memory: false }) });
+ all.push({ name: "images", profile: profile({ ...FULL_CHIEF, images: true }) });
all.push({ name: "watcher", profile: profile({ botId: WATCHER_OPTIONS_CARD_BOT_ID }) });
return all;
}
diff --git a/server/drivers/agents-call.ts b/server/drivers/agents-call.ts
index 956b7ea26f..f5aa0747e9 100644
--- a/server/drivers/agents-call.ts
+++ b/server/drivers/agents-call.ts
@@ -17,6 +17,7 @@ import { callHelperTool, HELPER_TOOL_NAMES } from "./agents-helper-tools.ts";
import { callUsageLimitsTool, USAGE_LIMITS_TOOL } from "./agents-usage-tool.ts";
import { callWaitTool, WAIT_TOOL_NAMES } from "./agents-wait-tools.ts";
import { callComputerAskTool, COMPUTER_ASK_TOOL_NAMES } from "./agents-computer-ask-tool.ts";
+import { callImageTool, IMAGE_TOOL_NAMES } from "./agents-image-tools.ts";
import { callMausBotTool, MAUSBOT_TOOL_NAMES } from "./agents-mausbot-tools.ts";
import { callPageTool, PAGE_TOOL_NAMES } from "./agents-pages-tools.ts";
import { callPersonTool, PERSON_TOOL_NAMES } from "./agents-person-tools.ts";
@@ -216,6 +217,7 @@ export async function callTool(called: string, input: Json, context: ToolCallCon
if (CARD_TOOL_NAMES.has(name)) return callCardTool(name, args, context);
if (RESEARCH_TOOL_NAMES.has(name)) return callResearchTool(name, args, context);
if (HELPER_TOOL_NAMES.has(name)) return callHelperTool(name, args, context);
+ if (IMAGE_TOOL_NAMES.has(name)) return callImageTool(name, args, context);
if (MAUSBOT_TOOL_NAMES.has(name)) return callMausBotTool(name, args, context);
if (PAGE_TOOL_NAMES.has(name)) return callPageTool(name, args, context);
if (PERSON_TOOL_NAMES.has(name)) return callPersonTool(name, args, context);
diff --git a/server/drivers/agents-catalog-goldens/bridged.profiles.json b/server/drivers/agents-catalog-goldens/bridged.profiles.json
index d91e09f91e..ea7a591801 100644
--- a/server/drivers/agents-catalog-goldens/bridged.profiles.json
+++ b/server/drivers/agents-catalog-goldens/bridged.profiles.json
@@ -453,6 +453,28 @@
"use_tool"
]
},
+ "skills+shared+voice+escalations+x+team+images": {
+ "bytes": 17653,
+ "sha256": "409c11091960e99e521994a03be2d92344be3d95101fb696bf84529feef8688d",
+ "tools": [
+ "tool_result_read",
+ "list_room_targets",
+ "coordinate_bots",
+ "list_bots",
+ "list_rooms",
+ "select_computer",
+ "attach_file",
+ "publish_page",
+ "post_to_room",
+ "request_credential",
+ "request_sign_in",
+ "fill_login",
+ "send_voice_note",
+ "memory_update",
+ "find_tool",
+ "use_tool"
+ ]
+ },
"default+legacy-switches": {
"bytes": 16694,
"sha256": "0061f3c42dbaee63a478355f6b33af47bc1a88de052ac91a012242e128206946",
@@ -576,5 +598,26 @@
"find_tool",
"use_tool"
]
+ },
+ "default+images": {
+ "bytes": 16710,
+ "sha256": "09e58fa4556ac7baefe75b2bb4260a96ec12424d097ce59ebcf2b25e757a00ef",
+ "tools": [
+ "tool_result_read",
+ "list_room_targets",
+ "coordinate_bots",
+ "list_bots",
+ "list_rooms",
+ "select_computer",
+ "attach_file",
+ "publish_page",
+ "post_to_room",
+ "request_credential",
+ "request_sign_in",
+ "fill_login",
+ "memory_update",
+ "find_tool",
+ "use_tool"
+ ]
}
}
diff --git a/server/drivers/agents-catalog-goldens/bridged.tools-list.json b/server/drivers/agents-catalog-goldens/bridged.tools-list.json
index b31e1ee972..4499dce98f 100644
--- a/server/drivers/agents-catalog-goldens/bridged.tools-list.json
+++ b/server/drivers/agents-catalog-goldens/bridged.tools-list.json
@@ -375,7 +375,7 @@
},
{
"name": "find_tool",
- "description": "Find an OpenMausBot tool that is not in your tool list. Say what you want to do in a few words, or give the tool's name. Each match comes back with its description and exact input schema; run one with use_tool. Tools reached this way: list_shared_computers, shared_computer, assignment_status, raise_escalation, usage_limits, list_threads, close_thread, start_thread, vm_exec, show_widget, show_html, unpublish_page, create_bot, list_team_setup, list_team_library, propose_team_setup, propose_bot_deletion, manage_room, x_search, research_search, research_endpoint, research_call, decide, extract, message_person, report_bug, retry_thread, memory_log, session_search, trigger_info, trigger, delete_trigger, wait_until, list_waits, cancel_wait, propose_profile, propose_model, propose_team_memory, skills_list, skill_manage, mcp_server.",
+ "description": "Find an OpenMausBot tool that is not in your tool list. Say what you want to do in a few words, or give the tool's name. Each match comes back with its description and exact input schema; run one with use_tool. Tools reached this way: list_shared_computers, shared_computer, assignment_status, raise_escalation, usage_limits, list_threads, close_thread, start_thread, vm_exec, show_widget, show_html, unpublish_page, create_bot, list_team_setup, list_team_library, propose_team_setup, propose_bot_deletion, manage_room, x_search, research_search, research_endpoint, research_call, decide, extract, generate_image, message_person, report_bug, retry_thread, memory_log, session_search, trigger_info, trigger, delete_trigger, wait_until, list_waits, cancel_wait, propose_profile, propose_model, propose_team_memory, skills_list, skill_manage, mcp_server.",
"inputSchema": {
"type": "object",
"additionalProperties": false,
diff --git a/server/drivers/agents-catalog-goldens/full.tools-list.json b/server/drivers/agents-catalog-goldens/full.tools-list.json
index 7108d3c4dc..4217d5508b 100644
--- a/server/drivers/agents-catalog-goldens/full.tools-list.json
+++ b/server/drivers/agents-catalog-goldens/full.tools-list.json
@@ -1090,6 +1090,43 @@
]
}
},
+ {
+ "name": "generate_image",
+ "description": "Create one image from a text description with the person's image provider; it is attached to your reply when the turn ends, so do not describe or link it again. Write the prompt in English, concrete and visual. Name a provider only when the person asked for that one.",
+ "inputSchema": {
+ "type": "object",
+ "additionalProperties": false,
+ "properties": {
+ "prompt": {
+ "type": "string",
+ "description": "What the image shows: subject, setting, style, lighting."
+ },
+ "aspect": {
+ "type": "string",
+ "enum": [
+ "1:1",
+ "16:9",
+ "9:16"
+ ],
+ "description": "Shape; square when omitted."
+ },
+ "provider": {
+ "type": "string",
+ "enum": [
+ "openai",
+ "xai",
+ "gemini",
+ "openrouter",
+ "custom"
+ ],
+ "description": "Only when the person named one; it must be their base or backup."
+ }
+ },
+ "required": [
+ "prompt"
+ ]
+ }
+ },
{
"name": "message_person",
"description": "Pass a message to a person on this team, when someone asks you to tell them something (\"tell Bob the launch moved\"). Only your message goes, never this conversation. Someone who can see this conversation is tagged here; anyone else gets it in a new private conversation with you, and their answer can come back here.",
diff --git a/server/drivers/agents-catalog-goldens/profiles.json b/server/drivers/agents-catalog-goldens/profiles.json
index e675d1b85f..94a053f383 100644
--- a/server/drivers/agents-catalog-goldens/profiles.json
+++ b/server/drivers/agents-catalog-goldens/profiles.json
@@ -1063,6 +1063,68 @@
"mcp_server"
]
},
+ "skills+shared+voice+escalations+x+team+images": {
+ "bytes": 70560,
+ "sha256": "1d4d5ab77da5c3e1aee8c8a72783578362c1e419791829d92e9201e17ddf52b4",
+ "tools": [
+ "tool_result_read",
+ "list_shared_computers",
+ "shared_computer",
+ "list_room_targets",
+ "coordinate_bots",
+ "assignment_status",
+ "raise_escalation",
+ "list_bots",
+ "usage_limits",
+ "list_rooms",
+ "select_computer",
+ "list_threads",
+ "close_thread",
+ "start_thread",
+ "vm_exec",
+ "attach_file",
+ "show_widget",
+ "show_html",
+ "publish_page",
+ "unpublish_page",
+ "post_to_room",
+ "create_bot",
+ "list_team_setup",
+ "list_team_library",
+ "propose_team_setup",
+ "propose_bot_deletion",
+ "manage_room",
+ "request_credential",
+ "request_sign_in",
+ "fill_login",
+ "send_voice_note",
+ "x_search",
+ "research_search",
+ "research_endpoint",
+ "research_call",
+ "decide",
+ "extract",
+ "generate_image",
+ "message_person",
+ "report_bug",
+ "memory_update",
+ "retry_thread",
+ "memory_log",
+ "session_search",
+ "trigger_info",
+ "trigger",
+ "delete_trigger",
+ "wait_until",
+ "list_waits",
+ "cancel_wait",
+ "propose_profile",
+ "propose_model",
+ "propose_team_memory",
+ "skills_list",
+ "skill_manage",
+ "mcp_server"
+ ]
+ },
"default+legacy-switches": {
"bytes": 58621,
"sha256": "b279aa06c646ada0fc66c23f743de64b07c8f96ac70509b823014476863694ba",
@@ -1351,5 +1413,56 @@
"propose_team_memory",
"mcp_server"
]
+ },
+ "default+images": {
+ "bytes": 59394,
+ "sha256": "10706a0688c0687e923e2a6048b452b20ade65853004369f8cde9c74f35a1ec5",
+ "tools": [
+ "tool_result_read",
+ "list_room_targets",
+ "coordinate_bots",
+ "assignment_status",
+ "list_bots",
+ "usage_limits",
+ "list_rooms",
+ "select_computer",
+ "list_threads",
+ "close_thread",
+ "start_thread",
+ "vm_exec",
+ "attach_file",
+ "show_widget",
+ "show_html",
+ "publish_page",
+ "unpublish_page",
+ "post_to_room",
+ "create_bot",
+ "list_team_setup",
+ "list_team_library",
+ "propose_team_setup",
+ "propose_bot_deletion",
+ "manage_room",
+ "request_credential",
+ "request_sign_in",
+ "fill_login",
+ "decide",
+ "extract",
+ "generate_image",
+ "report_bug",
+ "memory_update",
+ "retry_thread",
+ "memory_log",
+ "session_search",
+ "trigger_info",
+ "trigger",
+ "delete_trigger",
+ "wait_until",
+ "list_waits",
+ "cancel_wait",
+ "propose_profile",
+ "propose_model",
+ "propose_team_memory",
+ "mcp_server"
+ ]
}
}
diff --git a/server/drivers/agents-catalog-profile.ts b/server/drivers/agents-catalog-profile.ts
index 27175f7a25..4ab052ba2a 100644
--- a/server/drivers/agents-catalog-profile.ts
+++ b/server/drivers/agents-catalog-profile.ts
@@ -30,6 +30,7 @@ export interface CatalogProfile {
/** A room's thread: the widget and page tools, which rooms refuse, and the wait tools, since a room holds no wait,
* are not mounted. */
room?: boolean;
+ imageGeneration?: boolean;
}
/** Everything is off unless the harness says "1". */
@@ -49,5 +50,6 @@ export function catalogProfileFromEnv(env: NodeJS.ProcessEnv): CatalogProfile {
mausbot: env.OMB_MAUSBOT === "1",
computerSelection: env.OMB_COMPUTER_SELECTION === "1",
room: env.OMB_ROOM === "1",
+ imageGeneration: env.OMB_IMAGE_GENERATION === "1",
};
}
diff --git a/server/drivers/agents-catalog-wire.test.ts b/server/drivers/agents-catalog-wire.test.ts
index 2facd4026f..6313c39ef4 100644
--- a/server/drivers/agents-catalog-wire.test.ts
+++ b/server/drivers/agents-catalog-wire.test.ts
@@ -54,6 +54,7 @@ function profiles(): Record<string, Profile> {
all["skills+shared+voice+escalations+x"] = { env: { ...all["skills+shared+voice+escalations"]!.env, OMB_X_RESEARCH: "1", OMB_RESEARCH: "1" } };
// A Team Cloud mounts message_person; the fullest profile carries it.
all["skills+shared+voice+escalations+x+team"] = { env: { ...all["skills+shared+voice+escalations+x"]!.env, OMB_TEAM_PEOPLE: "1" } };
+ all["skills+shared+voice+escalations+x+team+images"] = { env: { ...all["skills+shared+voice+escalations+x+team"]!.env, OMB_IMAGE_GENERATION: "1" } };
all["default+legacy-switches"] = {
env: { ...all.default!.env, OMB_ROOM_TURN: "1", OMB_OWN_THREAD_CREATION: "1", OMB_EXTERNAL_RUNTIME: "1", OMB_ACTIVE_WAITS: "0" },
};
@@ -62,6 +63,7 @@ function profiles(): Record<string, Profile> {
// A chat that can never pick its computer: its Works on is Off, or it works on its team's computer. A room is one too.
all["default+no-computer-pick"] = { env: { ...all.default!.env, OMB_COMPUTER_SELECTION: "0" } };
for (const name of ["default", "non-chief"]) all[`${name}+room`] = { env: { ...all[name]!.env, OMB_COMPUTER_SELECTION: "0", OMB_ROOM: "1" } };
+ all["default+images"] = { env: { ...all.default!.env, OMB_IMAGE_GENERATION: "1" } };
return all;
}
@@ -77,7 +79,7 @@ const RESEARCH_TOOLS = ["x_search", "research_search", "research_endpoint", "res
/** Only on the person's own Cloud: never on the fullest profile, a Team Cloud's. */
const OWN_CLOUD_TOOLS = ["ask_for_computer"];
/** The fullest profile, checked in whole; every other one is pinned by tool names, bytes and sha256. */
-const FULL = "skills+shared+voice+escalations+x+team";
+const FULL = "skills+shared+voice+escalations+x+team+images";
/** Bytes when the budget was last set; a profile may move at most 2% either way (lower it to lock in a win). */
const BUDGET_BASELINE: Record<string, number> = {
@@ -108,6 +110,8 @@ const BUDGET_BASELINE: Record<string, number> = {
"default+no-computer-pick": 57038,
"default+room": 49808,
"non-chief+room": 40751,
+ "skills+shared+voice+escalations+x+team+images": 70348,
+ "default+images": 59182,
};
const RPC_PREFIX = '{"jsonrpc":"2.0","id":1,"result":';
@@ -244,7 +248,7 @@ describe("agents proxy tools/list golden", () => {
it("mounts message_person only on a Team Cloud, and adds nothing else", () => {
const names = (wire: string) => toolsOf(wire).map((tool) => tool.name);
- expect(names(wires[FULL]!).filter((tool) => tool !== "message_person")).toEqual(names(wires["skills+shared+voice+escalations+x"]!));
+ expect(names(wires["skills+shared+voice+escalations+x+team"]!).filter((tool) => tool !== "message_person")).toEqual(names(wires["skills+shared+voice+escalations+x"]!));
for (const [name, profile] of Object.entries(PROFILES)) {
expect(names(wires[name]!).includes("message_person"), name).toBe(profile.env.OMB_TEAM_PEOPLE === "1");
}
@@ -259,6 +263,14 @@ describe("agents proxy tools/list golden", () => {
expect(availableTools(team).map((tool) => tool.name)).not.toContain("ask_for_computer");
});
+ it("mounts generate_image only when an image provider is set up, and adds nothing else", () => {
+ const names = (wire: string) => toolsOf(wire).map((tool) => tool.name);
+ expect(names(wires["default+images"]!).filter((tool) => tool !== "generate_image")).toEqual(names(wires.default!));
+ for (const [name, profile] of Object.entries(PROFILES)) {
+ expect(names(wires[name]!).includes("generate_image"), name).toBe(profile.env.OMB_IMAGE_GENERATION === "1");
+ }
+ });
+
it("ignores the switches that once picked a catalog profile", () => {
expect(wires["default+legacy-switches"]).toBe(wires.default);
const profile = catalogProfileFromEnv({ OMB_BOT_ID: "bot-golden", OMB_CHIEF_OF_STAFF: "1", OMB_COMPUTER_SELECTION: "1", OMB_ROOM_TURN: "1", OMB_OWN_THREAD_CREATION: "1", OMB_EXTERNAL_RUNTIME: "1", OMB_ACTIVE_WAITS: "0" });
diff --git a/server/drivers/agents-catalog.ts b/server/drivers/agents-catalog.ts
index 467c57b8b7..269755a7f5 100644
--- a/server/drivers/agents-catalog.ts
+++ b/server/drivers/agents-catalog.ts
@@ -8,6 +8,7 @@ import { HELPER_TOOL_DEFINITIONS } from "./agents-helper-tools.ts";
import { USAGE_LIMITS_TOOL_DEFINITION } from "./agents-usage-tool.ts";
import { WAIT_TOOL_DEFINITIONS, WAIT_TOOL_NAMES } from "./agents-wait-tools.ts";
import { COMPUTER_ASK_TOOL_DEFINITIONS, COMPUTER_ASK_TOOL_NAMES } from "./agents-computer-ask-tool.ts";
+import { IMAGE_TOOL_DEFINITIONS, IMAGE_TOOL_NAMES } from "./agents-image-tools.ts";
import { MAUSBOT_TOOL_DEFINITIONS } from "./agents-mausbot-tools.ts";
import { PERSON_TOOL_DEFINITIONS, PERSON_TOOL_NAMES } from "./agents-person-tools.ts";
import { RESEARCH_TOOL_DEFINITIONS, RESEARCH_TOOL_NAMES, X_TOOL_NAMES } from "./agents-research-tools.ts";
@@ -524,7 +525,7 @@ const TOOL_DEFINITIONS = [
required: ["text"],
},
},
- ...RESEARCH_TOOL_DEFINITIONS, ...HELPER_TOOL_DEFINITIONS, ...PERSON_TOOL_DEFINITIONS, ...DEVS_TOOL_DEFINITIONS,
+ ...RESEARCH_TOOL_DEFINITIONS, ...HELPER_TOOL_DEFINITIONS, ...IMAGE_TOOL_DEFINITIONS, ...PERSON_TOOL_DEFINITIONS, ...DEVS_TOOL_DEFINITIONS,
{
name: "memory_update",
description:
@@ -914,7 +915,8 @@ function catalogTools(profile: CatalogProfile) {
(profile.escalations === true || tool.name !== "raise_escalation") &&
(profile.team === true || !PERSON_TOOL_NAMES.has(tool.name)) &&
(profile.computerSelection === true || tool.name !== "select_computer") &&
- (profile.room !== true || !ROOM_REFUSED_TOOL_NAMES.has(tool.name)));
+ (profile.room !== true || !ROOM_REFUSED_TOOL_NAMES.has(tool.name)) &&
+ (profile.imageGeneration === true || !IMAGE_TOOL_NAMES.has(tool.name)));
const AUTHORING_TOOLS = profile.skillAuthoring
? BOT_SCOPED_TOOLS
: BOT_SCOPED_TOOLS.filter((tool) => !SKILL_TOOL_NAMES.has(tool.name));
diff --git a/server/drivers/agents-image-tools.ts b/server/drivers/agents-image-tools.ts
new file mode 100644
index 0000000000..c1809713fc
--- /dev/null
+++ b/server/drivers/agents-image-tools.ts
@@ -0,0 +1,31 @@
+import type { ToolCallContext, ToolCallResult } from "./agents-call.ts";
+import type { Json } from "./agents-client.ts";
+
+export const IMAGE_PROMPT_MAX_CHARS = 4000;
+export const IMAGE_TOOL_NAMES: ReadonlySet<string> = new Set(["generate_image"]);
+
+export async function callImageTool(_name: string, args: Json, context: ToolCallContext): Promise<ToolCallResult> {
+ const { ok, body } = await context.client.apiResponse("/api/internal/images/generate", {
+ method: "POST",
+ body: JSON.stringify({ fromBotId: context.botId, fromThreadId: context.threadId, ...args }),
+ });
+ return ok ? { text: String(body.text ?? "") } : { text: String(body.error ?? "The image was not generated. Try again shortly."), isError: true };
+}
+
+export const IMAGE_TOOL_DEFINITIONS = [
+ {
+ name: "generate_image",
+ description:
+ "Create one image from a text description with the person's image provider; it is attached to your reply when the turn ends, so do not describe or link it again. Write the prompt in English, concrete and visual. Name a provider only when the person asked for that one.",
+ inputSchema: {
+ type: "object",
+ additionalProperties: false,
+ properties: {
+ prompt: { type: "string", minLength: 1, maxLength: IMAGE_PROMPT_MAX_CHARS, description: "What the image shows: subject, setting, style, lighting." },
+ aspect: { type: "string", enum: ["1:1", "16:9", "9:16"], description: "Shape; square when omitted." },
+ provider: { type: "string", enum: ["openai", "xai", "gemini", "openrouter", "custom"], description: "Only when the person named one; it must be their base or backup." },
+ },
+ required: ["prompt"],
+ },
+ },
+];
diff --git a/server/drivers/agents-mcp-env.ts b/server/drivers/agents-mcp-env.ts
index a32c35d542..84a5ed39a5 100644
--- a/server/drivers/agents-mcp-env.ts
+++ b/server/drivers/agents-mcp-env.ts
@@ -4,4 +4,4 @@ import { TOOL_LIMIT_ENV } from "../tool-count-limit.ts";
/** The settings the harness gives the agents MCP server, and the only ones a request may carry over HTTP. */
export const AGENTS_MCP_ENV = ["OMB_BOT_ID", "OMB_THREAD_ID", "OMB_TURN_DEPTH", "OMB_EXTERNAL_RUNTIME", "OMB_CHIEF_OF_STAFF",
"OMB_SKILL_AUTHORING_ENABLED", "OMB_MEMORY_ENABLED", "OMB_SHARED_COMPUTERS_ENABLED", "OMB_CLOUD_HOME", "OMB_VOICE_NOTES",
- "OMB_X_RESEARCH", "OMB_RESEARCH", "OMB_ESCALATIONS", "OMB_TEAM_PEOPLE", "OMB_MAUSBOT", "OMB_COMPUTER_SELECTION", "OMB_ROOM", TOOL_BRIDGE_ENV, TOOL_LIMIT_ENV] as const;
+ "OMB_X_RESEARCH", "OMB_RESEARCH", "OMB_ESCALATIONS", "OMB_TEAM_PEOPLE", "OMB_MAUSBOT", "OMB_COMPUTER_SELECTION", "OMB_ROOM", "OMB_IMAGE_GENERATION", TOOL_BRIDGE_ENV, TOOL_LIMIT_ENV] as const;
diff --git a/server/image-generation-config.ts b/server/image-generation-config.ts
new file mode 100644
index 0000000000..85827c65c7
--- /dev/null
+++ b/server/image-generation-config.ts
@@ -0,0 +1,41 @@
+import { z } from "zod";
+import { IMAGE_PROVIDERS, normalizeImageGenerationUrl, type ImageGenerationConfig } from "../shared/image-generation.ts";
+
+const API_KEY_SHAPE = /^(sk-|sk_|xai-|gsk_|AIza)[A-Za-z0-9_-]{12,}$/;
+const imageModelIdSchema = z.string().trim().max(200).refine(
+ (value) => !["\r", "\n", "\0"].some((character) => value.includes(character)),
+ "Use a model ID without control characters",
+);
+const imageSlotSchema = z.object({ provider: z.enum(IMAGE_PROVIDERS), model: imageModelIdSchema.optional() }).strict();
+// Stored configs keep loading; only a new save is refused, so a pasted key is never kept as a model.
+const savedImageSlotSchema = z.object({
+ provider: z.enum(IMAGE_PROVIDERS),
+ model: imageModelIdSchema.refine((value) => !API_KEY_SHAPE.test(value), "This looks like an API key, not a model ID: paste the key in the key field instead").optional(),
+}).strict();
+export const imageGenConfigSchema = z.object({
+ primary: imageSlotSchema.optional(),
+ fallback: imageSlotSchema.optional(),
+ maxPerTurn: z.number().int().min(1).max(10).optional(),
+ provider: z.enum(["openai", "xai", "custom"]).optional(),
+ key: z.string().optional(),
+ geminiKey: z.string().optional(),
+ customApiKey: z.string().optional(),
+ customUrl: z.string().trim().max(2048).transform((value, ctx) => {
+ if (!value) return "";
+ try { return normalizeImageGenerationUrl(value); } catch (error) {
+ ctx.addIssue({ code: "custom", message: (error as Error).message });
+ return z.NEVER;
+ }
+ }).optional(),
+ customModel: imageModelIdSchema.optional(),
+});
+/** A patch from an older client names one `provider`; it becomes the base, so only `primary` decides it. */
+export const imageGenPatchSchema = imageGenConfigSchema.extend({ primary: savedImageSlotSchema.optional(), fallback: savedImageSlotSchema.nullable().optional() })
+ .transform(({ provider, customModel, ...patch }) => {
+ const typed = [patch.primary, patch.fallback].find((slot) => slot?.provider === "custom" && slot.model)?.model;
+ const remembered = typed ?? (provider && provider !== "custom" ? undefined : customModel);
+ const next = remembered === undefined ? patch : { ...patch, customModel: remembered };
+ return !provider || patch.primary ? next : { ...next, primary: { provider } };
+ });
+
+export type ImageGenCredentialPatch = Pick<ImageGenerationConfig, "key" | "customApiKey" | "geminiKey">;
diff --git a/server/image-generation.e2e.test.ts b/server/image-generation.e2e.test.ts
new file mode 100644
index 0000000000..817d143df4
--- /dev/null
+++ b/server/image-generation.e2e.test.ts
@@ -0,0 +1,114 @@
+import { existsSync, readFileSync, readdirSync, writeFileSync } from "node:fs";
+import { join } from "node:path";
+import { expect, it } from "vitest";
+import { z } from "zod";
+import { launchVerificationServer, runControlOmb } from "../scripts/control-omb.ts";
+import { request } from "../scripts/mcp-server.ts";
+import { startFakeImageApi, type FakeImageApi } from "./testing/fake-image-api.ts";
+
+const botSchema = z.object({ bot: z.object({ id: z.string(), activeTaskId: z.string() }) });
+const waitSchema = z.object({ status: z.string() });
+const evidenceSchema = z.object({
+ botId: z.string(),
+ evidence: z.array(z.object({
+ step: z.unknown().optional(),
+ result: z.object({ tools: z.array(z.object({ name: z.string() })).optional() }).optional(),
+ response: z.object({ result: z.object({ isError: z.boolean().optional(), content: z.array(z.object({ text: z.string() })) }) }).optional(),
+ })),
+});
+const messagesSchema = z.object({
+ messages: z.array(z.object({
+ role: z.string(),
+ text: z.string().optional(),
+ attachments: z.array(z.object({ kind: z.string(), path: z.string(), mime: z.string() })).optional(),
+ })),
+});
+
+interface ImageFixture {
+ images: FakeImageApi;
+ configure: (patch: unknown) => Promise<void>;
+ newBot: (name: string) => Promise<z.infer<typeof botSchema>["bot"]>;
+ ask: (bot: { id: string; activeTaskId: string }, text: string) => Promise<string>;
+ savePlan: (plan: Record<string, unknown>) => void;
+ turnOf: (botId: string) => z.infer<typeof evidenceSchema>;
+ messages: (threadId: string) => Promise<z.infer<typeof messagesSchema>["messages"]>;
+ savedImages: () => string[];
+}
+
+async function withImageFixture(test: (f: ImageFixture) => Promise<void>) {
+ const session = await launchVerificationServer(process.env, undefined, undefined, undefined, undefined, { scripted: true });
+ const cli = (...args: string[]) => runControlOmb(args, { env: { OPENMAUSBOT_URL: session.info.url } });
+ const api = (path: string, body?: unknown, method = "POST") =>
+ request(path, body === undefined ? {} : { method, body: JSON.stringify(body) }, session.info.url);
+ const images = await startFakeImageApi();
+ const dataDir = session.info.dataDir;
+ const planPath = join(dataDir, "room-plan.json");
+ try {
+ await test({
+ images,
+ configure: async (patch) => { await api("/api/config", patch, "PUT"); },
+ newBot: async (name) => botSchema.parse(await cli("new-bot", "--name", name)).bot,
+ ask: async (bot, text) => {
+ await cli("send", "--bot", bot.id, "--task", bot.activeTaskId, "--text", text);
+ return waitSchema.parse(await cli("wait", "--bot", bot.id, "--task", bot.activeTaskId, "--timeout", "30")).status;
+ },
+ savePlan: (plan) => writeFileSync(planPath, JSON.stringify(plan)),
+ turnOf: (botId) => {
+ const lines = existsSync(planPath + ".evidence.jsonl") ? readFileSync(planPath + ".evidence.jsonl", "utf8").trim().split("\n").filter(Boolean) : [];
+ const turn = lines.map((line) => evidenceSchema.parse(JSON.parse(line))).find((entry) => entry.botId === botId);
+ if (!turn) throw new Error(`no scripted turn was recorded for ${botId}`);
+ return turn;
+ },
+ messages: async (threadId) => messagesSchema.parse(await api("/api/threads/" + threadId + "/messages")).messages,
+ savedImages: () => {
+ const dir = join(dataDir, "attachments");
+ return existsSync(dir) ? readdirSync(dir).filter((name) => name.endsWith(".png")) : [];
+ },
+ });
+ } finally {
+ await images.stop();
+ await session.close();
+ }
+}
+
+const listedTools = (turn: z.infer<typeof evidenceSchema>) => turn.evidence[0]?.result?.tools?.map((tool) => tool.name) ?? [];
+
+it("falls back from a keyless base to the backup and attaches the image to the settling reply", async () => withImageFixture(async (f) => {
+ await f.configure({ imageGen: { primary: { provider: "openai" }, fallback: { provider: "custom", model: "fixture-image" }, customUrl: f.images.url } });
+ const bot = await f.newBot("Image bot");
+ f.savePlan({
+ [bot.id]: {
+ steps: [{ tool: "generate_image", arguments: { prompt: "a navy owl with a brass compass", aspect: "16:9" } }],
+ reply: "Here is your owl.",
+ },
+ });
+ expect(await f.ask(bot, "Make an image of a navy owl.")).toBe("settled");
+
+ const turn = f.turnOf(bot.id);
+ expect(listedTools(turn)).toContain("generate_image");
+ const step = turn.evidence.find((entry) => entry.step)?.response?.result;
+ expect(step?.isError).toBeFalsy();
+ expect(step?.content[0]?.text).toContain("backup image provider, because the base failed: Add an OpenAI image API key first");
+
+ expect(f.images.requests).toEqual([
+ { model: "fixture-image", prompt: "a navy owl with a brass compass", response_format: "b64_json", size: "1536x1024", n: 1 },
+ ]);
+
+ const withImage = (await f.messages(bot.activeTaskId)).filter((m) => (m.attachments ?? []).some((a) => a.kind === "image"));
+ expect(withImage).toHaveLength(1);
+ expect(withImage[0]!.role).toBe("bot");
+ expect(withImage[0]!.text).toBe("Here is your owl.");
+ const image = withImage[0]!.attachments!.find((a) => a.kind === "image")!;
+ expect(image.mime).toBe("image/png");
+ const files = f.savedImages();
+ expect(files).toHaveLength(1);
+ expect(image.path.endsWith(files[0]!)).toBe(true);
+}), 60_000);
+
+it("hides generate_image from a bot when no image provider is set up", async () => withImageFixture(async (f) => {
+ const bot = await f.newBot("No image bot");
+ f.savePlan({ [bot.id]: { steps: [], reply: "No images here." } });
+ expect(await f.ask(bot, "Make an image.")).toBe("settled");
+ expect(listedTools(f.turnOf(bot.id))).not.toContain("generate_image");
+ expect(f.images.requests).toEqual([]);
+}), 60_000);
diff --git a/server/image-generation.test.ts b/server/image-generation.test.ts
new file mode 100644
index 0000000000..c9ab1b026d
--- /dev/null
+++ b/server/image-generation.test.ts
@@ -0,0 +1,187 @@
+import { describe, expect, it, vi } from "vitest";
+
+import { generateImage, imageSlots } from "./image-generation.ts";
+
+const PNG = Buffer.from("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=", "base64");
+const BOTH = {
+ imageGen: { key: "openai-secret", primary: { provider: "openai" as const }, fallback: { provider: "xai" as const } },
+ xai: { key: "xai-secret" },
+};
+
+function imageResponse(): Response {
+ return new Response(JSON.stringify({ data: [{ b64_json: PNG.toString("base64") }] }), { status: 200 });
+}
+
+function hostOf(call: Parameters<typeof fetch>): string {
+ return new URL(String(call[0])).host;
+}
+
+describe("image slots", () => {
+ it("reads an older single-provider config as the base with no backup", () => {
+ expect(imageSlots({ imageGen: { provider: "custom", customModel: "local/image" } })).toEqual({
+ primary: { provider: "custom", model: "local/image" }, fallback: null,
+ });
+ expect(imageSlots({})).toEqual({ primary: { provider: "openai", model: "gpt-image-2" }, fallback: null });
+ });
+
+ it("prefers the saved base over the older provider field and fills each provider's default model", () => {
+ expect(imageSlots({ imageGen: { provider: "custom", primary: { provider: "xai" }, fallback: { provider: "openai", model: "gpt-image-1" } } })).toEqual({
+ primary: { provider: "xai", model: "grok-imagine-image-2.0" },
+ fallback: { provider: "openai", model: "gpt-image-1" },
+ });
+ });
+
+ it("ignores a backup identical to the base", () => {
+ expect(imageSlots({ imageGen: { primary: { provider: "xai" }, fallback: { provider: "xai" } } }).fallback).toBeNull();
+ });
+});
+
+describe("provider requests", () => {
+ it("sends a Gemini key only to Google's OpenAI-compatible image route", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async () => imageResponse());
+ const cfg = { ...BOTH, imageGen: { ...BOTH.imageGen, geminiKey: "gemini-secret", primary: { provider: "gemini" as const } } };
+ await expect(generateImage(cfg, { prompt: "owl" }, { fetchImpl: fetchMock })).resolves.toMatchObject({ provider: "gemini", model: "gemini-2.5-flash-image" });
+ const [url, init] = fetchMock.mock.calls[0]!;
+ expect(url).toBe("https://generativelanguage.googleapis.com/v1beta/openai/images/generations");
+ expect(init?.headers).toMatchObject({ authorization: "Bearer gemini-secret" });
+ expect(JSON.stringify(init)).not.toMatch(/openai-secret|xai-secret/);
+ expect(JSON.parse(String(init?.body))).toEqual({ model: "gemini-2.5-flash-image", prompt: "owl", response_format: "b64_json", size: "1024x1024", n: 1 });
+ });
+
+ it("reuses the OpenRouter key at OpenRouter's image endpoint with the chosen model and shape", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async () => imageResponse());
+ const cfg = { ...BOTH, openrouter: { key: "or-secret" }, imageGen: { ...BOTH.imageGen, primary: { provider: "openrouter" as const, model: "black-forest-labs/flux.2-pro" } } };
+ await generateImage(cfg, { prompt: "owl", aspect: "16:9" }, { fetchImpl: fetchMock });
+ const [url, init] = fetchMock.mock.calls[0]!;
+ expect(url).toBe("https://openrouter.ai/api/v1/images");
+ expect(init?.headers).toMatchObject({ authorization: "Bearer or-secret" });
+ expect(JSON.parse(String(init?.body))).toEqual({ model: "black-forest-labs/flux.2-pro", prompt: "owl", aspect_ratio: "16:9" });
+ });
+
+ it("maps a wide request to OpenAI's landscape size at the provider's normal quality", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async () => imageResponse());
+ await generateImage(BOTH, { prompt: "owl", aspect: "16:9" }, { fetchImpl: fetchMock });
+ expect(JSON.parse(String(fetchMock.mock.calls[0]![1]?.body))).toMatchObject({ size: "1536x1024", quality: "auto" });
+ });
+
+ it.each(["gemini", "openrouter"] as const)("treats %s without its key as not set up, so the backup takes over", async (provider) => {
+ const fetchMock = vi.fn<typeof fetch>(async () => imageResponse());
+ const cfg = { ...BOTH, imageGen: { ...BOTH.imageGen, primary: { provider } } };
+ await expect(generateImage(cfg, { prompt: "owl" }, { fetchImpl: fetchMock })).resolves.toMatchObject({ provider: "xai", usedFallback: true });
+ });
+});
+
+describe("generateImage with a backup", () => {
+ it("uses only the base when it succeeds", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async () => imageResponse());
+ await expect(generateImage(BOTH, { prompt: "owl" }, { fetchImpl: fetchMock })).resolves.toMatchObject({
+ mime: "image/png", provider: "openai", model: "gpt-image-2", usedFallback: false,
+ });
+ expect(fetchMock.mock.calls.map(hostOf)).toEqual(["api.openai.com"]);
+ });
+
+ it("moves to the backup when the base has no key, without calling the base", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async () => imageResponse());
+ const cfg = { ...BOTH, imageGen: { ...BOTH.imageGen, key: "" } };
+ await expect(generateImage(cfg, { prompt: "owl" }, { fetchImpl: fetchMock })).resolves.toMatchObject({ provider: "xai", usedFallback: true });
+ expect(fetchMock.mock.calls.map(hostOf)).toEqual(["api.x.ai"]);
+ });
+
+ it.each([401, 402, 403, 429])("moves to the backup when the base answers HTTP %s", async (status) => {
+ const fetchMock = vi.fn<typeof fetch>()
+ .mockResolvedValueOnce(new Response("{}", { status }))
+ .mockResolvedValueOnce(imageResponse());
+ await expect(generateImage(BOTH, { prompt: "owl" }, { fetchImpl: fetchMock })).resolves.toMatchObject({ provider: "xai", usedFallback: true });
+ expect(fetchMock.mock.calls.map(hostOf)).toEqual(["api.openai.com", "api.x.ai"]);
+ });
+
+ it("moves to the backup when the base refuses the connection", async () => {
+ const refused = Object.assign(new TypeError("fetch failed"), { cause: Object.assign(new Error("connect"), { code: "ECONNREFUSED" }) });
+ const fetchMock = vi.fn<typeof fetch>().mockRejectedValueOnce(refused).mockResolvedValueOnce(imageResponse());
+ await expect(generateImage(BOTH, { prompt: "owl" }, { fetchImpl: fetchMock })).resolves.toMatchObject({ provider: "xai" });
+ });
+
+ it.each([
+ ["a server error, which may already have produced and billed an image", 500],
+ ["a refused request, such as a moderation block", 400],
+ ])("stays on the base after %s", async (_why, status) => {
+ const fetchMock = vi.fn<typeof fetch>(async () => new Response("{}", { status }));
+ await expect(generateImage(BOTH, { prompt: "owl" }, { fetchImpl: fetchMock })).rejects.toThrow(`OpenAI image generation failed (HTTP ${status}, model gpt-image-2)`);
+ expect(fetchMock).toHaveBeenCalledOnce();
+ });
+
+ it("stays on the base after a timeout", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async (_url, init) => new Promise((_resolve, reject) => {
+ init?.signal?.addEventListener("abort", () => reject(init.signal?.reason), { once: true });
+ }));
+ await expect(generateImage(BOTH, { prompt: "owl" }, { fetchImpl: fetchMock, timeoutMs: 10 })).rejects.toThrow("timed out");
+ expect(fetchMock).toHaveBeenCalledOnce();
+ });
+
+ it("reports the base's own error when there is no backup", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async () => new Response("{}", { status: 429 }));
+ await expect(generateImage({ imageGen: { key: "openai-secret" } }, { prompt: "owl" }, { fetchImpl: fetchMock }))
+ .rejects.toThrow("OpenAI image generation failed (HTTP 429, model gpt-image-2)");
+ });
+
+ it("uses only the backup when the caller asks for it", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async () => imageResponse());
+ await expect(generateImage(BOTH, { prompt: "owl" }, { slot: "fallback", fetchImpl: fetchMock })).resolves.toMatchObject({ provider: "xai", usedFallback: true });
+ expect(fetchMock.mock.calls.map(hostOf)).toEqual(["api.x.ai"]);
+ });
+
+ it("says so when the caller asks for a backup that is not set", async () => {
+ const fetchMock = vi.fn<typeof fetch>();
+ await expect(generateImage({ imageGen: { key: "k" } }, { prompt: "owl" }, { slot: "fallback", fetchImpl: fetchMock }))
+ .rejects.toMatchObject({ status: 409, message: "No backup image provider is set" });
+ expect(fetchMock).not.toHaveBeenCalled();
+ });
+});
+
+describe("what the person learns when a provider fails", () => {
+ it("passes a wide Gemini request on as Google's landscape size", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async () => imageResponse());
+ const cfg = { imageGen: { geminiKey: "gemini-secret", primary: { provider: "gemini" as const } } };
+ await generateImage(cfg, { prompt: "owl", aspect: "16:9" }, { fetchImpl: fetchMock });
+ expect(JSON.parse(String(fetchMock.mock.calls[0]![1]?.body))).toMatchObject({ size: "1536x1024" });
+ });
+
+ it("names the model a provider refused, so a wrong model ID is visible", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async () => new Response("{}", { status: 404 }));
+ const cfg = { openrouter: { key: "or-secret" }, imageGen: { primary: { provider: "openrouter" as const, model: "google/not-a-model" } } };
+ await expect(generateImage(cfg, { prompt: "owl" }, { fetchImpl: fetchMock })).rejects.toThrow("OpenRouter image generation failed (HTTP 404, model google/not-a-model)");
+ });
+
+ it("keeps the base's reason when the backup made the image", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async (input) => new URL(String(input)).host === "api.openai.com" ? new Response("{}", { status: 401 }) : imageResponse());
+ const made = await generateImage(BOTH, { prompt: "owl" }, { fetchImpl: fetchMock });
+ expect(made).toMatchObject({ provider: "xai", usedFallback: true, baseError: "OpenAI image generation failed (HTTP 401, model gpt-image-2)" });
+ });
+
+ it("reports both reasons when the base and the backup fail", async () => {
+ const fetchMock = vi.fn<typeof fetch>(async (input) => new Response("{}", { status: new URL(String(input)).host === "api.openai.com" ? 402 : 429 }));
+ await expect(generateImage(BOTH, { prompt: "owl" }, { fetchImpl: fetchMock })).rejects.toThrow(
+ "xAI image generation failed (HTTP 429, model grok-imagine-image-2.0); the base first failed: OpenAI image generation failed (HTTP 402, model gpt-image-2)",
+ );
+ });
+
+ it("stops the provider call when the caller cancels, and does not try the backup", async () => {
+ const seen: AbortSignal[] = [];
+ const fetchMock = vi.fn<typeof fetch>((_input, init) => new Promise((_resolve, reject) => {
+ seen.push(init!.signal!);
+ init!.signal!.addEventListener("abort", () => reject(Object.assign(new Error("aborted"), { name: "AbortError" })));
+ }));
+ const cancel = new AbortController();
+ const pending = generateImage(BOTH, { prompt: "owl" }, { fetchImpl: fetchMock, signal: cancel.signal });
+ cancel.abort();
+ await expect(pending).rejects.toThrow("Image generation was cancelled");
+ expect(seen[0]!.aborted).toBe(true);
+ expect(fetchMock).toHaveBeenCalledTimes(1);
+ });
+
+ it("brings back the last model typed for Custom when the base or the backup goes back to Custom", () => {
+ expect(imageSlots({ imageGen: { customModel: "local/image", primary: { provider: "custom" } } }).primary).toEqual({ provider: "custom", model: "local/image" });
+ expect(imageSlots({ imageGen: { customModel: "local/image", primary: { provider: "openai" }, fallback: { provider: "custom" } } }).fallback).toEqual({ provider: "custom", model: "local/image" });
+ expect(imageSlots({ imageGen: { customModel: "local/image", primary: { provider: "custom", model: "other/image" } } }).primary.model).toBe("other/image");
+ });
+});
diff --git a/server/image-generation.ts b/server/image-generation.ts
new file mode 100644
index 0000000000..8fdc12517a
--- /dev/null
+++ b/server/image-generation.ts
@@ -0,0 +1,295 @@
+import type { ReadableStreamReadResult } from "node:stream/web";
+import { z } from "zod";
+
+import { IMAGE_DEFAULT_MODELS, normalizeImageGenerationUrl, type ImageGenerationConfig, type ImageProvider } from "../shared/image-generation.ts";
+import { decodeGeneratedImage } from "./generated-image.ts";
+
+export const IMAGE_GENERATION_TIMEOUT_MS = 120_000;
+const MAX_UPSTREAM_RESPONSE_BYTES = 15 * 1024 * 1024;
+
+const imagesApiResponseSchema = z.object({
+ data: z.array(z.object({ b64_json: z.string().min(1).optional(), url: z.string().optional() })).min(1),
+});
+
+export interface ImageCredentials {
+ imageGen?: ImageGenerationConfig;
+ xai?: { key?: string };
+ openrouter?: { key?: string };
+}
+
+export interface ImageSlot {
+ provider: ImageProvider;
+ model: string;
+}
+
+export type ImageAspect = "1:1" | "16:9" | "9:16";
+
+export interface ImageRequest {
+ prompt: string;
+ aspect?: ImageAspect;
+ draft?: boolean;
+}
+
+export interface GeneratedImage {
+ bytes: Buffer;
+ mime: "image/png" | "image/jpeg" | "image/webp";
+}
+
+export interface GeneratedSlotImage extends GeneratedImage, ImageSlot {
+ usedFallback: boolean;
+ /** Why the base did not make it, when the backup did. */
+ baseError?: string;
+}
+
+const OPENAI_SIZES: Record<ImageAspect, string> = { "1:1": "1024x1024", "16:9": "1536x1024", "9:16": "1024x1536" };
+
+const PROVIDERS: Record<ImageProvider, {
+ name: string;
+ missing: string;
+ key: (cfg: ImageCredentials) => string | undefined;
+ url: (cfg: ImageCredentials) => string;
+ body: (request: ImageRequest) => Record<string, unknown>;
+}> = {
+ openai: {
+ name: "OpenAI",
+ missing: "Add an OpenAI image API key first",
+ key: (cfg) => cfg.imageGen?.key,
+ url: () => "https://api.openai.com/v1/images/generations",
+ body: (request) => ({ size: OPENAI_SIZES[request.aspect ?? "1:1"], quality: request.draft ? "low" : "auto", output_format: "webp" }),
+ },
+ xai: {
+ name: "xAI",
+ missing: "Add an xAI API key first",
+ key: (cfg) => cfg.xai?.key,
+ url: () => "https://api.x.ai/v1/images/generations",
+ body: (request) => ({ response_format: "b64_json", aspect_ratio: request.aspect ?? "1:1" }),
+ },
+ gemini: {
+ name: "Gemini",
+ missing: "Add a Gemini API key first",
+ key: (cfg) => cfg.imageGen?.geminiKey,
+ // Google's OpenAI-compatible route; the native API has no stable Images shape.
+ url: () => "https://generativelanguage.googleapis.com/v1beta/openai/images/generations",
+ body: (request) => ({ response_format: "b64_json", size: OPENAI_SIZES[request.aspect ?? "1:1"], n: 1 }),
+ },
+ openrouter: {
+ name: "OpenRouter",
+ missing: "Add an OpenRouter API key first",
+ key: (cfg) => cfg.openrouter?.key,
+ url: () => "https://openrouter.ai/api/v1/images",
+ body: (request) => ({ aspect_ratio: request.aspect ?? "1:1" }),
+ },
+ custom: {
+ name: "Custom",
+ missing: "Set a valid custom image API URL and model first",
+ key: (cfg) => cfg.imageGen?.customApiKey,
+ url: (cfg) => `${customImageUrl(cfg)}/images/generations`,
+ body: (request) => ({ response_format: "b64_json", size: OPENAI_SIZES[request.aspect ?? "1:1"], n: 1 }),
+ },
+};
+
+export function imageProviderName(provider: ImageProvider): string {
+ return PROVIDERS[provider].name;
+}
+
+export function imageProviderKey(cfg: ImageCredentials, provider: ImageProvider): string {
+ return PROVIDERS[provider].key(cfg)?.trim() ?? "";
+}
+
+const UNREACHED_CODES = new Set(["ECONNREFUSED", "ENOTFOUND", "EAI_AGAIN", "EHOSTUNREACH", "ENETUNREACH"]);
+/** Answers that refuse before any work: no access, no credit, or rate limited. */
+const NOT_STARTED_STATUSES = new Set([401, 402, 403, 429]);
+
+function fail(message: string, status: number, neverStarted = false): never {
+ throw Object.assign(new Error(message), { status, neverStarted });
+}
+
+export function shouldUseFallback(error: unknown): boolean {
+ return Boolean(error && typeof error === "object" && (error as { neverStarted?: unknown }).neverStarted === true);
+}
+
+export function customImageUrl(cfg: ImageCredentials): string {
+ try {
+ if (cfg.imageGen?.customUrl?.trim()) return normalizeImageGenerationUrl(cfg.imageGen.customUrl);
+ } catch {
+ // A manually edited invalid URL must not become an outbound request.
+ }
+ return "";
+}
+
+export function imageSlots(cfg: ImageCredentials): { primary: ImageSlot; fallback: ImageSlot | null } {
+ // Custom has no default model, so a Custom slot saved without one uses the last model typed for Custom.
+ const resolveSlot = (provider: ImageProvider, model?: string): ImageSlot => ({
+ provider,
+ model: model?.trim() || (provider === "custom" ? cfg.imageGen?.customModel?.trim() : "") || IMAGE_DEFAULT_MODELS[provider],
+ });
+ const saved = cfg.imageGen?.primary;
+ const primary = saved ? resolveSlot(saved.provider, saved.model) : resolveSlot(cfg.imageGen?.provider ?? "openai");
+ const backup = cfg.imageGen?.fallback;
+ const fallback = backup ? resolveSlot(backup.provider, backup.model) : null;
+ const same = fallback && fallback.provider === primary.provider && fallback.model === primary.model;
+ return { primary, fallback: same ? null : fallback };
+}
+
+export function primaryImageSlot(cfg: ImageCredentials): ImageSlot {
+ return imageSlots(cfg).primary;
+}
+
+export function imageSlotConfigured(cfg: ImageCredentials, slot: ImageSlot): boolean {
+ if (slot.provider === "custom") return Boolean(customImageUrl(cfg) && slot.model);
+ return Boolean(PROVIDERS[slot.provider].key(cfg)?.trim() && slot.model);
+}
+
+export function imageGenerationReady(cfg: ImageCredentials): boolean {
+ const { primary, fallback } = imageSlots(cfg);
+ return imageSlotConfigured(cfg, primary) || Boolean(fallback && imageSlotConfigured(cfg, fallback));
+}
+
+/** The image API returns base64 JSON, so a byte cap on the untrusted body is the real memory boundary. */
+async function boundedResponseText(response: Response): Promise<string> {
+ const advertised = Number(response.headers.get("content-length"));
+ if (Number.isFinite(advertised) && advertised > MAX_UPSTREAM_RESPONSE_BYTES) {
+ await response.body?.cancel().catch(() => {});
+ fail("Generated image exceeded the response limit", 502);
+ }
+ const reader = response.body?.getReader();
+ if (!reader) return "";
+
+ const decoder = new TextDecoder();
+ const chunks: string[] = [];
+ let received = 0;
+ try {
+ for (;;) {
+ let chunk: ReadableStreamReadResult<Uint8Array>;
+ try {
+ chunk = await reader.read();
+ } catch {
+ fail("Could not read the generated image response", 502);
+ }
+ const { done, value } = chunk;
+ if (done) break;
+ received += value.byteLength;
+ if (received > MAX_UPSTREAM_RESPONSE_BYTES) {
+ await reader.cancel().catch(() => {});
+ fail("Generated image exceeded the response limit", 502);
+ }
+ chunks.push(decoder.decode(value, { stream: true }));
+ }
+ chunks.push(decoder.decode());
+ return chunks.join("");
+ } finally {
+ reader.releaseLock();
+ }
+}
+
+function unreached(error: unknown): boolean {
+ const code = (error as { cause?: { code?: unknown } } | null)?.cause?.code;
+ return typeof code === "string" && UNREACHED_CODES.has(code);
+}
+
+export async function generateImageWith(
+ cfg: ImageCredentials,
+ slot: ImageSlot,
+ request: ImageRequest,
+ fetchImpl: typeof fetch = fetch,
+ timeoutMs = IMAGE_GENERATION_TIMEOUT_MS,
+ cancel?: AbortSignal,
+): Promise<GeneratedImage> {
+ const provider = PROVIDERS[slot.provider];
+ if (!imageSlotConfigured(cfg, slot)) fail(provider.missing, 409, true);
+
+ const apiKey = provider.key(cfg)?.trim();
+ const headers: Record<string, string> = { "content-type": "application/json" };
+ if (apiKey) headers.authorization = `Bearer ${apiKey}`;
+ const body = { model: slot.model, prompt: request.prompt, ...provider.body(request) };
+
+ const timeoutSignal = AbortSignal.timeout(timeoutMs);
+ const cancelled = () => cancel?.aborted === true && !timeoutSignal.aborted;
+ let response: Response;
+ try {
+ response = await fetchImpl(provider.url(cfg), {
+ method: "POST",
+ headers,
+ body: JSON.stringify(body),
+ redirect: "error",
+ signal: cancel ? AbortSignal.any([timeoutSignal, cancel]) : timeoutSignal,
+ });
+ } catch (error) {
+ if (cancelled()) fail("Image generation was cancelled", 409);
+ const timedOut = timeoutSignal.aborted || (error instanceof Error && error.name === "TimeoutError");
+ if (timedOut) fail("Image generation timed out", 502);
+ fail(`Could not reach ${provider.name} image generation`, 502, unreached(error));
+ }
+
+ let text: string;
+ try {
+ text = await boundedResponseText(response);
+ } catch (error) {
+ if (cancelled()) fail("Image generation was cancelled", 409);
+ // When the timeout aborts the body after headers, undici may surface TimeoutError or AbortError; the signal decides.
+ if (timeoutSignal.aborted || (error instanceof Error && error.name === "TimeoutError")) {
+ fail("Image generation timed out", 502);
+ }
+ throw error;
+ }
+ if (!response.ok) {
+ // Upstream errors can repeat authorization headers or signed URLs: return only the provider and status, never the body.
+ fail(`${provider.name} image generation failed (HTTP ${response.status}, model ${slot.model})`, response.status === 401 ? 401 : 502,
+ NOT_STARTED_STATUSES.has(response.status));
+ }
+
+ let parsedJson: unknown;
+ try {
+ parsedJson = JSON.parse(text);
+ } catch {
+ fail(`${provider.name} returned an invalid image response`, 502);
+ }
+ const parsed = imagesApiResponseSchema.safeParse(parsedJson);
+ if (!parsed.success) fail(`${provider.name} returned no generated image`, 502);
+ const encoded = parsed.data.data[0]!.b64_json;
+ if (!encoded) {
+ // Never fetch a URL a provider returns; compatible gateways must answer with inline b64_json.
+ fail(`${provider.name} image generation must return base64 image data (b64_json)`, 502);
+ }
+ if (!/^[A-Za-z0-9+/]+={0,2}$/.test(encoded) || encoded.length % 4 !== 0) {
+ fail(`${provider.name} returned invalid image data`, 502);
+ }
+ try {
+ const image = decodeGeneratedImage(encoded);
+ if (image.mime === "image/gif") throw new Error("unsupported image format");
+ return { bytes: image.bytes, mime: image.mime };
+ } catch {
+ fail(`${provider.name} returned invalid or oversized image data; expected PNG, JPEG, or WebP`, 502);
+ }
+}
+
+export async function generateImage(
+ cfg: ImageCredentials,
+ request: ImageRequest,
+ options: { slot?: "primary" | "fallback"; fetchImpl?: typeof fetch; timeoutMs?: number; signal?: AbortSignal } = {},
+): Promise<GeneratedSlotImage> {
+ const { primary, fallback } = imageSlots(cfg);
+ const attempt = async (slot: ImageSlot, usedFallback: boolean): Promise<GeneratedSlotImage> => ({
+ ...await generateImageWith(cfg, slot, request, options.fetchImpl, options.timeoutMs, options.signal),
+ ...slot,
+ usedFallback,
+ });
+ if (options.slot === "fallback") {
+ if (!fallback) fail("No backup image provider is set", 409);
+ return attempt(fallback, true);
+ }
+ try {
+ return await attempt(primary, false);
+ } catch (error) {
+ if (!fallback || options.slot === "primary" || !shouldUseFallback(error)) throw error;
+ const baseError = error instanceof Error ? error.message : String(error);
+ try {
+ return { ...await attempt(fallback, true), baseError };
+ } catch (backupError) {
+ if (!(backupError instanceof Error)) throw backupError;
+ throw Object.assign(new Error(`${backupError.message}; the base first failed: ${baseError}`), {
+ status: (backupError as { status?: unknown }).status,
+ });
+ }
+ }
+}
diff --git a/server/index.test.ts b/server/index.test.ts
index 262094cf5a..56505f4b02 100644
--- a/server/index.test.ts
+++ b/server/index.test.ts
@@ -12672,14 +12672,15 @@ describe("harness HTTP API", () => {
});
expect(saved.status).toBe(200);
expect(saved.body.imageGen).toEqual({ provider: "custom", configured: true, model: "local/image",
+ primary: { provider: "custom", model: "local/image", configured: true }, fallback: null, ready: true, maxPerTurn: 4,
customUrl: "http://127.0.0.1:4321/v1", customModel: "local/image",
- openaiConfigured: true, xaiConfigured: false, customKeyConfigured: true });
+ openaiConfigured: true, xaiConfigured: false, customKeyConfigured: true, geminiConfigured: false, openrouterConfigured: false });
for (const secret of ["openai-avatar-fixture", "custom-avatar-fixture"]) {
expect(JSON.stringify(saved.body)).not.toContain(secret);
expect(readFileSync(join(home, ".openmausbot", "config.json"), "utf8")).not.toContain(secret);
}
const disk = JSON.parse(readFileSync(join(home, ".openmausbot", "config.json"), "utf8"));
- expect(disk.imageGen).toMatchObject({ key: "", customApiKey: "", provider: "custom" });
+ expect(disk.imageGen).toMatchObject({ key: "", customApiKey: "", primary: { provider: "custom" }, customModel: "local/image" });
const preset = await api("PUT", "/api/config", { imageGen: { provider: "openai" } });
expect(preset.body.imageGen).toMatchObject({ provider: "openai", configured: true, customKeyConfigured: true });
diff --git a/server/index.ts b/server/index.ts
index 8104d276fa..d06fb8f5d2 100644
--- a/server/index.ts
+++ b/server/index.ts
@@ -68,11 +68,10 @@ import {
messageAttachmentName,
messageFileRoots,
} from "./message-file.ts";
-import {
- avatarGenerationRequestSchema,
- generateAvatarImage,
- avatarImageStatus,
-} from "./avatar-image.ts";
+import { avatarImageStatus } from "./avatar-image.ts";
+import { imageGenerationReady } from "./image-generation.ts";
+import { createImageToolRoutes } from "./routes/image-tools.ts";
+import { createImageSettingsRoutes } from "./routes/image-settings.ts";
import { fitsOnOneLine, parseBotProfilePatch } from "./bot-profile.ts";
import { routeDirectTurn } from "./turn-route.ts"; import { QuickModelFallback } from "./quick-model-fallback.ts"; import { COMPUTER_JOURNAL_PATH, createSavedSteps, personRequest, savedStepsEnabled } from "./saved-steps/saved-steps.ts";
import { groupTurnCwd } from "./room-cwd.ts";
@@ -1872,7 +1871,7 @@ function agentsIntegration(
const bot = store.bot(botId), speaking = botForThread(botId, threadId) ?? bot;
// Only advertises the tools; the routes behind them refuse regardless.
const host = { skillAuthoring: skillAuthoringEnabled(cfg), sharedComputers: lendingEnabled(), cloudHome: Boolean(CLOUD_HOME), team: Boolean(CLOUD_TEAM), escalations: chiefEscalationsEnabled(cfg),
- voiceNotes: tts.voiceReady(cfg, speaking?.voice) && speaking?.voiceNotes !== false, x: Boolean(researchCredential(cfg.treg?.key)), research: researchAvailability.available() };
+ voiceNotes: tts.voiceReady(cfg, speaking?.voice) && speaking?.voiceNotes !== false, x: Boolean(researchCredential(cfg.treg?.key)), research: researchAvailability.available(), imageGeneration: imageGenerationReady(cfg) };
return { ...agentsProxyLaunch(), env: agentsServerEnv({ threadId, bot: bot ?? { id: botId }, room: Boolean(store.groupByThread(threadId)), teamComputer: Boolean(bot && inheritedTeamComputer(bot)), host },
{ generation, depth, skillAuthoring, roomHandoffId, ...(hostFiles && !CLOUD_HOME && !HOSTED_WORKSPACE ? { deliversSavedFiles: true } : {}) },
(turn) => mintInternalCapability({ botId, threadId, kind: "agents", createdBots: 0, openedThreads: 0, ...turn }), `http://127.0.0.1:${PORT}`) };
@@ -2891,6 +2890,7 @@ const { stopThreadForPerson, stopOnTypedCommand, restartForPerson, noteTeammates
store, routines: () => routines, handoffs: () => handoffs, interruptDirectThread, clearUnattended,
stopGoal: (threadId) => oneOnOneGoals.stop(threadId), markStopped: (threadId) => personStops.stop(threadId, liveTurns.running(threadId), directTurnDispatchClaims.has(threadId)),
}); const teamMessages = createTeamMessages({ team: CLOUD_TEAM, dataDir: DATA_DIR, store, people: teamOwners.people, personName: teamHost.personName, audienceOf: teamHost.audienceOf, starters: threadStarters, notify, sees: (person) => visibleTo(person.role === "member" ? { kind: "member", email: person.email } : { kind: "all", email: person.email }), inbox: { askedPerson: teamOwners.routing.askedPerson, changed: (threadId) => { const bot = store.botByThread(threadId); if (bot) broadcast({ kind: "bot", bot: wireBot(bot) }); }, ensureOwnBot: (email) => { ensureDefaultBot(store, { dataDir: DATA_DIR, person: email, team: CLOUD_TEAM?.name ?? null }); }, handedFrom: (threadId) => { const from = delegatorOf(threadId); return from && from.threadId !== threadId ? from.threadId : null; }, continueTurn: relayedTurn({ store, startTurn, state: (botId, threadId) => ({ atCapacity: botAtThreadCapacity(botId, threadId), threadBusy: threadBusy(botId, threadId), groupTurn: roomTurnHolds(activeGroupTurnForBot(botId), threadId, false), parksBehindCoordination: parksBehindCoordination(botId, threadId) }) }), representative: { generate: async (botId, prompt) => (await sideJobs.text("representative", botId)?.generateText(prompt, { timeoutMs: 60_000 })) ?? null, busy: createPersonCalendar({ access: (person) => teamConnections.personApps().includes("googlecalendar") ? teamConnections.people.appsAccess(person) : null, connected: async (access) => (await composio.connectedServices(cfg, access)).googlecalendar?.connected === true, relay: (payload, session, signal, access) => composio.relayMcp(cfg, payload as never, session, undefined, signal, access) }).busy } } });
+const imageTools = createImageToolRoutes({ config: () => cfg, liveTurn: (threadId) => liveTurnByThread.get(threadId), key: turnAttachmentKey, images: (key) => (turnAttachmentsByTurn.get(key) ?? []).filter((item) => item.kind === "image").length, park: (key, image) => { const saved = saveImage(image.bytes, image.mime); turnAttachmentsByTurn.set(key, [...turnAttachmentsByTurn.get(key) ?? [], { kind: "image", path: saved.path, mime: saved.mime }]); } });
const botNameClash = createBotNameClash({ store, people: () => teamMessages.people(), profileName: () => cfg.profile?.name });
const devsReports = createDevsReports({ dataDir: DATA_DIR, store, installId: ENVIRONMENT_ID, appVersion: serverVersion(), runsOn: CLOUD_TEAM ? "Team Cloud" : CLOUD_HOME ? "My Cloud" : DESKTOP_MANAGED ? "desktop app" : HOSTED_WORKSPACE ? "hosted server" : "self-hosted server", recentLog: captureRecentLog(), send: devsReportSender(bugReportEndpoint(process.env, CLOUD_HOME?.adminOrigin)), askStatus: devsStatusAsker(bugReportEndpoint(process.env, CLOUD_HOME?.adminOrigin), CLOUD_HOME), statusEveryMs: Number(process.env.OMB_DEVS_STATUS_MS) || undefined, tell: (threadId, text, person) => { const group = store.groupByThread(threadId), bot = group ? store.bot(group.memberIds[0] ?? "") : store.botByThread(threadId); if (bot) notify({ ...buildNoticeNotification(bot, threadId, text), ...(group ? { groupId: group.id } : {}), ...(CLOUD_TEAM && person ? { forPerson: person } : {}) }); }, working: (threadId) => { const group = store.groupByThread(threadId), bot = group ? null : store.botByThread(threadId); return group ? Boolean(group.busyBotId) || groupThreadIsWorking(group.id, threadId) : Boolean(bot && threadBusy(bot.id, threadId)); }, automated: (threadId) => Boolean(routines?.isActiveThread(threadId)), engine: (instanceId) => (registry.get(instanceId) ? { name: engineName(instanceId), snapshot: registry.lastSnapshot(instanceId) } : null), appsReady: () => composio.configured(cfg), sessions: () => sessions.list(), ownerKey: CLOUD_OWNER_KEY, team: Boolean(CLOUD_TEAM), profileEmail: () => cfg.profile?.email, language: appLanguage, lineLanguage: personLanguages.forLine });
const creditMoves = cloudCredit && createCreditMoves({ credit: cloudCredit, store, context: selectionContext, threadBusy, saveDefault: saveNewBotModel,
@@ -12352,7 +12352,7 @@ ROUTES.push(createBotMemoryRoutes({
broadcast({ kind: "config", ...configStatus() });
},
}));
-const teamMoveIn = CLOUD_TEAM ? createTeamMoveIn({ team: CLOUD_TEAM, dataDir: DATA_DIR, sessions, store, routines: () => routines, library: () => readSkillLibraryIndex(), starters: threadStarters }) : null; const cloudSendOwner = (auth: RequestAuth) => teamMoveIn ? teamMoveIn.owner(auth) : (CLOUD_HOME && auth.kind === "session" && auth.scopes.includes("admin")) || ownHome.owner(auth) ? { person: actorKey(auth as RequestAuth & { kind: "session" }), name: cfg.profile?.name?.trim() || "User" } : null; const botMoves = CLOUD_PERSONAL ? createBotMoves({ store, routines: () => routines, webhooks: () => webhooks, appEvents: () => appTriggers.manager, waits: () => botWaits, busy: (id) => botHasActiveTurn(id) || Boolean(routines?.activeRunForBot(id)) }) : null; ROUTES.push(createBotMoveRoutes({ moves: botMoves, enabled: CLOUD_PERSONAL })); if (teamMoveIn) { ROUTES.unshift(teamMoveIn.guard); ROUTES.push(teamMoveIn.routes); teamOwners.backfill(teamMoveIn.list()); } ROUTES.push(createDeciderRoutes({ decider, extractor, config: () => cfg }), createTtsRoutes({ config: () => cfg }), createHelperSuggestionRoutes({ notNow: proactive.suggestionNotNow }), createSetupRequestRoutes({ store, language: () => appLanguage() ?? Intl.DateTimeFormat().resolvedOptions().locale, sendRefusal: cloudGuestSendRefusal, presser: (auth) => setupPresser(sharedMembership(), auth, messageSender(auth)), canSetUp: (botId, threadId) => registry.get(store.projectBotForTask(botId, threadId)?.modelSelection.instanceId ?? "")?.adapter.capabilities.agentsMcp === true, send: (auth, botId, threadId, text) => acceptDirectSend({ botId, threadId, text, sender: messageSender(auth), trigger: usageTriggerFor(auth), personPresent: auth.kind === "session" || DESKTOP_MANAGED }) }), createNotificationRoutes(undefined, threadShown, CLOUD_TEAM ? (auth, entry) => teamOwners.routing.notificationReaches(teamOwners.viewer(auth), entry) : undefined), createUpdateCheckRoutes({ check: serverUpdateChecker({ desktopManaged: DESKTOP_MANAGED, managed: Boolean(CLOUD_HOME || HOSTED_WORKSPACE) }) }), createTimeZoneRoutes({ adopts: Boolean(CLOUD_HOME), dataDir: DATA_DIR, changed: () => routines?.rescheduleLocalTimes() }), createCloudSendRoutes({ appVersion: serverVersion(), ...(CLOUD_TEAM ? { refusal: personalMoveRefusal(CLOUD_TEAM), scope: (auth) => teamMoveIn?.scope(auth) ?? null } : {}), bots: () => store.bots, messagesTail: (threadId, limit) => store.messagesTail(threadId, limit), skills: (bot) => listSkills(bot.id), logins, config: () => cfg, lineLanguage: personLanguages.forLine, chats: { store, dataDir: DATA_DIR, owner: cloudSendOwner, ...(CLOUD_OWNER_KEY ? { ownerKey: CLOUD_OWNER_KEY } : {}), stamped: (threadId) => ownerOnlyCache.delete(threadId), instanceExists: (id) => Boolean(registry.get(id)), approvalSupported: (selection, mode) => supportsApprovalMode(selection, mode) }, cloudHome: Boolean(CLOUD_HOME), ownHome: ownHome.owner, automations: { routines: () => routines, calls: () => calendarCalls, webhooks: () => webhooks, appEvents: () => appTriggers.manager, waits: () => botWaits }, connections: () => cloudConnections.connections(), connectionFingerprints: (nonce) => cloudConnections.fingerprints(nonce), move: { dataDir: DATA_DIR, store, routines: () => routines, calls: () => calendarCalls, webhooks: () => webhooks, appEvents: () => appTriggers.manager, claudeCodeSkills: () => (claudeUserSkillsEnabled(cfg) ? claudeCodeSkillInputs() : []), instanceExists: (id) => Boolean(registry.get(id)), owner: cloudSendOwner, ownRoutine: (routine, person) => { cloudRoutineAuthors?.record(routine.id, routine); cloudRoutineAuthors?.wrote(routine.id, person); }, arrived: () => ownerOnlyCache.clear(), teamMemory, aboutMe: () => cfg.profile?.aboutMe ?? "", saveAboutMe: (text) => { saveConfig({ profile: { ...cfg.profile, aboutMe: text } }); Object.assign(cfg, loadConfig()); broadcast({ kind: "config", ...configStatus() }); } } }), cloudConnections.routes, createTodayRoutes({ visibleFor: (auth) => visibleTo(viewerFor(auth)), ...(teamOwners.asks ? { asks: teamOwners.asks, messages: teamMessages.needsYou } : {}), sources: () => ({ bots: store.bots, groups: store.groups, routines, parked: coordinator.active(), engines: registry.instances().map((instance) => ({ instanceId: instance.instanceId, snapshot: registry.lastSnapshot(instance.instanceId) })) }) }), createInboxRoutes(teamMessages));
+const teamMoveIn = CLOUD_TEAM ? createTeamMoveIn({ team: CLOUD_TEAM, dataDir: DATA_DIR, sessions, store, routines: () => routines, library: () => readSkillLibraryIndex(), starters: threadStarters }) : null; const cloudSendOwner = (auth: RequestAuth) => teamMoveIn ? teamMoveIn.owner(auth) : (CLOUD_HOME && auth.kind === "session" && auth.scopes.includes("admin")) || ownHome.owner(auth) ? { person: actorKey(auth as RequestAuth & { kind: "session" }), name: cfg.profile?.name?.trim() || "User" } : null; const botMoves = CLOUD_PERSONAL ? createBotMoves({ store, routines: () => routines, webhooks: () => webhooks, appEvents: () => appTriggers.manager, waits: () => botWaits, busy: (id) => botHasActiveTurn(id) || Boolean(routines?.activeRunForBot(id)) }) : null; ROUTES.push(createBotMoveRoutes({ moves: botMoves, enabled: CLOUD_PERSONAL })); if (teamMoveIn) { ROUTES.unshift(teamMoveIn.guard); ROUTES.push(teamMoveIn.routes); teamOwners.backfill(teamMoveIn.list()); } ROUTES.push(createDeciderRoutes({ decider, extractor, config: () => cfg }), createImageSettingsRoutes({ config: () => cfg }), createTtsRoutes({ config: () => cfg }), createHelperSuggestionRoutes({ notNow: proactive.suggestionNotNow }), createSetupRequestRoutes({ store, language: () => appLanguage() ?? Intl.DateTimeFormat().resolvedOptions().locale, sendRefusal: cloudGuestSendRefusal, presser: (auth) => setupPresser(sharedMembership(), auth, messageSender(auth)), canSetUp: (botId, threadId) => registry.get(store.projectBotForTask(botId, threadId)?.modelSelection.instanceId ?? "")?.adapter.capabilities.agentsMcp === true, send: (auth, botId, threadId, text) => acceptDirectSend({ botId, threadId, text, sender: messageSender(auth), trigger: usageTriggerFor(auth), personPresent: auth.kind === "session" || DESKTOP_MANAGED }) }), createNotificationRoutes(undefined, threadShown, CLOUD_TEAM ? (auth, entry) => teamOwners.routing.notificationReaches(teamOwners.viewer(auth), entry) : undefined), createUpdateCheckRoutes({ check: serverUpdateChecker({ desktopManaged: DESKTOP_MANAGED, managed: Boolean(CLOUD_HOME || HOSTED_WORKSPACE) }) }), createTimeZoneRoutes({ adopts: Boolean(CLOUD_HOME), dataDir: DATA_DIR, changed: () => routines?.rescheduleLocalTimes() }), createCloudSendRoutes({ appVersion: serverVersion(), ...(CLOUD_TEAM ? { refusal: personalMoveRefusal(CLOUD_TEAM), scope: (auth) => teamMoveIn?.scope(auth) ?? null } : {}), bots: () => store.bots, messagesTail: (threadId, limit) => store.messagesTail(threadId, limit), skills: (bot) => listSkills(bot.id), logins, config: () => cfg, lineLanguage: personLanguages.forLine, chats: { store, dataDir: DATA_DIR, owner: cloudSendOwner, ...(CLOUD_OWNER_KEY ? { ownerKey: CLOUD_OWNER_KEY } : {}), stamped: (threadId) => ownerOnlyCache.delete(threadId), instanceExists: (id) => Boolean(registry.get(id)), approvalSupported: (selection, mode) => supportsApprovalMode(selection, mode) }, cloudHome: Boolean(CLOUD_HOME), ownHome: ownHome.owner, automations: { routines: () => routines, calls: () => calendarCalls, webhooks: () => webhooks, appEvents: () => appTriggers.manager, waits: () => botWaits }, connections: () => cloudConnections.connections(), connectionFingerprints: (nonce) => cloudConnections.fingerprints(nonce), move: { dataDir: DATA_DIR, store, routines: () => routines, calls: () => calendarCalls, webhooks: () => webhooks, appEvents: () => appTriggers.manager, claudeCodeSkills: () => (claudeUserSkillsEnabled(cfg) ? claudeCodeSkillInputs() : []), instanceExists: (id) => Boolean(registry.get(id)), owner: cloudSendOwner, ownRoutine: (routine, person) => { cloudRoutineAuthors?.record(routine.id, routine); cloudRoutineAuthors?.wrote(routine.id, person); }, arrived: () => ownerOnlyCache.clear(), teamMemory, aboutMe: () => cfg.profile?.aboutMe ?? "", saveAboutMe: (text) => { saveConfig({ profile: { ...cfg.profile, aboutMe: text } }); Object.assign(cfg, loadConfig()); broadcast({ kind: "config", ...configStatus() }); } } }), cloudConnections.routes, createTodayRoutes({ visibleFor: (auth) => visibleTo(viewerFor(auth)), ...(teamOwners.asks ? { asks: teamOwners.asks, messages: teamMessages.needsYou } : {}), sources: () => ({ bots: store.bots, groups: store.groups, routines, parked: coordinator.active(), engines: registry.instances().map((instance) => ({ instanceId: instance.instanceId, snapshot: registry.lastSnapshot(instance.instanceId) })) }) }), createInboxRoutes(teamMessages));
if (CLOUD_TEAM) teamHost.adoptServerProfile(sessions.list().flatMap((session) => session.email ? [session.email] : []));
ROUTES.push(createSidebarSectionRoutes({ store, teamComputers, maxBots: MAX_WORKSPACE_BOTS, assertTeamComputerChangeIdle, wireBot }), createPresenceRoutes({ isOwner: ownerOrAdmin, heard: (auth, language) => personLanguages.heard(auth.kind === "session" ? actorKey(auth) : THIS_COMPUTER, language), sawChat: (auth, threadId) => { if (ownerOrAdmin(auth) && store.botByThread(threadId)) sawThread(threadId); }, active: async (source, zone, language) => { const answer = await proactive.brief.active(source, zone, language); firstHourHooks.arrived(); return answer; }, ...(CLOUD_TEAM ? { member: teamMessages.arrived } : {}) }), createMeRoutes({ team: CLOUD_TEAM, session: (auth) => (auth.kind === "session" ? auth.session : null), profile: teamHost.memberProfile, save: teamHost.saveMemberProfile, seed: teamHost.seedMemberProfile, seeded: teamHost.seededFields, changed: () => broadcast({ kind: "config", ...configStatus() }) }), createTeamPhoneRoutes({ team: CLOUD_TEAM, sessions, publicBase: (req, auth) => publicUrl() ?? (auth.kind === "session" ? requestOrigin(req) : null) }),
createTeamConnectionRoutes({ host: teamConnections, cfg: () => cfg, composio, policy: managedPolicy, publicOrigin: CLOUD_HOME?.publicOrigin ?? null, record: (auth, row) => appendAdminAction(DATA_DIR, { ...row, actor: decisionActorFor(auth) }) }), createSignInCardRoutes({ settle: signInSettle.settle, saveLogin: (botId, threadId, messageId, body, auth) => CLOUD_TEAM && !auth.scopes.includes("admin") ? Promise.resolve({ status: 403 as const, body: { error: memberLoginRefusal(CLOUD_TEAM) } }) : saveLoginFromCard(botId, threadId, messageId, body), saveTarget: signInSaveTarget, threadVisible: (auth, threadId) => visibleTo(viewerFor(auth)).thread(threadId) }));
@@ -13169,7 +13169,7 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {
throw Object.assign(new Error("the internal turn capability has expired"), { status: 401 });
}
};
- const botFolders = async () => ({ roots: messageFileRootsForThread(internalSender.id, internalCapability.threadId).filter((root) => root !== ATTACHMENTS_DIR), vmWorkspace: (await attachmentVmForTurn(internalCapability))?.workspaceDir ?? null }); if (await internalToolRoutes({ method, path, res, json, botId: internalSender.id, threadId: internalCapability.threadId, readBody: readInternalBody, folders: botFolders }) !== PASS || await waitRoutes({ method, path, res, json, botId: internalSender.id, threadId: internalCapability.threadId, readBody: readInternalBody, ...waitTurnChecks(internalCapability, internalSender) }) !== PASS || await teamMessages.internal({ method, path, res, json, botId: internalSender.id, threadId: internalCapability.threadId, readBody: readInternalBody }) !== PASS || await devsReports.internal({ method, path, res, json, botId: internalSender.id, threadId: internalCapability.threadId, readBody: readInternalBody }) !== PASS || (computerAsks && await computerAsks.internal({ method, path, res, json, turn: internalCapability, readBody: readInternalBody }) !== PASS)) return; const pagesCall = new AbortController(); res.once("close", () => { if (!res.writableEnded) pagesCall.abort(); }); if (await publishedPages.internal({ method, path, res, json, botId: internalSender.id, threadId: internalCapability.threadId, readBody: readInternalBody, requireActive: requireActiveInternalCapability, signal: pagesCall.signal, folders: botFolders, post: (text, publishedPage, bundle) => { const source = connectorThread(internalSender.id, internalCapability.threadId); return !source ? null : (!source.group && bundle && publishedPages.show({ threadId: internalCapability.threadId, card: publishedPage, bundle })) || store.appendMessage(internalCapability.threadId, { role: "bot", kind: "text", text, publishedPage, ...(source.group ? { from: { botId: internalSender.id, name: internalSender.name, color: internalSender.color } } : {}) }).id; } }) !== PASS) return;
+ const botFolders = async () => ({ roots: messageFileRootsForThread(internalSender.id, internalCapability.threadId).filter((root) => root !== ATTACHMENTS_DIR), vmWorkspace: (await attachmentVmForTurn(internalCapability))?.workspaceDir ?? null }); if (await internalToolRoutes({ method, path, res, json, botId: internalSender.id, threadId: internalCapability.threadId, readBody: readInternalBody, folders: botFolders }) !== PASS || await waitRoutes({ method, path, res, json, botId: internalSender.id, threadId: internalCapability.threadId, readBody: readInternalBody, ...waitTurnChecks(internalCapability, internalSender) }) !== PASS || await teamMessages.internal({ method, path, res, json, botId: internalSender.id, threadId: internalCapability.threadId, readBody: readInternalBody }) !== PASS || await devsReports.internal({ method, path, res, json, botId: internalSender.id, threadId: internalCapability.threadId, readBody: readInternalBody }) !== PASS || (computerAsks && await computerAsks.internal({ method, path, res, json, turn: internalCapability, readBody: readInternalBody }) !== PASS) || await imageTools.internal({ method, path, res, json, readBody: readInternalBody, threadId: internalCapability.threadId, requireActive: requireActiveInternalCapability }) !== PASS) return; const pagesCall = new AbortController(); res.once("close", () => { if (!res.writableEnded) pagesCall.abort(); }); if (await publishedPages.internal({ method, path, res, json, botId: internalSender.id, threadId: internalCapability.threadId, readBody: readInternalBody, requireActive: requireActiveInternalCapability, signal: pagesCall.signal, folders: botFolders, post: (text, publishedPage, bundle) => { const source = connectorThread(internalSender.id, internalCapability.threadId); return !source ? null : (!source.group && bundle && publishedPages.show({ threadId: internalCapability.threadId, card: publishedPage, bundle })) || store.appendMessage(internalCapability.threadId, { role: "bot", kind: "text", text, publishedPage, ...(source.group ? { from: { botId: internalSender.id, name: internalSender.name, color: internalSender.color } } : {}) }).id; } }) !== PASS) return;
const delegatedThisTurn = (taskId: string) => {
(internalCapability.delegatedThisTurn ??= new Set()).add(taskId);
};
@@ -15065,19 +15065,6 @@ const handleRequest = async (req: IncomingMessage, res: ServerResponse) => {
}
return json(res, 200, { skills });
}
- if (method === "POST" && path === "/api/bot-defaults/avatar") {
- const body = await readBody(req);
- if (!body || typeof body !== "object" || Array.isArray(body)) return json(res, 400, { error: "avatar preview must be a JSON object" });
- const profile = parseBotProfilePatch(body.profile, true);
- if (!profile.ok) return json(res, 400, { error: profile.error });
- const checked = avatarGenerationRequestSchema.safeParse({ prompt: body.prompt });
- if (!checked.success) return json(res, 400, { error: checked.error.message });
- const { prompt } = checked.data;
- const generated = await generateAvatarImage(cfg, {
- name: profile.patch.name ?? "", title: profile.patch.title ?? "", description: profile.patch.description ?? "",
- }, prompt);
- return json(res, 200, { dataUrl: `data:${generated.mime};base64,${generated.bytes.toString("base64")}` });
- }
m = path.match(/^\/api\/bots\/([\w-]+)\/soul$/);
if (m && method === "GET") {
diff --git a/server/routes/config.ts b/server/routes/config.ts
index c14e71de29..b6b6f5ba51 100644
--- a/server/routes/config.ts
+++ b/server/routes/config.ts
@@ -529,6 +529,7 @@ export function createConfigRoutes(deps: ConfigRouteDeps): RouteHandler {
if (persisted.decider?.workersAiToken !== undefined) persisted.decider.workersAiToken = "";
if (persisted.imageGen?.key !== undefined) persisted.imageGen.key = "";
if (persisted.imageGen?.customApiKey !== undefined) persisted.imageGen.customApiKey = "";
+ if (persisted.imageGen?.geminiKey !== undefined) persisted.imageGen.geminiKey = "";
if (persisted.live?.key !== undefined) persisted.live.key = "";
if (persisted.treg?.key !== undefined) persisted.treg.key = "";
if (persisted.postiz?.key !== undefined) persisted.postiz.key = "";
diff --git a/server/routes/image-settings.test.ts b/server/routes/image-settings.test.ts
new file mode 100644
index 0000000000..23abef40e7
--- /dev/null
+++ b/server/routes/image-settings.test.ts
@@ -0,0 +1,111 @@
+import { IncomingMessage, ServerResponse } from "node:http";
+import { Socket } from "node:net";
+import { describe, expect, it, vi } from "vitest";
+import { z } from "zod";
+
+import { IMAGE_DEFAULT_MODELS, IMAGE_MODEL_CHOICES } from "../../shared/image-generation.ts";
+import type { ImageCredentials } from "../image-generation.ts";
+import type { RequestAuth } from "../request-auth.ts";
+import { createImageSettingsRoutes } from "./image-settings.ts";
+import { PASS } from "./table.ts";
+
+const entry = (id: string, outputs: string[]) => ({ id, name: `Name of ${id}`, architecture: { output_modalities: outputs } });
+const catalog = (...models: unknown[]) => new Response(JSON.stringify({ data: models }), { status: 200 });
+const listSchema = z.object({ source: z.string(), models: z.array(z.object({ id: z.string(), group: z.string() })) });
+const verdictSchema = z.object({ ok: z.boolean(), reason: z.string().optional(), model: z.string().optional(), freeTier: z.boolean().optional(), check: z.string().optional(), status: z.number().optional() });
+
+async function call(route: ReturnType<typeof createImageSettingsRoutes>, path: string, method: string, body?: unknown) {
+ const req = new IncomingMessage(new Socket());
+ const res = new ServerResponse(req);
+ let answer: { status: number; body: unknown } | null = null;
+ const out = await route({
+ req, res, url: new URL(`http://localhost${path}`), path, method,
+ readBody: async () => body,
+ auth: { kind: "loopback", scopes: ["admin"] } as RequestAuth,
+ json: (_res, status, sent) => { answer = { status, body: sent }; },
+ });
+ return { out, answer: answer as { status: number; body: unknown } | null };
+}
+
+const models = async (route: ReturnType<typeof createImageSettingsRoutes>) => listSchema.parse((await call(route, "/api/images/openrouter-models", "GET")).answer?.body);
+const test = async (cfg: ImageCredentials, provider: string, fetchImpl: typeof fetch) => {
+ const { answer } = await call(createImageSettingsRoutes({ config: () => cfg, fetch: fetchImpl }), "/api/images/test", "POST", { provider });
+ return { status: answer?.status, verdict: verdictSchema.parse(answer?.body) };
+};
+
+describe("the OpenRouter image model list in Settings", () => {
+ it("asks OpenRouter for image models only and lists the curated ones first, then the rest", async () => {
+ const fetchImpl = vi.fn<typeof fetch>(async () => catalog(
+ entry("acme/painter-9", ["image"]),
+ entry(IMAGE_DEFAULT_MODELS.openrouter, ["image", "text"]),
+ entry("openrouter/auto", ["text", "image"]),
+ entry("acme/chatty", ["text"]),
+ ));
+ const list = await models(createImageSettingsRoutes({ config: () => ({}), fetch: fetchImpl }));
+ expect(String(fetchImpl.mock.calls[0]![0])).toBe("https://openrouter.ai/api/v1/models?output_modalities=image");
+ expect(list.source).toBe("openrouter");
+ expect(list.models.map((m) => [m.group, m.id])).toEqual([
+ ["recommended", IMAGE_DEFAULT_MODELS.openrouter],
+ ["more", "acme/painter-9"],
+ ]);
+ });
+
+ it("falls back to the curated list, default first, when OpenRouter cannot be reached", async () => {
+ const list = await models(createImageSettingsRoutes({ config: () => ({}), fetch: async () => { throw new TypeError("offline"); } }));
+ expect(list.source).toBe("builtin");
+ expect(list.models.map((m) => m.id)).toEqual(IMAGE_MODEL_CHOICES.openrouter.map((m) => m.id));
+ expect(list.models[0]!.id).toBe(IMAGE_DEFAULT_MODELS.openrouter);
+ });
+
+ it("leaves other requests to the next route", async () => {
+ const fetchImpl = vi.fn<typeof fetch>();
+ const route = createImageSettingsRoutes({ config: () => ({}), fetch: fetchImpl });
+ expect((await call(route, "/api/images/openrouter-models", "POST")).out).toBe(PASS);
+ expect((await call(route, "/api/decider/models", "GET")).out).toBe(PASS);
+ expect(fetchImpl).not.toHaveBeenCalled();
+ });
+});
+
+describe("testing an image provider from Settings, without making an image", () => {
+ const openrouter = (model?: string): ImageCredentials => ({ openrouter: { key: "or-key" }, imageGen: { primary: { provider: "openrouter", ...(model ? { model } : {}) } } });
+ const answers = (routes: Record<string, () => Response>) => vi.fn<typeof fetch>(async (url) => {
+ const found = Object.entries(routes).find(([prefix]) => String(url).startsWith(prefix));
+ if (!found) throw new Error(`unexpected request to ${String(url)}`);
+ return found[1]();
+ });
+
+ it("checks the OpenRouter key and that the chosen model exists, and reports an account without credit", async () => {
+ const fetchImpl = answers({
+ "https://openrouter.ai/api/v1/key": () => Response.json({ data: { is_free_tier: true } }),
+ "https://openrouter.ai/api/v1/models/google/gemini-2.5-flash-image/endpoints": () => Response.json({ data: {} }),
+ });
+ expect(await test(openrouter(), "openrouter", fetchImpl)).toEqual({ status: 200, verdict: { ok: true, check: "authentication", freeTier: true } });
+ expect(fetchImpl.mock.calls.find(([url]) => String(url).endsWith("/endpoints"))?.[1]?.headers).not.toHaveProperty("authorization");
+ });
+
+ it("names a model OpenRouter does not have", async () => {
+ const fetchImpl = answers({
+ "https://openrouter.ai/api/v1/key": () => Response.json({ data: { is_free_tier: false } }),
+ "https://openrouter.ai/api/v1/models/acme/nope-9/endpoints": () => new Response("{}", { status: 404 }),
+ });
+ expect((await test(openrouter("acme/nope-9"), "openrouter", fetchImpl)).verdict).toEqual({ ok: false, reason: "model_missing", model: "acme/nope-9" });
+ });
+
+ it("reports a refused key, and a missing key without calling anyone", async () => {
+ const refused = answers({ "https://api.openai.com/v1/models": () => new Response("{}", { status: 401 }) });
+ expect((await test({ imageGen: { key: "sk-wrong" } }, "openai", refused)).verdict).toEqual({ ok: false, reason: "rejected", status: 401 });
+ const none = vi.fn<typeof fetch>();
+ expect((await test({}, "gemini", none)).verdict).toEqual({ ok: false, reason: "no_key" });
+ expect(none).not.toHaveBeenCalled();
+ });
+
+ it("sends a Gemini key to Google's OpenAI-compatible model list", async () => {
+ const fetchImpl = answers({ "https://generativelanguage.googleapis.com/v1beta/openai/models": () => Response.json({ data: [{ id: "gemini-2.5-flash-image" }] }) });
+ expect((await test({ imageGen: { geminiKey: "AIza-key" } }, "gemini", fetchImpl)).verdict).toEqual({ ok: true, check: "models" });
+ });
+
+ it("refuses a request that names no known provider", async () => {
+ const { answer } = await call(createImageSettingsRoutes({ config: () => ({}), fetch: vi.fn<typeof fetch>() }), "/api/images/test", "POST", { provider: "acme" });
+ expect(answer?.status).toBe(400);
+ });
+});
diff --git a/server/routes/image-settings.ts b/server/routes/image-settings.ts
new file mode 100644
index 0000000000..c5dfa9eaad
--- /dev/null
+++ b/server/routes/image-settings.ts
@@ -0,0 +1,74 @@
+// The answer is a verdict, never the key and never the vendor's body; nothing here makes an image.
+import { z } from "zod";
+
+import { IMAGE_MODEL_CHOICES, IMAGE_PROVIDERS, type ImageProvider, type ImageProviderTest } from "../../shared/image-generation.ts";
+import { avatarGenerationRequestSchema, generateAvatarImage } from "../avatar-image.ts";
+import { parseBotProfilePatch } from "../bot-profile.ts";
+import { createOpenRouterModelCatalog } from "../decider/openrouter-models.ts";
+import { customImageUrl, imageProviderKey, imageSlots, type ImageCredentials } from "../image-generation.ts";
+import { checkProviderKey, type ProviderKeyKind } from "../provider-key-check.ts";
+import { PASS, type RouteHandler } from "./table.ts";
+
+const GEMINI_OPENAI_BASE = "https://generativelanguage.googleapis.com/v1beta/openai";
+const testSchema = z.object({ provider: z.enum(IMAGE_PROVIDERS) });
+
+function keyCheckTarget(cfg: ImageCredentials, provider: ImageProvider): { provider: ProviderKeyKind; url?: string } {
+ if (provider === "gemini") return { provider: "openaiCompat", url: GEMINI_OPENAI_BASE };
+ if (provider === "custom") return { provider: "openaiCompat", url: customImageUrl(cfg) };
+ return { provider };
+}
+
+/** OpenRouter answers 404 for a model ID it does not have; its catalog needs no key. */
+async function openrouterHasModel(model: string, fetchImpl: typeof fetch): Promise<boolean | null> {
+ const [vendor, ...slug] = model.split("/");
+ if (!vendor || slug.length === 0) return false;
+ const url = `https://openrouter.ai/api/v1/models/${encodeURIComponent(vendor)}/${slug.map(encodeURIComponent).join("/")}/endpoints`;
+ try {
+ const response = await fetchImpl(url, { headers: { accept: "application/json" }, signal: AbortSignal.timeout(10_000), redirect: "error" });
+ await response.body?.cancel().catch(() => undefined);
+ return response.status === 404 ? false : response.ok ? true : null;
+ } catch {
+ return null;
+ }
+}
+
+export async function testImageProvider(cfg: ImageCredentials, provider: ImageProvider, fetchImpl: typeof fetch = fetch): Promise<ImageProviderTest> {
+ const key = imageProviderKey(cfg, provider);
+ if (!key) return { ok: false, reason: "no_key" };
+ const verdict = await checkProviderKey({ ...keyCheckTarget(cfg, provider), key }, fetchImpl);
+ if (!verdict.ok) return verdict;
+ if (provider === "openrouter") {
+ const { primary, fallback } = imageSlots(cfg);
+ for (const slot of [primary, fallback]) {
+ if (slot?.provider === provider && (await openrouterHasModel(slot.model, fetchImpl)) === false) return { ok: false, reason: "model_missing", model: slot.model };
+ }
+ }
+ return { ok: true, check: verdict.check, ...(verdict.freeTier !== undefined ? { freeTier: verdict.freeTier } : {}) };
+}
+
+export function createImageSettingsRoutes(deps: { config: () => ImageCredentials; fetch?: typeof fetch }): RouteHandler {
+ const models = createOpenRouterModelCatalog({ fetch: deps.fetch, output: "image", curated: IMAGE_MODEL_CHOICES.openrouter });
+ return async ({ req, res, path, method, json, readBody }) => {
+ if (method === "POST" && path === "/api/bot-defaults/avatar") {
+ const body = await readBody(req);
+ if (!body || typeof body !== "object" || Array.isArray(body)) return json(res, 400, { error: "avatar preview must be a JSON object" });
+ const profile = parseBotProfilePatch(body.profile, true);
+ if (!profile.ok) return json(res, 400, { error: profile.error });
+ const checked = avatarGenerationRequestSchema.safeParse({ prompt: body.prompt });
+ if (!checked.success) return json(res, 400, { error: checked.error.message });
+ const generated = await generateAvatarImage(deps.config(), {
+ name: profile.patch.name ?? "", title: profile.patch.title ?? "", description: profile.patch.description ?? "",
+ }, checked.data.prompt);
+ return json(res, 200, { dataUrl: `data:${generated.mime};base64,${generated.bytes.toString("base64")}` });
+ }
+ if (path === "/api/images/openrouter-models" && method === "GET") {
+ res.setHeader("cache-control", "no-store");
+ return json(res, 200, await models.load());
+ }
+ if (path !== "/api/images/test" || method !== "POST") return PASS;
+ const parsed = testSchema.safeParse(await readBody(req, 8192));
+ if (!parsed.success) return json(res, 400, { error: `provider must be one of ${IMAGE_PROVIDERS.join(", ")}` });
+ res.setHeader("cache-control", "no-store");
+ return json(res, 200, await testImageProvider(deps.config(), parsed.data.provider, deps.fetch));
+ };
+}
diff --git a/server/routes/image-tools.test.ts b/server/routes/image-tools.test.ts
new file mode 100644
index 0000000000..c05faf166d
--- /dev/null
+++ b/server/routes/image-tools.test.ts
@@ -0,0 +1,223 @@
+import { IncomingMessage, ServerResponse } from "node:http";
+import { Socket } from "node:net";
+import { describe, expect, it, vi } from "vitest";
+
+import type { GeneratedImage } from "../image-generation.ts";
+import { createImageToolRoutes, generateImageForTurn, IMAGE_MESSAGES } from "./image-tools.ts";
+
+const PNG = Buffer.from("iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=", "base64");
+const CFG = {
+ imageGen: { key: "openai-secret", primary: { provider: "openai" as const }, fallback: { provider: "xai" as const } },
+ xai: { key: "xai-secret" },
+};
+
+function okFetch(): typeof fetch {
+ return vi.fn<typeof fetch>(async () => new Response(JSON.stringify({ data: [{ b64_json: PNG.toString("base64") }] })));
+}
+
+function deps(overrides: { cfg?: Parameters<typeof generateImageForTurn>[1]["cfg"]; fetchImpl?: typeof fetch; parked?: number; live?: boolean; noTurn?: boolean } = {}) {
+ const attached: GeneratedImage[] = [];
+ const live = overrides.live ?? true;
+ return {
+ attached,
+ deps: {
+ cfg: overrides.cfg ?? CFG,
+ fetchImpl: overrides.fetchImpl ?? okFetch(),
+ inFlight: new Map<string, number>(),
+ turn: overrides.noTurn ? null : {
+ key: "thread:turn",
+ parked: () => (overrides.parked ?? 0) + attached.length,
+ attach: (image: GeneratedImage) => { if (live) attached.push(image); return live; },
+ },
+ },
+ };
+}
+
+describe("generate_image for a turn", () => {
+ it("attaches the base provider's image to the turn and says which provider made it", async () => {
+ const { deps: d, attached } = deps();
+ const result = await generateImageForTurn({ prompt: "a navy owl" }, d);
+ expect(result).toEqual({ status: 201, body: { text: expect.stringContaining("OpenAI (gpt-image-2)") } });
+ expect(attached).toEqual([{ bytes: PNG, mime: "image/png" }]);
+ });
+
+ it("says so when the backup made the image, and why the base did not", async () => {
+ const { deps: d } = deps({ cfg: { ...CFG, imageGen: { ...CFG.imageGen, key: "" } } });
+ const result = await generateImageForTurn({ prompt: "owl" }, d);
+ expect(result.body).toEqual({ text: expect.stringMatching(/xAI .*backup image provider, because the base failed: Add an OpenAI image API key first/) });
+ });
+
+ it("still moves to the backup when the person names a provider the base and backup share", async () => {
+ const fetchImpl = vi.fn<typeof fetch>()
+ .mockResolvedValueOnce(new Response("{}", { status: 429 }))
+ .mockResolvedValueOnce(new Response(JSON.stringify({ data: [{ b64_json: PNG.toString("base64") }] })));
+ const cfg = { imageGen: { key: "openai-secret", primary: { provider: "openai" as const }, fallback: { provider: "openai" as const, model: "gpt-image-1" } } };
+ const { deps: d } = deps({ cfg, fetchImpl });
+ const result = await generateImageForTurn({ prompt: "owl", provider: "openai" }, d);
+ expect(result).toEqual({ status: 201, body: { text: expect.stringContaining("OpenAI (gpt-image-1), the person's backup image provider") } });
+ });
+
+ it("keeps a failure outside the provider, such as saving the file, away from the model", async () => {
+ const { deps: d } = deps();
+ d.turn!.attach = () => { throw new Error("ENOSPC: no space left on device, open 'C:/private/attachments/x.png'"); };
+ expect(await generateImageForTurn({ prompt: "owl" }, d)).toEqual({ status: 500, body: { error: IMAGE_MESSAGES.notSaved } });
+ });
+
+ it("uses the provider the person named when it is their backup", async () => {
+ const fetchImpl = okFetch();
+ const { deps: d } = deps({ fetchImpl });
+ await generateImageForTurn({ prompt: "owl", provider: "xai" }, d);
+ expect(String(vi.mocked(fetchImpl).mock.calls[0]![0])).toContain("api.x.ai");
+ });
+
+ it("refuses a provider that is neither the base nor the backup, naming the ones set", async () => {
+ const { deps: d, attached } = deps();
+ const result = await generateImageForTurn({ prompt: "owl", provider: "gemini" }, d);
+ expect(result.status).toBe(400);
+ expect(result.body).toEqual({ error: expect.stringMatching(/Gemini.*base is OpenAI.*backup is xAI/) });
+ expect(attached).toEqual([]);
+ });
+
+ it("points the person to Settings when nothing is set up", async () => {
+ const { deps: d } = deps({ cfg: { imageGen: {} } });
+ const result = await generateImageForTurn({ prompt: "owl" }, d);
+ expect(result).toEqual({ status: 409, body: { error: IMAGE_MESSAGES.notSetUp } });
+ });
+
+ it("stops at the turn's image limit without calling a provider", async () => {
+ const fetchImpl = okFetch();
+ const { deps: d } = deps({ fetchImpl, cfg: { ...CFG, imageGen: { ...CFG.imageGen, maxPerTurn: 2 } }, parked: 2 });
+ const result = await generateImageForTurn({ prompt: "owl" }, d);
+ expect(result.status).toBe(429);
+ expect(result.body).toEqual({ error: expect.stringContaining("2 images") });
+ expect(fetchImpl).not.toHaveBeenCalled();
+ });
+
+ it("counts an image still being made, so parallel calls cannot pass the limit", async () => {
+ let finish!: () => void;
+ const started = new Promise<void>((resolve) => { finish = resolve; });
+ const fetchImpl = vi.fn<typeof fetch>(async () => {
+ await started;
+ return new Response(JSON.stringify({ data: [{ b64_json: PNG.toString("base64") }] }));
+ });
+ const { deps: d, attached } = deps({ fetchImpl, cfg: { ...CFG, imageGen: { ...CFG.imageGen, maxPerTurn: 1 } } });
+ const first = generateImageForTurn({ prompt: "owl" }, d);
+ const second = generateImageForTurn({ prompt: "fox" }, d);
+ await new Promise((resolve) => setTimeout(resolve, 0));
+ finish();
+ expect((await Promise.all([first, second])).map((result) => result.status)).toEqual([201, 429]);
+ expect(fetchImpl).toHaveBeenCalledTimes(1);
+ expect(attached).toHaveLength(1);
+ });
+
+ it("frees the slot of an image that failed, so the next call can still make one", async () => {
+ const fetchImpl = vi.fn<typeof fetch>()
+ .mockResolvedValueOnce(new Response("", { status: 500 }))
+ .mockResolvedValueOnce(new Response(JSON.stringify({ data: [{ b64_json: PNG.toString("base64") }] })));
+ const { deps: d, attached } = deps({ fetchImpl, cfg: { ...CFG, imageGen: { ...CFG.imageGen, maxPerTurn: 1 } } });
+ expect((await generateImageForTurn({ prompt: "owl" }, d)).status).toBe(502);
+ expect((await generateImageForTurn({ prompt: "owl" }, d)).status).toBe(201);
+ expect(attached).toHaveLength(1);
+ });
+
+ it("refuses when no turn is running, and drops an image whose turn ended meanwhile", async () => {
+ const idle = deps({ noTurn: true });
+ expect((await generateImageForTurn({ prompt: "owl" }, idle.deps)).status).toBe(409);
+
+ const ended = deps({ live: false });
+ expect((await generateImageForTurn({ prompt: "owl" }, ended.deps)).status).toBe(409);
+ expect(ended.attached).toEqual([]);
+ });
+
+ it.each([{}, { prompt: " " }, { prompt: "x".repeat(4001) }, { prompt: "owl", aspect: "4:3" }])("rejects a malformed call: %j", async (body) => {
+ const { deps: d } = deps();
+ expect((await generateImageForTurn(body, d)).status).toBe(400);
+ });
+
+ it("returns the provider's redacted error, not its body", async () => {
+ const fetchImpl = vi.fn<typeof fetch>(async () => new Response("Bearer openai-secret", { status: 500 }));
+ const { deps: d } = deps({ fetchImpl });
+ const result = await generateImageForTurn({ prompt: "owl" }, d);
+ expect(result).toEqual({ status: 502, body: { error: "OpenAI image generation failed (HTTP 500, model gpt-image-2)" } });
+ });
+});
+
+describe("the generate_image route", () => {
+ function route(options: { fetchImpl: typeof fetch; requireActive?: () => void }) {
+ const live = new Map([["thread", "turn-1"]]);
+ const parked = new Map<string, GeneratedImage[]>();
+ const routes = createImageToolRoutes({
+ config: () => ({ ...CFG, imageGen: { ...CFG.imageGen, maxPerTurn: 1 } }),
+ fetchImpl: options.fetchImpl,
+ liveTurn: (threadId) => live.get(threadId),
+ key: (threadId, turnId) => `${threadId}:${turnId}`,
+ images: (key) => parked.get(key)?.length ?? 0,
+ park: (key, image) => { parked.set(key, [...parked.get(key) ?? [], image]); },
+ });
+ const res = new ServerResponse(new IncomingMessage(new Socket()));
+ const call = async () => {
+ let answer: { status: number; body: unknown } | undefined;
+ await routes.internal({
+ method: "POST", path: "/api/internal/images/generate", res,
+ json: (_res: ServerResponse, status: number, body: unknown) => { answer = { status, body }; },
+ readBody: async () => ({ prompt: "owl" }),
+ threadId: "thread", requireActive: options.requireActive ?? (() => {}),
+ });
+ return answer!;
+ };
+ return { call, live, parked, res };
+ }
+
+ it("drops an image whose turn was replaced while it was made, and frees its slot", async () => {
+ let release!: () => void;
+ const held = new Promise<void>((resolve) => { release = resolve; });
+ const fetchImpl = vi.fn<typeof fetch>(async () => {
+ await held;
+ return new Response(JSON.stringify({ data: [{ b64_json: PNG.toString("base64") }] }));
+ });
+ const r = route({ fetchImpl });
+ const pending = r.call();
+ await new Promise((resolve) => setTimeout(resolve, 0));
+ r.live.set("thread", "turn-2");
+ release();
+ expect(await pending).toEqual({ status: 409, body: { error: IMAGE_MESSAGES.noTurn } });
+ expect([...r.parked.values()].flat()).toEqual([]);
+ expect((await r.call()).status).toBe(201);
+ expect(r.parked.get("thread:turn-2")).toHaveLength(1);
+ });
+
+ it("answers 401 and parks nothing when the capability expired while the image was made", async () => {
+ let checks = 0;
+ const requireActive = () => {
+ if (++checks === 2) throw Object.assign(new Error("the internal turn capability has expired"), { status: 401 });
+ };
+ const r = route({ fetchImpl: okFetch(), requireActive });
+ expect(await r.call()).toEqual({ status: 401, body: { error: "the internal turn capability has expired" } });
+ expect([...r.parked.values()].flat()).toEqual([]);
+ expect((await r.call()).status).toBe(201);
+ });
+
+ it("leaves other requests to the next route", async () => {
+ const routes = createImageToolRoutes({ config: () => CFG, liveTurn: () => "turn", key: (a, b) => a + b, images: () => 0, park: () => {} });
+ const answered = vi.fn<(res: ServerResponse, status: number, body: unknown) => void>();
+ const res = new ServerResponse(new IncomingMessage(new Socket()));
+ const out = await routes.internal({ method: "POST", path: "/api/internal/voice-note", res, json: answered, readBody: async () => ({}), threadId: "t", requireActive: () => {} });
+ expect(typeof out).toBe("symbol");
+ expect(answered).not.toHaveBeenCalled();
+ });
+
+ it("cancels the provider call when the bot's tool call goes away", async () => {
+ let signal: AbortSignal | undefined;
+ const fetchImpl = vi.fn<typeof fetch>((_input, init) => new Promise((_resolve, reject) => {
+ signal = init!.signal!;
+ signal.addEventListener("abort", () => reject(Object.assign(new Error("aborted"), { name: "AbortError" })));
+ }));
+ const r = route({ fetchImpl });
+ const pending = r.call();
+ await new Promise((resolve) => setTimeout(resolve, 0));
+ r.res.emit("close");
+ expect(await pending).toEqual({ status: 409, body: { error: "Image generation was cancelled" } });
+ expect(signal!.aborted).toBe(true);
+ expect([...r.parked.values()].flat()).toEqual([]);
+ });
+});
diff --git a/server/routes/image-tools.ts b/server/routes/image-tools.ts
new file mode 100644
index 0000000000..a5e5d32f45
--- /dev/null
+++ b/server/routes/image-tools.ts
@@ -0,0 +1,132 @@
+import type { ServerResponse } from "node:http";
+import { z } from "zod";
+
+import { IMAGE_MAX_PER_TURN_DEFAULT, IMAGE_PROVIDERS } from "../../shared/image-generation.ts";
+import { IMAGE_PROMPT_MAX_CHARS } from "../drivers/agents-image-tools.ts";
+import {
+ generateImage, imageGenerationReady, imageProviderName, imageSlots,
+ type GeneratedImage, type ImageCredentials,
+} from "../image-generation.ts";
+import type { json } from "../harness/http.ts";
+import { PASS } from "./table.ts";
+
+export const IMAGE_MESSAGES = {
+ notSetUp: "Image generation isn't set up on this computer. Ask the person to choose an image provider in Settings → AI → Image generation (shown in advanced mode).",
+ noTurn: "This turn has not started yet or already ended, so the image could not be attached.",
+ notSaved: "The image could not be saved on this computer. Try again shortly.",
+} as const;
+
+const requestSchema = z.object({
+ prompt: z.string().trim().min(1).max(IMAGE_PROMPT_MAX_CHARS),
+ aspect: z.enum(["1:1", "16:9", "9:16"]).optional(),
+ provider: z.enum(IMAGE_PROVIDERS).optional(),
+});
+
+export interface ImageTurn {
+ key: string;
+ parked: () => number;
+ attach: (image: GeneratedImage) => boolean;
+}
+
+export interface ImageToolDeps {
+ cfg: ImageCredentials;
+ fetchImpl?: typeof fetch;
+ turn: ImageTurn | null;
+ /** Images still being made, per turn key: they count toward the limit before they are attached. */
+ inFlight: Map<string, number>;
+ signal?: AbortSignal;
+}
+
+type Outcome = { status: number; body: { text: string } | { error: string } };
+
+export async function generateImageForTurn(raw: unknown, deps: ImageToolDeps): Promise<Outcome> {
+ const parsed = requestSchema.safeParse(raw);
+ if (!parsed.success) {
+ return { status: 400, body: { error: `generate_image takes a prompt (1 to ${IMAGE_PROMPT_MAX_CHARS} characters), an optional aspect (1:1, 16:9 or 9:16) and an optional provider.` } };
+ }
+ const { prompt, aspect, provider } = parsed.data;
+ const { turn } = deps;
+ if (!turn) return { status: 409, body: { error: IMAGE_MESSAGES.noTurn } };
+ const limit = deps.cfg.imageGen?.maxPerTurn ?? IMAGE_MAX_PER_TURN_DEFAULT;
+ if (turn.parked() + (deps.inFlight.get(turn.key) ?? 0) >= limit) {
+ return { status: 429, body: { error: `This turn already has ${limit} images, the most the person allows per reply. Send what you have.` } };
+ }
+
+ const { primary, fallback } = imageSlots(deps.cfg);
+ let slot: "primary" | "fallback" | undefined;
+ if (provider) {
+ const base = primary.provider === provider;
+ const backup = fallback?.provider === provider;
+ if (!base && !backup) {
+ const set = `the base is ${imageProviderName(primary.provider)}${fallback ? ` and the backup is ${imageProviderName(fallback.provider)}` : " and there is no backup"}`;
+ return { status: 400, body: { error: `${imageProviderName(provider)} is not one of the person's image providers: ${set}. Use one of those, or ask the person to change it in Settings.` } };
+ }
+ if (!(base && backup)) slot = base ? "primary" : "fallback";
+ } else if (!imageGenerationReady(deps.cfg)) {
+ return { status: 409, body: { error: IMAGE_MESSAGES.notSetUp } };
+ }
+
+ deps.inFlight.set(turn.key, (deps.inFlight.get(turn.key) ?? 0) + 1);
+ try {
+ const image = await generateImage(deps.cfg, { prompt, aspect }, { slot, fetchImpl: deps.fetchImpl, signal: deps.signal });
+ if (!turn.attach({ bytes: image.bytes, mime: image.mime })) return { status: 409, body: { error: IMAGE_MESSAGES.noTurn } };
+ const backup = image.usedFallback ? `, the person's backup image provider${image.baseError ? `, because the base failed: ${image.baseError}` : ""}` : "";
+ const by = `${imageProviderName(image.provider)} (${image.model})${backup}`;
+ return { status: 201, body: { text: `Image made by ${by}. It will be attached to this turn's reply when the turn ends.` } };
+ } catch (error) {
+ const status = (error as { status?: unknown } | null)?.status;
+ if (typeof status !== "number" || !(error instanceof Error)) return { status: 500, body: { error: IMAGE_MESSAGES.notSaved } };
+ return { status, body: { error: error.message } };
+ } finally {
+ const left = (deps.inFlight.get(turn.key) ?? 1) - 1;
+ if (left > 0) deps.inFlight.set(turn.key, left); else deps.inFlight.delete(turn.key);
+ }
+}
+
+export interface ImageRouteContext {
+ method: string;
+ path: string;
+ res: ServerResponse;
+ json: typeof json;
+ readBody: () => Promise<unknown>;
+ threadId: string;
+ requireActive: () => void;
+}
+
+export interface ImageTurnStore {
+ liveTurn: (threadId: string) => string | undefined;
+ key: (threadId: string, turnId: string) => string;
+ images: (key: string) => number;
+ park: (key: string, image: GeneratedImage) => void;
+}
+
+export function imageTurn(store: ImageTurnStore, threadId: string, requireActive: () => void): ImageTurn | null {
+ requireActive();
+ const turnId = store.liveTurn(threadId);
+ if (!turnId) return null;
+ const key = store.key(threadId, turnId);
+ return {
+ key,
+ parked: () => store.images(key),
+ attach: (image) => {
+ requireActive();
+ if (store.liveTurn(threadId) !== turnId) return false;
+ store.park(key, image);
+ return true;
+ },
+ };
+}
+
+export function createImageToolRoutes(deps: ImageTurnStore & { config: () => ImageCredentials; fetchImpl?: typeof fetch }) {
+ const inFlight = new Map<string, number>();
+ return {
+ async internal(ctx: ImageRouteContext): Promise<typeof PASS | void> {
+ if (ctx.method !== "POST" || ctx.path !== "/api/internal/images/generate") return PASS;
+ const turn = imageTurn(deps, ctx.threadId, ctx.requireActive);
+ const call = new AbortController();
+ ctx.res.once("close", () => { if (!ctx.res.writableEnded) call.abort(); });
+ const outcome = await generateImageForTurn(await ctx.readBody(), { cfg: deps.config(), fetchImpl: deps.fetchImpl, turn, inFlight, signal: call.signal });
+ ctx.json(ctx.res, outcome.status, outcome.body);
+ },
+ };
+}
diff --git a/server/testing/fake-image-api.ts b/server/testing/fake-image-api.ts
new file mode 100644
index 0000000000..49ba99755b
--- /dev/null
+++ b/server/testing/fake-image-api.ts
@@ -0,0 +1,43 @@
+#!/usr/bin/env node
+import { createServer } from "node:http";
+import { pathToFileURL } from "node:url";
+
+const PNG_1X1 = "iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNk+A8AAQUBAScY42YAAAAASUVORK5CYII=";
+
+export interface FakeImageApi {
+ url: string;
+ requests: Array<Record<string, unknown>>;
+ stop(): Promise<void>;
+}
+
+export async function startFakeImageApi(options: { port?: number } = {}): Promise<FakeImageApi> {
+ const requests: Array<Record<string, unknown>> = [];
+ const server = createServer((req, res) => {
+ let body = "";
+ req.on("data", (chunk) => { body += chunk; });
+ req.on("end", () => {
+ if (req.method !== "POST" || !req.url?.endsWith("/images/generations")) {
+ res.writeHead(404).end();
+ return;
+ }
+ let parsed: Record<string, unknown> = {};
+ try { parsed = JSON.parse(body) as Record<string, unknown>; } catch {}
+ requests.push(parsed);
+ process.stderr.write(`${JSON.stringify(parsed)}\n`);
+ res.writeHead(200, { "content-type": "application/json" }).end(JSON.stringify({ data: [{ b64_json: PNG_1X1 }] }));
+ });
+ });
+ await new Promise<void>((resolve) => server.listen(options.port ?? 0, "127.0.0.1", resolve));
+ const address = server.address();
+ const port = typeof address === "object" && address ? address.port : 0;
+ return {
+ url: `http://127.0.0.1:${port}/v1`,
+ requests,
+ stop: () => new Promise((resolve) => server.close(() => resolve())),
+ };
+}
+
+if (process.argv[1] && import.meta.url === pathToFileURL(process.argv[1]).href) {
+ const fake = await startFakeImageApi({ port: Number(process.argv[2]) || 0 });
+ process.stdout.write(`${fake.url}\n`);
+}
diff --git a/shared/credential-request.ts b/shared/credential-request.ts
index edc27019fb..b0d2bc300c 100644
--- a/shared/credential-request.ts
+++ b/shared/credential-request.ts
@@ -36,7 +36,7 @@ export const CREDENTIAL_TARGETS = {
},
openaiImageApiKey: {
label: "OpenAI API key",
- description: "Used only to generate custom bot avatar images.",
+ description: "Used to generate images in chats and bot avatars when OpenAI is the image provider.",
placeholder: "sk-…",
helpUrl: "https://platform.openai.com/api-keys",
},
diff --git a/shared/image-generation.ts b/shared/image-generation.ts
index 33d45adea7..e9ffb8b136 100644
--- a/shared/image-generation.ts
+++ b/shared/image-generation.ts
@@ -1,11 +1,60 @@
export type AvatarImageProvider = "openai" | "xai" | "custom";
+export const IMAGE_PROVIDERS = ["openai", "xai", "gemini", "openrouter", "custom"] as const;
+export type ImageProvider = (typeof IMAGE_PROVIDERS)[number];
+
+export const IMAGE_MAX_PER_TURN_DEFAULT = 4;
+export const IMAGE_DEFAULT_MODELS: Record<ImageProvider, string> = {
+ openai: "gpt-image-2", xai: "grok-imagine-image-2.0", gemini: "gemini-2.5-flash-image", openrouter: "google/gemini-2.5-flash-image", custom: "",
+};
+
+/** What Settings' Test learns about a provider; no image is made. */
+export type ImageProviderTest =
+ | { ok: true; check: "authentication" | "models"; freeTier?: boolean }
+ | { ok: false; reason: "no_key" | "rejected" | "unreachable" | "unexpected"; status?: number }
+ | { ok: false; reason: "model_missing"; model: string };
+
+export interface ImageModelChoice {
+ id: string;
+ name: string;
+}
+
+/** Offered first in Settings; OpenRouter adds the rest of its live image catalog, and any other ID can be typed. */
+export const IMAGE_MODEL_CHOICES: Record<ImageProvider, readonly ImageModelChoice[]> = {
+ openai: [
+ { id: "gpt-image-2", name: "GPT Image 2" },
+ { id: "gpt-image-1", name: "GPT Image 1" },
+ { id: "gpt-image-1-mini", name: "GPT Image 1 Mini" },
+ ],
+ xai: [{ id: "grok-imagine-image-2.0", name: "Grok Imagine Image 2.0" }],
+ gemini: [{ id: "gemini-2.5-flash-image", name: "Nano Banana (Gemini 2.5 Flash Image)" }],
+ openrouter: [
+ { id: "google/gemini-2.5-flash-image", name: "Google: Nano Banana (Gemini 2.5 Flash Image)" },
+ { id: "google/gemini-3.1-flash-image", name: "Google: Nano Banana 2 (Gemini 3.1 Flash Image)" },
+ { id: "google/gemini-3-pro-image", name: "Google: Nano Banana Pro (Gemini 3 Pro Image)" },
+ { id: "openai/gpt-image-2", name: "OpenAI: GPT Image 2" },
+ { id: "black-forest-labs/flux-3-image", name: "Black Forest Labs: FLUX 3 Image" },
+ { id: "bytedance-seed/seedream-5-0-pro", name: "ByteDance Seed: Seedream 5.0 Pro" },
+ { id: "x-ai/grok-imagine-image-2.0", name: "xAI: Grok Imagine Image 2.0" },
+ { id: "qwen/qwen-image-3", name: "Qwen: Qwen Image 3" },
+ ],
+ custom: [],
+};
+
+export interface ImageSlotConfig {
+ provider: ImageProvider;
+ model?: string;
+}
export interface ImageGenerationConfig {
- provider?: AvatarImageProvider;
+ primary?: ImageSlotConfig;
+ fallback?: ImageSlotConfig;
+ maxPerTurn?: number;
/** An OpenAI key; never sent to another provider. */
key?: string;
+ geminiKey?: string;
customApiKey?: string;
customUrl?: string;
+ provider?: AvatarImageProvider;
customModel?: string;
}
diff --git a/src/components/AvatarImageGenerator.tsx b/src/components/AvatarImageGenerator.tsx
index c8b5bfaca2..b5a557b941 100644
--- a/src/components/AvatarImageGenerator.tsx
+++ b/src/components/AvatarImageGenerator.tsx
@@ -1,256 +1,50 @@
-import { useEffect, useState } from "react";
-import { Check, Loader2, Sparkles } from "lucide-react";
+import { useState } from "react";
+import { Loader2, Sparkles } from "lucide-react";
-import { api, useStore, type ConfigStatus } from "@/state/store";
-import { normalizeImageGenerationUrl, type AvatarImageProvider } from "../../shared/image-generation";
-import { Select } from "./Select";
+import { useStore } from "@/state/store";
import { t } from "@/lib/i18n";
-import { productName } from "@/lib/brand";
-
-const PROVIDERS = {
- openai: { label: "OpenAI", keyLabel: "OpenAI image API key", credential: "openaiImageApiKey" },
- xai: { label: "Grok (xAI)", keyLabel: "Grok API key", credential: "xaiApiKey" },
- custom: { label: "Custom", keyLabel: "Custom image API key", credential: "customImageApiKey" },
-} as const;
const INPUT_CLASS = "w-full min-w-0 rounded-lg border border-hairline/40 bg-inset px-3 py-2 text-[13px] text-ink placeholder:text-ink-secondary focus:outline-none disabled:opacity-50";
-const BUTTON_CLASS = "flex items-center justify-center gap-1.5 rounded-lg bg-control px-3 py-2 text-[13px] text-ink hover:bg-raised-hover disabled:opacity-50";
+const PROVIDER_LABEL = { openai: "OpenAI", xai: "Grok (xAI)", gemini: "Gemini", openrouter: "OpenRouter", custom: "Custom" } as const;
export function AvatarImageGenerator({
botLabel,
disabled,
generating,
onGenerate,
- onSavingChange,
}: {
botLabel: string;
disabled: boolean;
generating: boolean;
onGenerate: (direction: string) => Promise<void>;
- onSavingChange: (saving: boolean) => void;
}) {
const { state, dispatch } = useStore();
const imageGen = state.config?.imageGen;
- const savedProvider = imageGen?.provider ?? "openai";
- const [providerDraft, setProviderDraft] = useState<AvatarImageProvider | null>(null);
- const [urlDraft, setUrlDraft] = useState<string | null>(null);
- const [modelDraft, setModelDraft] = useState<string | null>(null);
- const [imageKey, setImageKey] = useState("");
const [direction, setDirection] = useState("");
- const [saving, setSaving] = useState(false);
- const [error, setError] = useState<string | null>(null);
- const provider = providerDraft ?? savedProvider;
- const customUrl = urlDraft ?? imageGen?.customUrl ?? "";
- const customModel = modelDraft ?? imageGen?.customModel ?? "";
- const providerInfo = PROVIDERS[provider];
- const busy = disabled || generating || saving;
- const keyConfigured = provider === "custom"
- ? imageGen?.customKeyConfigured === true
- : provider === "xai"
- ? (imageGen?.xaiConfigured ?? state.config?.xai?.configured) === true
- : (imageGen?.openaiConfigured ?? (savedProvider === "openai" && imageGen?.configured)) === true;
- const settingsDirty = provider !== savedProvider || (provider === "custom" && (
- customUrl.trim() !== (imageGen?.customUrl ?? "") ||
- customModel.trim() !== (imageGen?.customModel ?? "")
- ));
- const unsaved = settingsDirty || !!imageKey.trim();
- const configured = provider === savedProvider && imageGen?.configured === true;
-
- useEffect(() => {
- setImageKey("");
- }, [provider]);
-
- const setPending = (pending: boolean) => {
- setSaving(pending);
- onSavingChange(pending);
- };
-
- const saveConfig = async (patch: object) => {
- const status: ConfigStatus = await api("/api/config", {
- method: "PUT",
- body: JSON.stringify(patch),
- });
- dispatch({ type: "configStatus", config: status });
- };
-
- const saveCredential = async (key: string) => {
- const status: ConfigStatus = window.ogb?.setCredential
- ? await window.ogb.setCredential(providerInfo.credential, key)
- : await api("/api/config", {
- method: "PUT",
- body: JSON.stringify(provider === "xai"
- ? { xai: { key } }
- : { imageGen: provider === "custom" ? { customApiKey: key } : { key } }),
- });
- dispatch({ type: "configStatus", config: status });
- setImageKey("");
- };
-
- const chooseProvider = async (next: AvatarImageProvider) => {
- if (busy) return;
- setProviderDraft(next);
- setImageKey("");
- setUrlDraft(null);
- setModelDraft(null);
- setError(null);
- if (next === "custom") return;
- setPending(true);
- try {
- await saveConfig({ imageGen: { provider: next } });
- } catch (saveError) {
- setError(saveError instanceof Error ? saveError.message : String(saveError));
- } finally {
- setProviderDraft(null);
- setPending(false);
- }
- };
-
- const saveConnection = async () => {
- if (busy || (provider === "custom" && (!customUrl.trim() || !customModel.trim()))) return;
- if (provider !== "custom" && !imageKey.trim()) return;
- setPending(true);
- setError(null);
- try {
- // Validate the whole connection before replacing its stored credential.
- const url = provider === "custom" ? normalizeImageGenerationUrl(customUrl.trim()) : "";
- const model = customModel.trim();
- if (provider === "custom" && (model.length > 200 || ["\r", "\n", "\0"].some((character) => model.includes(character)))) {
- throw new Error("Use a model ID of at most 200 characters without control characters");
- }
- if (imageKey.trim()) await saveCredential(imageKey.trim());
- if (provider === "custom") {
- await saveConfig({ imageGen: {
- provider,
- customUrl: url,
- customModel: model,
- } });
- setProviderDraft(null);
- setUrlDraft(null);
- setModelDraft(null);
- }
- } catch (saveError) {
- setError(saveError instanceof Error ? saveError.message : String(saveError));
- } finally {
- setPending(false);
- }
- };
-
- const removeKey = async () => {
- if (busy) return;
- setPending(true);
- setError(null);
- try {
- await saveCredential("");
- } catch (saveError) {
- setError(saveError instanceof Error ? saveError.message : String(saveError));
- } finally {
- setPending(false);
- }
- };
-
- const connectionForm = (
- <div className="space-y-2.5">
- {provider === "custom" && (
- <>
- <label className="block text-[12px] text-ink-secondary">
- {t("botIdentity.ai.baseUrl")}
- <input
- type="url"
- value={customUrl}
- disabled={busy}
- onChange={(event) => setUrlDraft(event.target.value)}
- placeholder="http://127.0.0.1:4000/v1"
- autoComplete="off"
- className={`${INPUT_CLASS} mt-1`}
- />
- </label>
- <label className="block text-[12px] text-ink-secondary">
- {t("botIdentity.ai.imageModel")}
- <input
- value={customModel}
- disabled={busy}
- onChange={(event) => setModelDraft(event.target.value)}
- placeholder="Model ID from your image provider"
- autoComplete="off"
- className={`${INPUT_CLASS} mt-1`}
- />
- </label>
- <p className="text-[11px] leading-relaxed text-ink-secondary">
- OpenAI-compatible Images API. localhost refers to the {productName()} server, including when you open this page remotely.
- </p>
- </>
- )}
- <label className="block text-[12px] text-ink-secondary">
- {t(provider === "openai" ? "botIdentity.ai.openaiKey" : provider === "xai" ? "botIdentity.ai.xaiKey" : "botIdentity.ai.customKey")}{provider === "custom" ? ` (${t("botIdentity.ai.optional")})` : ""}
- <input
- type="password"
- value={imageKey}
- disabled={busy}
- onChange={(event) => setImageKey(event.target.value)}
- onKeyDown={(event) => {
- if (event.key === "Enter") {
- event.preventDefault();
- void saveConnection();
- }
- }}
- placeholder={keyConfigured ? t("botIdentity.ai.savedKey") : provider === "custom" ? t("botIdentity.ai.keyless") : t("botIdentity.ai.pasteKey")}
- autoComplete="off"
- className={`${INPUT_CLASS} mt-1`}
- />
- </label>
- {provider === "xai" && (
- <p className="text-[11px] leading-relaxed text-ink-secondary">Shares the Grok API key in Settings. Changing or removing it also affects other Grok features.</p>
- )}
- {provider === "custom" && keyConfigured && (
- <p className="text-[11px] leading-relaxed text-ink-secondary">The saved custom key will be used. Remove it for a keyless connection.</p>
- )}
- <div className="flex items-center justify-end gap-2">
- {keyConfigured && (
- <button type="button" onClick={() => void removeKey()} disabled={busy} className="mr-auto rounded-md py-1.5 text-[12px] text-ink-secondary hover:text-danger disabled:opacity-50">
- {t("botIdentity.ai.removeKey")}
- </button>
- )}
- <button
- type="button"
- onClick={() => void saveConnection()}
- disabled={busy || (provider === "custom" ? !customUrl.trim() || !customModel.trim() || (!unsaved && configured) : !imageKey.trim())}
- className={BUTTON_CLASS}
- >
- {saving ? <Loader2 size={13} className="animate-spin" /> : <Check size={13} />}
- {provider === "custom" ? t("botIdentity.ai.saveConnection") : t("botIdentity.ai.saveKey")}
- </button>
- </div>
- </div>
- );
+ const busy = disabled || generating;
+ const ready = imageGen?.ready ?? imageGen?.configured === true;
+ const primary = imageGen?.primary ?? (imageGen?.provider ? { provider: imageGen.provider, configured: imageGen.configured } : null);
+ const inUse = primary?.configured ? primary.provider : imageGen?.fallback?.configured ? imageGen.fallback.provider : null;
return (
<div className="mt-5 border-t border-hairline/40 pt-4">
<div className="flex items-center gap-2 text-[13px] font-medium text-ink">
<Sparkles size={14} className="text-accent" /> {t("botIdentity.ai.generateWith")}
</div>
- <label className="mt-3 block text-[12px] text-ink-secondary">
- {t("botIdentity.ai.provider")}
- <Select value={provider} onChange={(event) => void chooseProvider(event.target.value as AvatarImageProvider)} disabled={busy || !state.config} className="mt-1 w-full">
- {Object.entries(PROVIDERS).map(([value, info]) => <option key={value} value={value}>{info.label}</option>)}
- </Select>
- </label>
<p className="mt-1.5 text-[11px] leading-relaxed text-ink-secondary">
- {provider === "openai" ? t("botIdentity.ai.openaiHint")
- : provider === "xai" ? t("botIdentity.ai.xaiHint")
- : t("botIdentity.ai.customHint")}
- {" "}{t("botIdentity.ai.shared")}
+ {ready && inUse ? t("botIdentity.ai.usingProvider", { provider: PROVIDER_LABEL[inUse] }) : t("botIdentity.ai.noProvider")}{" "}
+ <button
+ type="button"
+ onClick={() => dispatch({ type: "toggleAppSettings", open: true, section: "imageGeneration" })}
+ className="cursor-pointer text-accent hover:underline"
+ >
+ {t("botIdentity.ai.openImageSettings")}
+ </button>
</p>
- {configured ? (
- <details key={provider} className="mt-3 rounded-lg border border-hairline/40 px-3 py-2">
- <summary className="cursor-pointer text-[12px] text-ink-secondary">{t("botIdentity.ai.connectionSettings")}</summary>
- <div className="mt-3">{connectionForm}</div>
- </details>
- ) : <div className="mt-3">{connectionForm}</div>}
-
<textarea
value={direction}
- disabled={busy}
+ disabled={busy || !ready}
onChange={(event) => setDirection(event.target.value.slice(0, 400))}
maxLength={400}
placeholder={t("botIdentity.ai.directionPlaceholder", { name: botLabel })}
@@ -262,20 +56,15 @@ export function AvatarImageGenerator({
<button
type="button"
onClick={() => {
- if (!busy && configured && !unsaved) {
- setError(null);
- void onGenerate(direction.trim());
- }
+ if (!busy && ready) void onGenerate(direction.trim());
}}
- disabled={busy || !configured || unsaved}
+ disabled={busy || !ready}
className="flex items-center gap-1.5 rounded-lg bg-accent px-3 py-1.5 text-[13px] font-medium text-white hover:brightness-110 disabled:opacity-50"
>
{generating ? <Loader2 size={13} className="animate-spin" /> : <Sparkles size={13} />}
{generating ? t("botIdentity.ai.generating") : t("botIdentity.ai.generate")}
</button>
</div>
- {unsaved && <p role="status" className="mt-2 text-[11px] text-ink-secondary">{t("botIdentity.ai.saveBeforeGenerate")}</p>}
- {error && <div role="alert" className="mt-3 text-[12px] text-danger">{error}</div>}
</div>
);
}
diff --git a/src/components/BotProfileAvatarCard.tsx b/src/components/BotProfileAvatarCard.tsx
index 8d418f423b..a1351bd99b 100644
--- a/src/components/BotProfileAvatarCard.tsx
+++ b/src/components/BotProfileAvatarCard.tsx
@@ -31,7 +31,7 @@ export function BotProfileAvatarCard({
mascotMotion: { kind: Exclude<MausMotion, "none">; nonce: number } | null;
onPatch: (patch: AvatarPatch) => void;
}) {
- const { fileRef, crop, uploading, generating, setSavingConnection, busy, error, upload, removeImage, generate } = useAvatarImage(bot, onPatch);
+ const { fileRef, crop, uploading, generating, busy, error, upload, removeImage, generate } = useAvatarImage(bot, onPatch);
return (
<div className="overflow-hidden rounded-xl border border-hairline/40 bg-card">
@@ -188,7 +188,6 @@ export function BotProfileAvatarCard({
disabled={uploading}
generating={generating}
onGenerate={generate}
- onSavingChange={setSavingConnection}
/>
{error && <div role="alert" className="mt-3 text-[12px] text-danger">{error}</div>}
diff --git a/src/components/ImageGenerationSettings.test.ts b/src/components/ImageGenerationSettings.test.ts
new file mode 100644
index 0000000000..943fd5bdc6
Binary files /dev/null and b/src/components/ImageGenerationSettings.test.ts differ
diff --git a/src/components/ImageGenerationSettings.tsx b/src/components/ImageGenerationSettings.tsx
new file mode 100644
index 0000000000..d0b1035c3a
--- /dev/null
+++ b/src/components/ImageGenerationSettings.tsx
@@ -0,0 +1,380 @@
+import { useEffect, useState } from "react";
+import { Check, Loader2 } from "lucide-react";
+
+import { api, useStore, type ConfigStatus } from "@/state/store";
+import { cn } from "@/lib/cn";
+import { t } from "@/lib/i18n";
+import type { LocaleKey } from "@/locales";
+import { IMAGE_DEFAULT_MODELS, IMAGE_MAX_PER_TURN_DEFAULT, IMAGE_MODEL_CHOICES, IMAGE_PROVIDERS, normalizeImageGenerationUrl, type ImageProvider, type ImageProviderTest } from "../../shared/image-generation";
+import { saveCredential } from "./keys/key-save";
+import { Card, SettingRow } from "./SettingsPrimitives";
+import { Select } from "./Select";
+import { productName } from "@/lib/brand";
+
+const PROVIDER_LABEL: Record<ImageProvider, string> = {
+ openai: "OpenAI", xai: "Grok (xAI)", gemini: "Gemini", openrouter: "OpenRouter", custom: "Custom",
+};
+const OWN_KEYS = {
+ openai: { credential: "openaiImageApiKey", patch: (key: string) => ({ imageGen: { key } }), label: "imageGen.key.openai" },
+ gemini: { credential: "geminiImageApiKey", patch: (key: string) => ({ imageGen: { geminiKey: key } }), label: "imageGen.key.gemini" },
+ custom: { credential: "customImageApiKey", patch: (key: string) => ({ imageGen: { customApiKey: key } }), label: "imageGen.key.custom" },
+} as const satisfies Partial<Record<ImageProvider, { credential: string; patch: (key: string) => object; label: LocaleKey }>>;
+const SHARED_KEYS = {
+ xai: { label: "imageGen.key.xai", note: "imageGen.key.sharedXai" },
+ openrouter: { label: "imageGen.key.openrouter", note: "imageGen.key.sharedOpenrouter" },
+} as const satisfies Partial<Record<ImageProvider, { label: LocaleKey; note: LocaleKey }>>;
+const KEY_URL: Partial<Record<ImageProvider, string>> = {
+ openai: "https://platform.openai.com/api-keys", gemini: "https://aistudio.google.com/apikey",
+ xai: "https://console.x.ai", openrouter: "https://openrouter.ai/keys",
+};
+const INPUT_CLASS = "w-full min-w-0 rounded-lg border border-hairline/40 bg-inset px-3 py-2 text-[13px] text-ink placeholder:text-ink-secondary focus:outline-none disabled:opacity-50";
+const BUTTON_CLASS = "flex shrink-0 cursor-pointer items-center justify-center gap-1.5 rounded-lg bg-control px-3 py-2 text-[13px] text-ink hover:bg-raised-hover disabled:cursor-not-allowed disabled:opacity-50";
+
+type Slot = "primary" | "fallback";
+type ModelChoice = { id: string; name: string; group: "recommended" | "more" };
+type OpenRouterImageModels = { source: "openrouter" | "builtin"; models: ModelChoice[] };
+const OTHER_MODEL = "\u0000other";
+
+/** A fixed sentence per verdict: the vendor's own body never reaches the page. */
+function imageTestText(provider: ImageProvider, result: ImageProviderTest): { ok: boolean; text: string } {
+ if (result.ok) {
+ if (result.freeTier) return { ok: false, text: t("imageGen.test.noCredit") };
+ return { ok: true, text: t(provider === "openrouter" ? "imageGen.test.okOpenrouter" : "imageGen.test.ok") };
+ }
+ if (result.reason === "model_missing") return { ok: false, text: t("imageGen.test.modelMissing", { model: result.model }) };
+ if (result.reason === "rejected") return { ok: false, text: t("imageGen.test.rejected") };
+ if (result.reason === "unreachable") return { ok: false, text: t("imageGen.test.unreachable") };
+ if (result.reason === "no_key") return { ok: false, text: t("imageGen.key.missing") };
+ return { ok: false, text: t("imageGen.test.unexpected") };
+}
+type ImageGenStatus = NonNullable<ConfigStatus["imageGen"]>;
+
+function keyConfigured(status: ImageGenStatus | undefined, provider: ImageProvider): boolean {
+ if (provider === "openai") return status?.openaiConfigured === true;
+ if (provider === "xai") return status?.xaiConfigured === true;
+ if (provider === "gemini") return status?.geminiConfigured === true;
+ if (provider === "openrouter") return status?.openrouterConfigured === true;
+ return status?.customKeyConfigured === true;
+}
+
+export function ImageGenerationSettings() {
+ const { state, dispatch } = useStore();
+ const status = state.config?.imageGen;
+ const primary = status?.primary ?? { provider: status?.provider ?? "openai", model: status?.model ?? IMAGE_DEFAULT_MODELS.openai, configured: status?.configured === true };
+ const fallback = status?.fallback ?? null;
+ const [saving, setSaving] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+ const [openrouterModels, setOpenrouterModels] = useState<OpenRouterImageModels | null>(null);
+ const usesOpenrouter = primary.provider === "openrouter" || fallback?.provider === "openrouter";
+
+ useEffect(() => {
+ if (!usesOpenrouter || openrouterModels) return;
+ let cancelled = false;
+ api<OpenRouterImageModels>("/api/images/openrouter-models").then(
+ (list) => { if (!cancelled) setOpenrouterModels(Array.isArray(list?.models) ? list : { source: "builtin", models: [] }); },
+ () => { if (!cancelled) setOpenrouterModels({ source: "builtin", models: [] }); },
+ );
+ return () => { cancelled = true; };
+ }, [usesOpenrouter, openrouterModels]);
+
+ const save = async (patch: object) => {
+ setSaving(true);
+ setError(null);
+ try {
+ const next: ConfigStatus = await api("/api/config", { method: "PUT", body: JSON.stringify(patch) });
+ dispatch({ type: "configStatus", config: next });
+ } catch (cause) {
+ setError(cause instanceof Error ? cause.message : String(cause));
+ } finally {
+ setSaving(false);
+ }
+ };
+
+ const chooseProvider = (slot: Slot, value: string) => {
+ if (slot === "fallback" && value === "") return void save({ imageGen: { fallback: null } });
+ const provider = value as ImageProvider;
+ const hidesBackup = slot === "primary" && fallback?.provider === provider;
+ return void save({ imageGen: { [slot]: { provider }, ...(hidesBackup ? { fallback: null } : {}) } });
+ };
+
+ const providers = [primary.provider, ...(fallback ? [fallback.provider] : [])].filter((provider, index, all) => all.indexOf(provider) === index);
+
+ return (
+ <>
+ <section className="space-y-2 px-4">
+ <p className="text-[13px] leading-relaxed text-ink-secondary">{t("imageGen.intro")}</p>
+ <p role="status" data-testid="image-gen-status" className="flex items-center gap-2 text-[13px] font-medium text-ink">
+ <span className={cn("size-1.5 shrink-0 rounded-full", !status?.ready ? "bg-raised-hover" : primary.configured ? "bg-success" : "bg-warning")} />
+ {status?.ready
+ ? primary.configured
+ ? t("imageGen.status.ready", { provider: PROVIDER_LABEL[primary.provider] })
+ : t("imageGen.status.backupOnly", { provider: PROVIDER_LABEL[fallback!.provider] })
+ : t("imageGen.status.notReady")}
+ </p>
+ </section>
+
+ <SlotRow
+ slot="primary" provider={primary.provider} model={primary.model} configured={primary.configured} openrouterModels={openrouterModels}
+ disabled={saving || !state.config} onProvider={chooseProvider} onModel={(model) => void save({ imageGen: { primary: { provider: primary.provider, model } } })}
+ />
+ <SlotRow
+ slot="fallback" provider={fallback?.provider ?? null} model={fallback?.model ?? ""} configured={fallback?.configured === true} exclude={primary.provider} openrouterModels={openrouterModels}
+ disabled={saving || !state.config} onProvider={chooseProvider} onModel={(model) => fallback && void save({ imageGen: { fallback: { provider: fallback.provider, model } } })}
+ />
+ <SettingRow title={t("imageGen.maxPerTurn.label")} subtitle={t("imageGen.maxPerTurn.help")}>
+ <Select
+ className="w-20"
+ data-testid="image-gen-max"
+ value={String(status?.maxPerTurn ?? IMAGE_MAX_PER_TURN_DEFAULT)}
+ onChange={(event) => void save({ imageGen: { maxPerTurn: Number(event.target.value) } })}
+ disabled={saving || !state.config}
+ aria-label={t("imageGen.maxPerTurn.label")}
+ >
+ {Array.from({ length: 10 }, (_, index) => index + 1).map((count) => <option key={count} value={count}>{count}</option>)}
+ </Select>
+ </SettingRow>
+ {error && <p role="alert" className="px-4 text-[12px] text-danger">{error}</p>}
+
+ {providers.map((provider) => <ProviderKeyCard key={provider} provider={provider} status={status} />)}
+ </>
+ );
+}
+
+function SlotRow({ slot, provider, model, configured, exclude, openrouterModels, disabled, onProvider, onModel }: {
+ slot: Slot;
+ provider: ImageProvider | null;
+ model: string;
+ configured: boolean;
+ exclude?: ImageProvider;
+ openrouterModels: OpenRouterImageModels | null;
+ disabled: boolean;
+ onProvider: (slot: Slot, value: string) => void;
+ onModel: (model: string) => void;
+}) {
+ const label = t(slot === "primary" ? "imageGen.primary.label" : "imageGen.fallback.label");
+ return (
+ <>
+ <SettingRow
+ title={label}
+ subtitle={provider && !configured ? t(provider === "custom" ? "imageGen.slot.needsConnection" : "imageGen.slot.needsKey") : t(slot === "primary" ? "imageGen.primary.help" : "imageGen.fallback.help")}
+ >
+ <Select
+ className="w-48"
+ data-testid={`image-gen-${slot}`}
+ value={provider ?? ""}
+ onChange={(event) => onProvider(slot, event.target.value)}
+ disabled={disabled}
+ aria-label={label}
+ >
+ {slot === "fallback" && <option value="">{t("imageGen.fallback.none")}</option>}
+ {IMAGE_PROVIDERS.filter((option) => option !== exclude).map((option) => <option key={option} value={option}>{PROVIDER_LABEL[option]}</option>)}
+ </Select>
+ </SettingRow>
+ {provider && <ModelRow slot={slot} slotLabel={label} provider={provider} model={model} openrouterModels={openrouterModels} disabled={disabled} onModel={onModel} />}
+ </>
+ );
+}
+
+function ModelRow({ slot, slotLabel, provider, model, openrouterModels, disabled, onModel }: {
+ slot: Slot;
+ slotLabel: string;
+ provider: ImageProvider;
+ model: string;
+ openrouterModels: OpenRouterImageModels | null;
+ disabled: boolean;
+ onModel: (model: string) => void;
+}) {
+ const [draft, setDraft] = useState<string | null>(null);
+ const live = provider === "openrouter" && openrouterModels?.source === "openrouter" ? openrouterModels.models : null;
+ const choices: ModelChoice[] = live ?? IMAGE_MODEL_CHOICES[provider].map((choice) => ({ ...choice, group: "recommended" }));
+ const typing = draft !== null || choices.length === 0;
+ const commit = () => {
+ if (draft === null) return;
+ setDraft(null);
+ if (draft.trim() && draft.trim() !== model) onModel(draft.trim());
+ };
+ const pick = (value: string) => {
+ if (value === OTHER_MODEL) return setDraft(model);
+ setDraft(null);
+ onModel(value);
+ };
+ return (
+ <SettingRow
+ title={t("decider.model.label")}
+ subtitle={provider === "openrouter" && openrouterModels?.source === "builtin" ? t("decider.model.builtinNote") : undefined}
+ >
+ <div className="flex flex-wrap items-center justify-end gap-2">
+ {choices.length > 0 && (
+ <Select
+ className="w-64 max-w-full"
+ data-testid={`image-gen-${slot}-model`}
+ value={typing ? OTHER_MODEL : model}
+ onChange={(event) => pick(event.target.value)}
+ disabled={disabled}
+ aria-label={t("imageGen.model.label", { slot: slotLabel })}
+ >
+ {model && !choices.some((choice) => choice.id === model) && <option value={model}>{model}</option>}
+ {(["recommended", "more"] as const).map((group) => {
+ const inGroup = choices.filter((choice) => choice.group === group);
+ return inGroup.length > 0 && (
+ <optgroup key={group} label={t(group === "recommended" ? "decider.model.recommended" : "decider.model.more")}>
+ {inGroup.map((choice) => <option key={choice.id} value={choice.id}>{choice.name}</option>)}
+ </optgroup>
+ );
+ })}
+ <option value={OTHER_MODEL}>{t("imageGen.model.other")}</option>
+ </Select>
+ )}
+ {typing && (
+ <input
+ value={draft ?? model}
+ onChange={(event) => setDraft(event.target.value)}
+ onBlur={commit}
+ onKeyDown={(event) => event.key === "Enter" && commit()}
+ disabled={disabled}
+ placeholder={IMAGE_DEFAULT_MODELS[provider] || t("imageGen.model.placeholder")}
+ aria-label={t("imageGen.model.idLabel", { slot: slotLabel })}
+ autoComplete="off"
+ spellCheck={false}
+ className={cn(INPUT_CLASS, "w-64 max-w-full")}
+ />
+ )}
+ </div>
+ </SettingRow>
+ );
+}
+
+function ProviderKeyCard({ provider, status }: { provider: ImageProvider; status: ImageGenStatus | undefined }) {
+ const { dispatch } = useStore();
+ const [value, setValue] = useState("");
+ const [url, setUrl] = useState<string | null>(null);
+ const [saving, setSaving] = useState(false);
+ const [error, setError] = useState<string | null>(null);
+ const [testing, setTesting] = useState(false);
+ const [verdict, setVerdict] = useState<{ ok: boolean; text: string } | null>(null);
+ const configured = keyConfigured(status, provider);
+ const own = provider === "openai" || provider === "gemini" || provider === "custom" ? OWN_KEYS[provider] : null;
+ const shared = provider === "xai" || provider === "openrouter" ? SHARED_KEYS[provider] : null;
+ const customUrl = url ?? status?.customUrl ?? "";
+
+ const run = async (work: () => Promise<ConfigStatus>) => {
+ setSaving(true);
+ setError(null);
+ setVerdict(null);
+ try {
+ dispatch({ type: "configStatus", config: await work() });
+ setValue("");
+ setUrl(null);
+ } catch (cause) {
+ setError(cause instanceof Error ? cause.message : String(cause));
+ } finally {
+ setSaving(false);
+ }
+ };
+ const saveKey = (key: string) => run(async () => {
+ if (provider === "xai" || provider === "openrouter") return saveCredential(provider, key, false);
+ return window.ogb?.setCredential && own
+ ? window.ogb.setCredential(own.credential, key)
+ : api("/api/config", { method: "PUT", body: JSON.stringify(own!.patch(key)) });
+ });
+ const saveUrl = () => run(async () => {
+ const normalized = customUrl.trim() ? normalizeImageGenerationUrl(customUrl.trim()) : "";
+ return api("/api/config", { method: "PUT", body: JSON.stringify({ imageGen: { customUrl: normalized } }) });
+ });
+
+ const test = async () => {
+ setTesting(true);
+ setVerdict(null);
+ try {
+ setVerdict(imageTestText(provider, await api<ImageProviderTest>("/api/images/test", { method: "POST", body: JSON.stringify({ provider }) })));
+ } catch (cause) {
+ setVerdict({ ok: false, text: cause instanceof Error ? cause.message : String(cause) });
+ } finally {
+ setTesting(false);
+ }
+ };
+
+ return (
+ <Card title={PROVIDER_LABEL[provider]}>
+ <KeyState configured={configured} optional={provider === "custom"} />
+ {shared && (
+ <p className="mb-2 text-[12px] leading-relaxed text-ink-secondary">
+ {t(shared.note)}{" "}
+ <button
+ type="button"
+ onClick={() => dispatch({ type: "toggleAppSettings", open: true, section: "connections" })}
+ className="cursor-pointer text-accent hover:underline"
+ >
+ {t("imageGen.key.manage")}
+ </button>
+ </p>
+ )}
+ {provider === "custom" && (
+ <div className="mb-2 flex gap-2">
+ <input
+ type="url"
+ value={customUrl}
+ onChange={(event) => setUrl(event.target.value)}
+ onKeyDown={(event) => event.key === "Enter" && void saveUrl()}
+ disabled={saving}
+ placeholder="http://127.0.0.1:4000/v1"
+ aria-label={t("imageGen.custom.url")}
+ autoComplete="off"
+ className={INPUT_CLASS}
+ />
+ <button type="button" onClick={() => void saveUrl()} disabled={saving || url === null} className={BUTTON_CLASS}>
+ {saving ? <Loader2 size={13} className="animate-spin" /> : <Check size={13} />}{t("common.save")}
+ </button>
+ </div>
+ )}
+ <div className="flex gap-2">
+ <input
+ type="password"
+ value={value}
+ onChange={(event) => setValue(event.target.value)}
+ onKeyDown={(event) => event.key === "Enter" && value.trim() && void saveKey(value.trim())}
+ disabled={saving}
+ placeholder={configured ? t("keys.replace") : t("imageGen.key.paste")}
+ aria-label={t((own ?? shared!).label)}
+ autoComplete="off"
+ spellCheck={false}
+ className={INPUT_CLASS}
+ />
+ <button type="button" onClick={() => void saveKey(value.trim())} disabled={saving || !value.trim()} className={BUTTON_CLASS}>
+ {saving ? <Loader2 size={13} className="animate-spin" /> : <Check size={13} />}{t("common.save")}
+ </button>
+ {configured && (
+ <button
+ type="button"
+ onClick={() => void test()}
+ disabled={testing || saving}
+ className="flex shrink-0 cursor-pointer items-center justify-center rounded-lg border border-hairline/40 px-3 py-2 text-[13px] text-ink-secondary hover:bg-raised/50 hover:text-ink disabled:cursor-not-allowed disabled:opacity-50"
+ >
+ {testing ? t("keys.testing") : t("keys.test")}
+ </button>
+ )}
+ </div>
+ {verdict && <p role="status" className={cn("mt-1 text-[12px]", verdict.ok ? "text-success" : "text-danger")}>{verdict.text}</p>}
+ <div className="mt-2 flex items-center justify-between gap-2 text-[12px] text-ink-secondary">
+ {KEY_URL[provider] ? <a href={KEY_URL[provider]} target="_blank" rel="noreferrer" className="text-accent hover:underline">{t("imageGen.key.get")}</a> : <span>{t("imageGen.custom.help", { app: productName() })}</span>}
+ {configured && (
+ <button type="button" onClick={() => void saveKey("")} disabled={saving} className="cursor-pointer hover:text-danger disabled:opacity-50">
+ {t("keys.removeKey")}
+ </button>
+ )}
+ </div>
+ {error && <p role="alert" className="mt-1 text-[12px] text-danger">{error}</p>}
+ </Card>
+ );
+}
+
+function KeyState({ configured, optional = false }: { configured: boolean; optional?: boolean }) {
+ return (
+ <div role="status" className="mb-2 flex items-center gap-2 text-[13px] text-ink-secondary">
+ <span className={cn("size-1.5 rounded-full", configured ? "bg-success" : "bg-raised-hover")} />
+ <span className={configured ? "text-success" : undefined}>
+ {t(configured ? "imageGen.key.saved" : optional ? "imageGen.key.optional" : "imageGen.key.missing")}
+ </span>
+ </div>
+ );
+}
diff --git a/src/components/MausBotCustomize.tsx b/src/components/MausBotCustomize.tsx
index 251e26c3dd..bb27d3a45d 100644
--- a/src/components/MausBotCustomize.tsx
+++ b/src/components/MausBotCustomize.tsx
@@ -102,7 +102,7 @@ export function MausBotCustomize({ preview, name, nameRef, image, onName, onPatc
{image.error && <p role="alert" data-mausbot-welcome-error="" className="mt-1 px-2 text-[13px] text-danger">{image.error}</p>}
{generating && (
<div className="mt-2">
- <AvatarImageGenerator botLabel={name || "MausBot"} disabled={image.uploading} generating={image.generating} onGenerate={image.generate} onSavingChange={image.setSavingConnection} />
+ <AvatarImageGenerator botLabel={name || "MausBot"} disabled={image.uploading} generating={image.generating} onGenerate={image.generate} />
</div>
)}
</div>
diff --git a/src/components/SettingsModal.groups.test.ts b/src/components/SettingsModal.groups.test.ts
index d7f0fa3409..1c98b417bd 100644
--- a/src/components/SettingsModal.groups.test.ts
+++ b/src/components/SettingsModal.groups.test.ts
@@ -102,7 +102,7 @@ describe("Settings rail groups", () => {
expect(SETTINGS_GROUPS.map((group) => group.id)).toEqual(["you", "ai", "computers", "account"]);
const ids = SECTIONS.map((entry) => entry.id);
expect(new Set(ids).size).toBe(ids.length);
- expect(ids).toHaveLength(20); // 16 + the shared Skills library (AI group) + Logins (Devices) + Import and a team's Bot access (Account)
+ expect(ids).toHaveLength(21); // 16 + the shared Skills library (AI group) + Image generation (AI) + Logins (Devices) + Import and a team's Bot access (Account)
for (const entry of SECTIONS) expect(SETTINGS_GROUPS.map((group) => group.id)).toContain(entry.group);
});
@@ -113,7 +113,7 @@ describe("Settings rail groups", () => {
expect(html).toContain("glass-surface");
expect(rail(html)).toEqual({
you: ["general", "appearance", "companion"],
- ai: ["engines", "connections", "decisionModel"],
+ ai: ["engines", "connections", "decisionModel", "imageGeneration"],
computers: ["desktopWorkspaces", "computer", "logins"],
account: ["cloudAccount", "organization", "usage", "backups", "import", "experimental"],
});
diff --git a/src/components/SettingsModal.simple.test.ts b/src/components/SettingsModal.simple.test.ts
index e98e04a998..c302130132 100644
--- a/src/components/SettingsModal.simple.test.ts
+++ b/src/components/SettingsModal.simple.test.ts
@@ -159,7 +159,7 @@ describe("Settings in Simple mode", () => {
const placed = SIMPLE_PAGES.flatMap((page) => page.sections);
expect(new Set(placed).size).toBe(placed.length);
const hidden = SECTIONS.map((entry) => entry.id).filter((id) => !placed.includes(id));
- expect(hidden).toEqual(["decisionModel", "skills", "backups", "workspaces", "experimental"]);
+ expect(hidden).toEqual(["decisionModel", "imageGeneration", "skills", "backups", "workspaces", "experimental"]);
for (const id of hidden) expect(SIMPLE_HIDDEN_SECTIONS).toContain(id);
});
diff --git a/src/components/SettingsModal.tsx b/src/components/SettingsModal.tsx
index c847cfae7e..0882d0c02b 100644
--- a/src/components/SettingsModal.tsx
+++ b/src/components/SettingsModal.tsx
@@ -1,5 +1,5 @@
import { useEffect, useRef, useState } from "react";
-import { Archive, ChartNoAxesColumn, Cloud, CloudDownload, Coins, Download, FlaskConical, KeyRound, LockKeyhole, Monitor, Palette, ScrollText, Search, Settings, Sparkles, TabletSmartphone, Terminal, User, Users, X, Building2, Zap, BookOpen } from "lucide-react";
+import { Archive, ChartNoAxesColumn, Cloud, CloudDownload, Coins, Download, FlaskConical, KeyRound, LockKeyhole, Monitor, Palette, ScrollText, Search, Settings, Sparkles, TabletSmartphone, Terminal, User, Users, X, Building2, Zap, BookOpen, ImagePlus } from "lucide-react";
import { useStore, type AppSettingsSection } from "@/state/store";
import { skillsLibraryEnabled } from "@/lib/feature-flags";
import { type LocaleKey } from "@/locales";
@@ -16,6 +16,7 @@ import { TalkShortcutRow, talkShortcutKeywords } from "./TalkShortcutRow";
import { AttachmentStorageSettings } from "./AttachmentStorageSettings";
import { DiagnosticsRow } from "./DiagnosticsRow";
import { DecisionModelSettings } from "./DecisionModelSettings";
+import { ImageGenerationSettings } from "./ImageGenerationSettings";
import { EnginesSettings } from "./EnginesSettings";
import { LocalComputerSection } from "./LocalComputerSection";
import { CompanionSection } from "./CompanionSection";
@@ -92,6 +93,7 @@ export const SECTIONS: Array<{
{ id: "engines", group: "ai", labelKey: "settings.section.engines", icon: Terminal, keywords: ["models", "model providers", "engines", "claude", "codex", "grok", "providers", "cli", "sign in", "subscription"] },
{ id: "connections", group: "ai", labelKey: "settings.section.connections", icon: KeyRound, keywords: ["keys", "api", "api key", "api keys", "connections", "composio", "box", "xai", "mistral", "cerebras", "meta", "muse", "vps", "router", "openrouter", "base url", "openai", "anthropic", "groq", "greenference", "opencode", "deepseek", "provider", "lm studio", "lmstudio", "llm studio", "llmstudio", "bionic"] },
{ id: "decisionModel", group: "ai", labelKey: "settings.section.decisionModel", icon: Zap, keywords: ["decision", "extraction", "jev", "typesafe", "cloudflare", "workers ai", "clef", "clairic", "email", "routing", "auto", "rooms", "who answers"] },
+ { id: "imageGeneration", group: "ai", labelKey: "settings.section.imageGeneration", icon: ImagePlus, keywords: ["image", "images", "picture", "generate", "avatar", "gpt image", "grok imagine", "gemini", "nano banana", "openrouter", "flux", "backup"] },
{ id: "skills", group: "ai", labelKey: "settings.section.skills", icon: BookOpen, keywords: ["skills", "library", "assign", "agent skills", "skill md"] },
{ id: "desktopWorkspaces", group: "computers", labelKey: "settings.section.desktopWorkspaces", icon: Building2, keywords: ["workspace", "cloud", "hosted", "vps", "server", "servers", "connect", "pair", "switch", "local"] },
{ id: "computer", group: "computers", labelKey: "settings.section.computer", icon: Monitor, keywords: ["vm", "virtual", "desktop", "browser", "built-in browser", "profiles", "browser profiles"] },
@@ -127,7 +129,7 @@ export const SIMPLE_PAGES: SimpleSettingsPage[] = [
keywords: ["update", "version", "release", "product updates", "newsletter", "email updates", "welcome", "tour", "diagnostics", "logs", "support"] },
];
-export const SIMPLE_HIDDEN_SECTIONS: readonly AppSettingsSection[] = ["backups", "experimental", "workspaces", "skills", "decisionModel"];
+export const SIMPLE_HIDDEN_SECTIONS: readonly AppSettingsSection[] = ["backups", "experimental", "workspaces", "skills", "decisionModel", "imageGeneration"];
export const SIMPLE_FOLDED: Partial<Record<AppSettingsSection, SimpleDisclosureId>> = {
@@ -402,6 +404,7 @@ export function SettingsModal() {
case "connections":
return <AdminOnly><KeysPage /></AdminOnly>;
case "decisionModel": return <AdminOnly><DecisionModelSettings /></AdminOnly>;
+ case "imageGeneration": return <AdminOnly><ImageGenerationSettings /></AdminOnly>;
case "engines": return <AdminOnly><EnginesSettings /></AdminOnly>;
case "backups": return <AdminOnly><WorkspaceBackupSettings /><CompanyBackupSettings /></AdminOnly>;
case "import": return <AdminOnly><ImportSettings /></AdminOnly>;
diff --git a/src/components/avatar-editing.tsx b/src/components/avatar-editing.tsx
index 006f4c8e37..41789a83a5 100644
--- a/src/components/avatar-editing.tsx
+++ b/src/components/avatar-editing.tsx
@@ -134,13 +134,12 @@ export function useAvatarImage(bot: Bot, onPatch: (patch: AvatarPatch) => void)
const { request: api, uploadAvatar } = useBotEditor();
const fileRef = useRef<HTMLInputElement>(null);
const [uploading, setUploading] = useState(false);
- const [savingConnection, setSavingConnection] = useState(false);
const [generating, setGenerating] = useState(false);
const [error, setError] = useState<string | null>(null);
const crop = bot.avatarCrop ?? "mascot";
const cropRef = useRef(crop);
cropRef.current = crop;
- const busy = uploading || generating || savingConnection;
+ const busy = uploading || generating;
const upload = async (file: File | undefined) => {
if (!file || busy) return;
@@ -205,5 +204,5 @@ export function useAvatarImage(bot: Bot, onPatch: (patch: AvatarPatch) => void)
}
};
- return { fileRef, crop, uploading, generating, setSavingConnection, busy, error, upload, removeImage, generate };
+ return { fileRef, crop, uploading, generating, busy, error, upload, removeImage, generate };
}
diff --git a/src/components/bot-panel/AvatarEditorCard.tsx b/src/components/bot-panel/AvatarEditorCard.tsx
index 5491901d8e..42a87433e6 100644
--- a/src/components/bot-panel/AvatarEditorCard.tsx
+++ b/src/components/bot-panel/AvatarEditorCard.tsx
@@ -56,7 +56,7 @@ export function AvatarEditorCard({ bot, activeState, onPatch, onClose }: {
onClose: () => void;
}) {
const image = useAvatarImage(bot, onPatch);
- const { fileRef, crop, uploading, generating, setSavingConnection, busy, error, upload, removeImage, generate } = image;
+ const { fileRef, crop, uploading, generating, busy, error, upload, removeImage, generate } = image;
const showsImage = crop !== "mascot" && Boolean(bot.avatarUrl);
const [tab, setTab] = useState<AvatarEditorTab>(showsImage ? "upload" : "bot");
const tabsRef = useRef<HTMLDivElement>(null);
@@ -206,7 +206,6 @@ export function AvatarEditorCard({ bot, activeState, onPatch, onClose }: {
disabled={uploading}
generating={generating}
onGenerate={generate}
- onSavingChange={setSavingConnection}
/>
</div>
)}
diff --git a/src/components/keys/key-catalog.test.ts b/src/components/keys/key-catalog.test.ts
index ac188c206a..d4ec7787f4 100644
--- a/src/components/keys/key-catalog.test.ts
+++ b/src/components/keys/key-catalog.test.ts
@@ -107,7 +107,7 @@ describe("searching the keys", () => {
expect(found("voice")).toEqual(expect.arrayContaining(["liveCalls", "liveKey", "elevenlabs", "fishAudio"]));
expect(found("openai")).toEqual(expect.arrayContaining(["openai", "liveCalls", "liveKey", "imageOpenai"]));
expect(found("gmail")).toEqual(["composio"]);
- expect(found("gemini")).toEqual(["openaiCompat"]);
+ expect(found("gemini")).toEqual(["openaiCompat", "imageGemini"]);
expect(found("no such key anywhere")).toEqual([]);
});
});
diff --git a/src/components/keys/key-catalog.ts b/src/components/keys/key-catalog.ts
index 2477c222d8..0b12f1f3dc 100644
--- a/src/components/keys/key-catalog.ts
+++ b/src/components/keys/key-catalog.ts
@@ -41,7 +41,7 @@ export interface KeyTarget {
export type KeyId =
| "openai" | "anthropic" | "xai" | "openrouter" | "mistral" | "cerebras" | "groq" | "greenference" | "meta" | "deepseek" | "opencodeGo" | "opencodeProviders"
| "lmStudio" | "openaiCompat" | "liveCalls" | "liveKey" | "elevenlabs" | "fishAudio" | "box" | "vps" | "onePassword" | "composio" | "treg" | "postiz"
- | "jev" | "openrouterHelper" | "workersAi" | "imageOpenai" | "imageCustom";
+ | "jev" | "openrouterHelper" | "workersAi" | "imageOpenai" | "imageGemini" | "imageCustom";
export type KeyMark = { driverKind: string; preset?: ProviderIconPreset } | { icon: LucideIcon };
@@ -182,8 +182,13 @@ export const KEY_CATALOG: readonly KeyEntry[] = [
target: { patch: (value) => ({ imageGen: { key: value } }), slot: "openaiImageApiKey",
saved: (config) => flag(config.savedKeys?.openaiImageApiKey ?? { configured: config.imageGen?.openaiConfigured === true }),
placeholder: "sk-…", href: "https://platform.openai.com/api-keys", analytics: "openai_image", shape: OPENAI_SHAPE } },
+ { id: "imageGemini", section: "helpers", labelKey: "keys.label.imageGemini", purposeKey: "keys.purpose.imageGemini", name: "Gemini", env: ["OMB_GEMINI_IMAGE_KEY"],
+ words: ["gemini", "google", "nano banana", "image", "images", "pictures"], mark: { icon: Image }, kind: "elsewhere",
+ opens: "imageGeneration", whereKey: "keys.where.imageGeneration",
+ status: (config) => flag(config.savedKeys?.geminiImageApiKey ?? { configured: config.imageGen?.geminiConfigured === true }) },
{ id: "imageCustom", section: "helpers", labelKey: "keys.label.imageCustom", purposeKey: "keys.purpose.imageCustom", name: "Custom", env: ["OMB_CUSTOM_IMAGE_KEY"],
- words: ["image", "images", "pictures", "avatar", "custom"], mark: { icon: Fingerprint }, kind: "elsewhere", whereKey: "keys.where.pictures",
+ words: ["image", "images", "pictures", "avatar", "custom"], mark: { icon: Fingerprint }, kind: "elsewhere",
+ opens: "imageGeneration", whereKey: "keys.where.imageGeneration",
status: (config) => flag(config.savedKeys?.customImageApiKey ?? { configured: config.imageGen?.customKeyConfigured === true }) },
];
diff --git a/src/locales/de.json b/src/locales/de.json
index 69ff67dbcc..bcc0d0ceee 100644
--- a/src/locales/de.json
+++ b/src/locales/de.json
@@ -2829,5 +2829,39 @@
"server.browser.stoppedWaiting": "Warten auf den Browser beendet.",
"composer.queued.capacityStarter": "In der Warteschlange. Starter führt pro Bot einen Thread gleichzeitig aus, das hier startet also, sobald der laufende fertig ist. Ein größerer Plan führt mehr aus.",
"composer.queued.seePlans": "Pläne ansehen",
- "settings.threads.starter": "Starter führt pro Bot einen Thread gleichzeitig aus, ein größerer Plan führt mehr aus. Arbeit, die ein Bot selbst startet, läuft trotzdem, und jeder Bot hat seinen eigenen Thread."
+ "settings.threads.starter": "Starter führt pro Bot einen Thread gleichzeitig aus, ein größerer Plan führt mehr aus. Arbeit, die ein Bot selbst startet, läuft trotzdem, und jeder Bot hat seinen eigenen Thread.",
+ "settings.section.imageGeneration": "Bilderzeugung",
+ "imageGen.intro": "Bots nutzen das, wenn Sie in einem Chat ein Bild anfordern, und Bot-Avatare ebenfalls. Der Ersatzanbieter wird nur versucht, wenn der Basisanbieter nicht starten konnte: kein Schlüssel, kein Guthaben, Ratenlimit oder nicht erreichbar.",
+ "imageGen.status.ready": "Bereit · Bilder werden mit {provider} erstellt",
+ "imageGen.status.backupOnly": "Nur mit dem Ersatzanbieter bereit · Bilder werden mit {provider} erstellt",
+ "imageGen.status.notReady": "Nicht eingerichtet · Schlüssel für den Basis- oder den Ersatzanbieter hinzufügen",
+ "imageGen.primary.label": "Basisanbieter",
+ "imageGen.primary.help": "Wird für jedes Bild zuerst verwendet.",
+ "imageGen.fallback.label": "Ersatzanbieter",
+ "imageGen.fallback.help": "Wird nur verwendet, wenn der Basisanbieter nicht starten konnte.",
+ "imageGen.fallback.none": "Keiner",
+ "imageGen.slot.needsKey": "Braucht einen Schlüssel: unten hinzufügen.",
+ "imageGen.slot.needsConnection": "Braucht eine Basis-URL und eine Modell-ID: unten hinzufügen.",
+ "imageGen.model.label": "Modell: {slot}",
+ "imageGen.model.placeholder": "Modell-ID",
+ "imageGen.maxPerTurn.label": "Bilder pro Antwort",
+ "imageGen.maxPerTurn.help": "Die meisten Bilder, die ein Bot in einer Antwort erstellen darf.",
+ "imageGen.key.openai": "OpenAI-API-Schlüssel",
+ "imageGen.key.gemini": "Gemini-API-Schlüssel",
+ "imageGen.key.custom": "API-Schlüssel für eigene Bild-API",
+ "imageGen.key.paste": "API-Schlüssel einfügen",
+ "imageGen.key.get": "Schlüssel besorgen",
+ "imageGen.key.saved": "Schlüssel gespeichert",
+ "imageGen.key.missing": "Noch kein Schlüssel",
+ "imageGen.key.optional": "Schlüssel optional",
+ "imageGen.key.sharedXai": "Das ist derselbe Grok-(xAI)-Schlüssel wie unter API-Schlüssel, den auch die anderen Grok-Funktionen nutzen. Ein Grok-Abo enthält keinen API-Zugang.",
+ "imageGen.key.sharedOpenrouter": "Das ist derselbe OpenRouter-Schlüssel wie unter API-Schlüssel, den auch die OpenRouter-Modelle deiner Bots nutzen.",
+ "imageGen.key.manage": "API-Schlüssel öffnen",
+ "imageGen.custom.url": "Basis-URL",
+ "imageGen.custom.help": "Jede OpenAI-kompatible Images API. localhost ist der Computer, auf dem {app} läuft.",
+ "botIdentity.ai.usingProvider": "Nutzt {provider}, wie unter Bilderzeugung festgelegt.",
+ "botIdentity.ai.noProvider": "Noch kein Bildanbieter eingerichtet.",
+ "botIdentity.ai.openImageSettings": "Bildeinstellungen öffnen",
+ "imageGen.key.xai": "Grok-(xAI)-API-Schlüssel",
+ "imageGen.key.openrouter": "OpenRouter-API-Schlüssel"
}
diff --git a/src/locales/en.json b/src/locales/en.json
index 7686f3f943..e3e29ebe75 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -6793,27 +6793,8 @@
"botIdentity.crop.rounded": "Rounded",
"botIdentity.crop.square": "Square",
"botIdentity.ai.generateWith": "Generate with AI",
- "botIdentity.ai.provider": "Image provider",
- "botIdentity.ai.openaiHint": "GPT Image 2 · low-quality square draft. Billed to your OpenAI API account.",
- "botIdentity.ai.xaiHint": "Grok Imagine · API billing is separate from your Grok subscription.",
- "botIdentity.ai.customHint": "Connect a local router or image provider.",
- "botIdentity.ai.shared": "This connection is shared by all bot avatars.",
"botIdentity.ai.generating": "Generating…",
"botIdentity.ai.generate": "Generate avatar",
- "botIdentity.ai.baseUrl": "Base URL",
- "botIdentity.ai.imageModel": "Image model",
- "botIdentity.ai.optional": "optional",
- "botIdentity.ai.savedKey": "Saved key · paste to replace",
- "botIdentity.ai.keyless": "Leave blank for a keyless connection",
- "botIdentity.ai.pasteKey": "Paste API key",
- "botIdentity.ai.removeKey": "Remove saved key",
- "botIdentity.ai.saveConnection": "Save connection",
- "botIdentity.ai.saveKey": "Save key",
- "botIdentity.ai.connectionSettings": "Connection settings",
- "botIdentity.ai.saveBeforeGenerate": "Save your connection changes before generating.",
- "botIdentity.ai.openaiKey": "OpenAI image API key",
- "botIdentity.ai.xaiKey": "Grok API key",
- "botIdentity.ai.customKey": "Custom image API key",
"botIdentity.ai.directionPlaceholder": "Optional direction, e.g. “a calm navigator inspired by {name}”",
"botIdentity.ai.directionLabel": "Avatar generation direction",
"botIdentity.soul.label": "Standing instructions (SOUL.md)",
@@ -7298,6 +7279,9 @@
"keys.where.logins": "Set up in Logins.",
"keys.where.decisions": "Set up with its account ID under Decision and extraction.",
"keys.where.pictures": "Set up in a bot's picture maker, with the service's address and model.",
+ "keys.label.imageGemini": "Gemini key for pictures",
+ "keys.purpose.imageGemini": "Pictures from Google's Gemini image models",
+ "keys.where.imageGeneration": "Set up in Image generation, where you pick the base and the backup provider.",
"keys.row.saving": "Saving…",
"keys.row.removing": "Removing…",
"keys.row.didntWork": "Didn't work",
@@ -7423,5 +7407,48 @@
"grokMove.alreadyHere": "Already here: {names}",
"grokMove.unreadable": "Couldn't be read: {names}",
"grokMove.notAdded": "Couldn't be added: {names}",
- "grokMove.isHere": "{name} is here"
+ "grokMove.isHere": "{name} is here",
+ "settings.section.imageGeneration": "Image generation",
+ "imageGen.intro": "Bots use this when you ask for an image in a chat, and bot avatars use it too. The backup is tried only when the base could not start: no key, no credit, rate limited or unreachable.",
+ "imageGen.status.ready": "Ready · images are made with {provider}",
+ "imageGen.status.backupOnly": "Ready with the backup only · images are made with {provider}",
+ "imageGen.status.notReady": "Not set up · add a key for the base or the backup provider",
+ "imageGen.primary.label": "Base provider",
+ "imageGen.primary.help": "Used first for every image.",
+ "imageGen.fallback.label": "Backup provider",
+ "imageGen.fallback.help": "Used only when the base could not start.",
+ "imageGen.fallback.none": "None",
+ "imageGen.slot.needsKey": "Needs a key: add it below.",
+ "imageGen.slot.needsConnection": "Needs a base URL and a model ID: add them below.",
+ "imageGen.model.label": "{slot} model",
+ "imageGen.model.placeholder": "Model ID",
+ "imageGen.model.other": "Other (type a model ID)",
+ "imageGen.model.idLabel": "{slot} model ID",
+ "imageGen.test.ok": "The key is accepted. The model is checked when the first image is made.",
+ "imageGen.test.okOpenrouter": "Works: the key is accepted and OpenRouter has the chosen model.",
+ "imageGen.test.noCredit": "The key is accepted, but this OpenRouter account has no credit, and image models are paid.",
+ "imageGen.test.modelMissing": "OpenRouter has no model {model}. Pick one from the list.",
+ "imageGen.test.rejected": "The provider refused this key. Check it or paste a new one.",
+ "imageGen.test.unreachable": "Could not reach the provider. Check the connection or the URL.",
+ "imageGen.test.unexpected": "The provider gave an unexpected answer.",
+ "imageGen.maxPerTurn.label": "Images per reply",
+ "imageGen.maxPerTurn.help": "The most images a bot may create in one reply.",
+ "imageGen.key.openai": "OpenAI API key",
+ "imageGen.key.gemini": "Gemini API key",
+ "imageGen.key.custom": "Custom image API key",
+ "imageGen.key.paste": "Paste API key",
+ "imageGen.key.get": "Get a key",
+ "imageGen.key.saved": "Key saved",
+ "imageGen.key.missing": "No key yet",
+ "imageGen.key.optional": "Key optional",
+ "imageGen.key.sharedXai": "This is the same Grok (xAI) key as under API keys, also used by the other Grok features. A Grok subscription does not include API access.",
+ "imageGen.key.sharedOpenrouter": "This is the same OpenRouter key as under API keys, also used by the OpenRouter models your bots run.",
+ "imageGen.key.manage": "Open API keys",
+ "imageGen.custom.url": "Base URL",
+ "imageGen.custom.help": "Any OpenAI-compatible Images API. localhost is the computer running {app}.",
+ "botIdentity.ai.usingProvider": "Uses {provider}, as set in Image generation.",
+ "botIdentity.ai.noProvider": "No image provider is set up yet.",
+ "botIdentity.ai.openImageSettings": "Open image settings",
+ "imageGen.key.xai": "Grok (xAI) API key",
+ "imageGen.key.openrouter": "OpenRouter API key"
}
diff --git a/src/locales/es.json b/src/locales/es.json
index aa3007af52..b92eecc9d9 100644
--- a/src/locales/es.json
+++ b/src/locales/es.json
@@ -5717,5 +5717,39 @@
"server.browser.stoppedWaiting": "Se dejó de esperar el navegador.",
"composer.queued.capacityStarter": "En cola. Starter ejecuta un hilo a la vez por bot, así que este empieza cuando termine el que está en marcha. Un plan mayor ejecuta más.",
"composer.queued.seePlans": "Ver planes",
- "settings.threads.starter": "Starter ejecuta un hilo a la vez por bot, y un plan mayor ejecuta más. El trabajo que un bot inicia por su cuenta se ejecuta igualmente, y cada bot tiene el suyo."
+ "settings.threads.starter": "Starter ejecuta un hilo a la vez por bot, y un plan mayor ejecuta más. El trabajo que un bot inicia por su cuenta se ejecuta igualmente, y cada bot tiene el suyo.",
+ "settings.section.imageGeneration": "Generación de imágenes",
+ "imageGen.intro": "Los bots lo usan cuando pides una imagen en un chat, y los avatares de los bots también. El respaldo solo se prueba cuando el base no pudo empezar: sin clave, sin crédito, con límite de uso o inaccesible.",
+ "imageGen.status.ready": "Listo · las imágenes se crean con {provider}",
+ "imageGen.status.backupOnly": "Listo solo con el respaldo · las imágenes se crean con {provider}",
+ "imageGen.status.notReady": "Sin configurar · añade una clave para el proveedor base o el de respaldo",
+ "imageGen.primary.label": "Proveedor base",
+ "imageGen.primary.help": "Se usa primero para cada imagen.",
+ "imageGen.fallback.label": "Proveedor de respaldo",
+ "imageGen.fallback.help": "Solo se usa cuando el base no pudo empezar.",
+ "imageGen.fallback.none": "Ninguno",
+ "imageGen.slot.needsKey": "Necesita una clave: añádela abajo.",
+ "imageGen.slot.needsConnection": "Necesita una URL base y un ID de modelo: añádelos abajo.",
+ "imageGen.model.label": "Modelo: {slot}",
+ "imageGen.model.placeholder": "ID del modelo",
+ "imageGen.maxPerTurn.label": "Imágenes por respuesta",
+ "imageGen.maxPerTurn.help": "El máximo de imágenes que un bot puede crear en una respuesta.",
+ "imageGen.key.openai": "Clave de API de OpenAI",
+ "imageGen.key.gemini": "Clave de API de Gemini",
+ "imageGen.key.custom": "Clave de API de imágenes personalizada",
+ "imageGen.key.paste": "Pega la clave de API",
+ "imageGen.key.get": "Obtener una clave",
+ "imageGen.key.saved": "Clave guardada",
+ "imageGen.key.missing": "Aún sin clave",
+ "imageGen.key.optional": "Clave opcional",
+ "imageGen.key.sharedXai": "Es la misma clave de Grok (xAI) de Claves de API, que también usan las demás funciones de Grok. Una suscripción a Grok no incluye acceso a la API.",
+ "imageGen.key.sharedOpenrouter": "Es la misma clave de OpenRouter de Claves de API, que también usan los modelos de OpenRouter de tus bots.",
+ "imageGen.key.manage": "Abrir Claves de API",
+ "imageGen.custom.url": "URL base",
+ "imageGen.custom.help": "Cualquier Images API compatible con OpenAI. localhost es el equipo que ejecuta {app}.",
+ "botIdentity.ai.usingProvider": "Usa {provider}, según lo definido en Generación de imágenes.",
+ "botIdentity.ai.noProvider": "Aún no hay un proveedor de imágenes configurado.",
+ "botIdentity.ai.openImageSettings": "Abrir ajustes de imágenes",
+ "imageGen.key.xai": "Clave de API de Grok (xAI)",
+ "imageGen.key.openrouter": "Clave de API de OpenRouter"
}
diff --git a/src/locales/fr.json b/src/locales/fr.json
index e35c88773f..8deaafd0d3 100644
--- a/src/locales/fr.json
+++ b/src/locales/fr.json
@@ -2775,5 +2775,39 @@
"server.browser.stoppedWaiting": "Attente du navigateur arrêtée.",
"composer.queued.capacityStarter": "En file d'attente. Starter exécute un fil à la fois par bot : celui-ci démarrera quand le fil en cours sera terminé. Un plan supérieur en exécute davantage.",
"composer.queued.seePlans": "Voir les plans",
- "settings.threads.starter": "Starter exécute un fil à la fois par bot, un plan supérieur en exécute davantage. Le travail qu'un bot lance lui-même s'exécute quand même, et chaque bot a le sien."
+ "settings.threads.starter": "Starter exécute un fil à la fois par bot, un plan supérieur en exécute davantage. Le travail qu'un bot lance lui-même s'exécute quand même, et chaque bot a le sien.",
+ "settings.section.imageGeneration": "Génération d'images",
+ "imageGen.intro": "Les bots l'utilisent quand vous demandez une image dans un chat, et les avatars des bots aussi. Le secours n'est essayé que si le fournisseur de base n'a pas pu démarrer : pas de clé, plus de crédit, limite de débit ou injoignable.",
+ "imageGen.status.ready": "Prêt · les images sont créées avec {provider}",
+ "imageGen.status.backupOnly": "Prêt avec le secours uniquement · les images sont créées avec {provider}",
+ "imageGen.status.notReady": "Non configuré · ajoutez une clé pour le fournisseur de base ou de secours",
+ "imageGen.primary.label": "Fournisseur de base",
+ "imageGen.primary.help": "Utilisé en premier pour chaque image.",
+ "imageGen.fallback.label": "Fournisseur de secours",
+ "imageGen.fallback.help": "Utilisé uniquement si le fournisseur de base n'a pas pu démarrer.",
+ "imageGen.fallback.none": "Aucun",
+ "imageGen.slot.needsKey": "Une clé est nécessaire : ajoutez-la ci-dessous.",
+ "imageGen.slot.needsConnection": "Une URL de base et un ID de modèle sont nécessaires : ajoutez-les ci-dessous.",
+ "imageGen.model.label": "Modèle : {slot}",
+ "imageGen.model.placeholder": "ID du modèle",
+ "imageGen.maxPerTurn.label": "Images par réponse",
+ "imageGen.maxPerTurn.help": "Le nombre maximal d'images qu'un bot peut créer dans une réponse.",
+ "imageGen.key.openai": "Clé API OpenAI",
+ "imageGen.key.gemini": "Clé API Gemini",
+ "imageGen.key.custom": "Clé API d'images personnalisée",
+ "imageGen.key.paste": "Collez la clé API",
+ "imageGen.key.get": "Obtenir une clé",
+ "imageGen.key.saved": "Clé enregistrée",
+ "imageGen.key.missing": "Pas encore de clé",
+ "imageGen.key.optional": "Clé facultative",
+ "imageGen.key.sharedXai": "C'est la même clé Grok (xAI) que dans Clés API, utilisée aussi par les autres fonctions Grok. Un abonnement Grok n'inclut pas l'accès à l'API.",
+ "imageGen.key.sharedOpenrouter": "C'est la même clé OpenRouter que dans Clés API, utilisée aussi par les modèles OpenRouter de vos bots.",
+ "imageGen.key.manage": "Ouvrir Clés API",
+ "imageGen.custom.url": "URL de base",
+ "imageGen.custom.help": "Toute Images API compatible OpenAI. localhost désigne l'ordinateur qui exécute {app}.",
+ "botIdentity.ai.usingProvider": "Utilise {provider}, comme défini dans Génération d'images.",
+ "botIdentity.ai.noProvider": "Aucun fournisseur d'images n'est encore configuré.",
+ "botIdentity.ai.openImageSettings": "Ouvrir les réglages d'images",
+ "imageGen.key.xai": "Clé API Grok (xAI)",
+ "imageGen.key.openrouter": "Clé API OpenRouter"
}
diff --git a/src/locales/hi.json b/src/locales/hi.json
index 3330da0f9a..48c9ed7ac2 100644
--- a/src/locales/hi.json
+++ b/src/locales/hi.json
@@ -2775,5 +2775,39 @@
"server.browser.stoppedWaiting": "ब्राउज़र का इंतज़ार बंद किया।",
"composer.queued.capacityStarter": "कतार में है। Starter हर बॉट के लिए एक समय में एक थ्रेड चलाता है, इसलिए यह चल रहे थ्रेड के खत्म होने पर शुरू होगा। बड़ा प्लान ज़्यादा चलाता है।",
"composer.queued.seePlans": "प्लान देखें",
- "settings.threads.starter": "Starter हर बॉट के लिए एक समय में एक थ्रेड चलाता है, और बड़ा प्लान ज़्यादा चलाता है। बॉट का खुद शुरू किया काम फिर भी चलता है, और हर बॉट का अपना एक थ्रेड होता है।"
+ "settings.threads.starter": "Starter हर बॉट के लिए एक समय में एक थ्रेड चलाता है, और बड़ा प्लान ज़्यादा चलाता है। बॉट का खुद शुरू किया काम फिर भी चलता है, और हर बॉट का अपना एक थ्रेड होता है।",
+ "settings.section.imageGeneration": "इमेज जनरेशन",
+ "imageGen.intro": "जब आप चैट में कोई इमेज माँगते हैं तो बॉट इसका उपयोग करते हैं, और बॉट के अवतार भी इसी का उपयोग करते हैं। बैकअप तभी आज़माया जाता है जब बेस शुरू नहीं हो सका: कुंजी नहीं, क्रेडिट नहीं, दर सीमा या पहुँच से बाहर।",
+ "imageGen.status.ready": "तैयार · इमेज {provider} से बनाई जाती हैं",
+ "imageGen.status.backupOnly": "सिर्फ़ बैकअप के साथ तैयार · इमेज {provider} से बनाई जाती हैं",
+ "imageGen.status.notReady": "सेट अप नहीं है · बेस या बैकअप प्रदाता के लिए कुंजी जोड़ें",
+ "imageGen.primary.label": "बेस प्रदाता",
+ "imageGen.primary.help": "हर इमेज के लिए सबसे पहले इसका उपयोग होता है।",
+ "imageGen.fallback.label": "बैकअप प्रदाता",
+ "imageGen.fallback.help": "सिर्फ़ तब उपयोग होता है जब बेस शुरू नहीं हो सका।",
+ "imageGen.fallback.none": "कोई नहीं",
+ "imageGen.slot.needsKey": "कुंजी चाहिए: इसे नीचे जोड़ें।",
+ "imageGen.slot.needsConnection": "बेस URL और मॉडल ID चाहिए: इन्हें नीचे जोड़ें।",
+ "imageGen.model.label": "{slot} का मॉडल",
+ "imageGen.model.placeholder": "मॉडल ID",
+ "imageGen.maxPerTurn.label": "हर जवाब में इमेज",
+ "imageGen.maxPerTurn.help": "एक जवाब में बॉट ज़्यादा से ज़्यादा जितनी इमेज बना सकता है।",
+ "imageGen.key.openai": "OpenAI API कुंजी",
+ "imageGen.key.gemini": "Gemini API कुंजी",
+ "imageGen.key.custom": "कस्टम इमेज API कुंजी",
+ "imageGen.key.paste": "API कुंजी पेस्ट करें",
+ "imageGen.key.get": "कुंजी पाएँ",
+ "imageGen.key.saved": "कुंजी सहेजी गई",
+ "imageGen.key.missing": "अभी कोई कुंजी नहीं",
+ "imageGen.key.optional": "कुंजी वैकल्पिक है",
+ "imageGen.key.sharedXai": "यह API कुंजियों वाली वही Grok (xAI) कुंजी है, जिसे Grok की बाकी सुविधाएँ भी इस्तेमाल करती हैं। Grok सदस्यता में API पहुँच शामिल नहीं है।",
+ "imageGen.key.sharedOpenrouter": "यह API कुंजियों वाली वही OpenRouter कुंजी है, जिसे आपके बॉट्स के OpenRouter मॉडल भी इस्तेमाल करते हैं।",
+ "imageGen.key.manage": "API कुंजियाँ खोलें",
+ "imageGen.custom.url": "बेस URL",
+ "imageGen.custom.help": "कोई भी OpenAI-संगत Images API। localhost वह कंप्यूटर है जिस पर {app} चल रहा है।",
+ "botIdentity.ai.usingProvider": "{provider} का उपयोग करता है, जैसा इमेज जनरेशन में सेट है।",
+ "botIdentity.ai.noProvider": "अभी कोई इमेज प्रदाता सेट अप नहीं है।",
+ "botIdentity.ai.openImageSettings": "इमेज सेटिंग खोलें",
+ "imageGen.key.xai": "Grok (xAI) API कुंजी",
+ "imageGen.key.openrouter": "OpenRouter API कुंजी"
}
diff --git a/src/locales/it.json b/src/locales/it.json
index f336bdf68f..2ac711403e 100644
--- a/src/locales/it.json
+++ b/src/locales/it.json
@@ -5858,27 +5858,8 @@
"botIdentity.crop.rounded": "Arrotondato",
"botIdentity.crop.square": "Quadrato",
"botIdentity.ai.generateWith": "Genera con AI",
- "botIdentity.ai.provider": "Fornitore di immagini",
- "botIdentity.ai.openaiHint": "GPT Image 2 · bozza quadrata a bassa qualità. L'addebito va sul tuo account API OpenAI.",
- "botIdentity.ai.xaiHint": "Grok Imagine · la fatturazione API è separata dal tuo abbonamento Grok.",
- "botIdentity.ai.customHint": "Collega un router locale o un fornitore di immagini.",
- "botIdentity.ai.shared": "Questa connessione è condivisa da tutti gli avatar dei bot.",
"botIdentity.ai.generating": "Generazione…",
"botIdentity.ai.generate": "Genera avatar",
- "botIdentity.ai.baseUrl": "URL di base",
- "botIdentity.ai.imageModel": "Modello immagini",
- "botIdentity.ai.optional": "opzionale",
- "botIdentity.ai.savedKey": "Chiave salvata · incolla per sostituirla",
- "botIdentity.ai.keyless": "Lascia vuoto per una connessione senza chiave",
- "botIdentity.ai.pasteKey": "Incolla la chiave API",
- "botIdentity.ai.removeKey": "Rimuovi la chiave salvata",
- "botIdentity.ai.saveConnection": "Salva connessione",
- "botIdentity.ai.saveKey": "Salva chiave",
- "botIdentity.ai.connectionSettings": "Impostazioni di connessione",
- "botIdentity.ai.saveBeforeGenerate": "Salva le modifiche alla connessione prima di generare.",
- "botIdentity.ai.openaiKey": "Chiave API immagini OpenAI",
- "botIdentity.ai.xaiKey": "Chiave API Grok",
- "botIdentity.ai.customKey": "Chiave API immagini personalizzata",
"botIdentity.ai.directionPlaceholder": "Direzione opzionale, ad es. «un navigatore calmo ispirato a {name}»",
"botIdentity.ai.directionLabel": "Direzione di generazione dell'avatar",
"botIdentity.soul.label": "Istruzioni permanenti (SOUL.md)",
@@ -6377,5 +6358,39 @@
"server.browser.stoppedWaiting": "Attesa del browser interrotta.",
"composer.queued.capacityStarter": "In coda. Starter esegue un thread alla volta per bot, quindi questo parte quando finisce quello in corso. Un piano più grande ne esegue di più.",
"composer.queued.seePlans": "Vedi i piani",
- "settings.threads.starter": "Starter esegue un thread alla volta per bot, un piano più grande ne esegue di più. Il lavoro che un bot avvia da solo viene comunque eseguito, e ogni bot ha il suo."
+ "settings.threads.starter": "Starter esegue un thread alla volta per bot, un piano più grande ne esegue di più. Il lavoro che un bot avvia da solo viene comunque eseguito, e ogni bot ha il suo.",
+ "settings.section.imageGeneration": "Generazione di immagini",
+ "imageGen.intro": "I bot lo usano quando chiedi un'immagine in una chat, e anche gli avatar dei bot. Il provider di riserva viene provato solo se quello base non è potuto partire: nessuna chiave, nessun credito, limite di richieste o non raggiungibile.",
+ "imageGen.status.ready": "Pronto · le immagini sono create con {provider}",
+ "imageGen.status.backupOnly": "Pronto solo con la riserva · le immagini sono create con {provider}",
+ "imageGen.status.notReady": "Non configurato · aggiungi una chiave per il provider base o quello di riserva",
+ "imageGen.primary.label": "Provider base",
+ "imageGen.primary.help": "Usato per primo per ogni immagine.",
+ "imageGen.fallback.label": "Provider di riserva",
+ "imageGen.fallback.help": "Usato solo se quello base non è potuto partire.",
+ "imageGen.fallback.none": "Nessuno",
+ "imageGen.slot.needsKey": "Serve una chiave: aggiungila qui sotto.",
+ "imageGen.slot.needsConnection": "Servono un URL base e un ID modello: aggiungili qui sotto.",
+ "imageGen.model.label": "Modello: {slot}",
+ "imageGen.model.placeholder": "ID modello",
+ "imageGen.maxPerTurn.label": "Immagini per risposta",
+ "imageGen.maxPerTurn.help": "Il massimo di immagini che un bot può creare in una risposta.",
+ "imageGen.key.openai": "Chiave API OpenAI",
+ "imageGen.key.gemini": "Chiave API Gemini",
+ "imageGen.key.custom": "Chiave API immagini personalizzata",
+ "imageGen.key.paste": "Incolla la chiave API",
+ "imageGen.key.get": "Ottieni una chiave",
+ "imageGen.key.saved": "Chiave salvata",
+ "imageGen.key.missing": "Ancora nessuna chiave",
+ "imageGen.key.optional": "Chiave facoltativa",
+ "imageGen.key.sharedXai": "È la stessa chiave Grok (xAI) di Chiavi API, usata anche dalle altre funzioni di Grok. Un abbonamento Grok non include l'accesso all'API.",
+ "imageGen.key.sharedOpenrouter": "È la stessa chiave OpenRouter di Chiavi API, usata anche dai modelli OpenRouter dei tuoi bot.",
+ "imageGen.key.manage": "Apri Chiavi API",
+ "imageGen.custom.url": "URL base",
+ "imageGen.custom.help": "Qualsiasi Images API compatibile con OpenAI. localhost è il computer su cui gira {app}.",
+ "botIdentity.ai.usingProvider": "Usa {provider}, come impostato in Generazione di immagini.",
+ "botIdentity.ai.noProvider": "Nessun provider di immagini è ancora configurato.",
+ "botIdentity.ai.openImageSettings": "Apri impostazioni immagini",
+ "imageGen.key.xai": "Chiave API di Grok (xAI)",
+ "imageGen.key.openrouter": "Chiave API di OpenRouter"
}
diff --git a/src/locales/ja.json b/src/locales/ja.json
index 3c6fe3bc2d..71561a4e3b 100644
--- a/src/locales/ja.json
+++ b/src/locales/ja.json
@@ -6107,27 +6107,8 @@
"botIdentity.crop.rounded": "角丸",
"botIdentity.crop.square": "四角",
"botIdentity.ai.generateWith": "AIで生成",
- "botIdentity.ai.provider": "画像プロバイダー",
- "botIdentity.ai.openaiHint": "GPT Image 2 · 低品質の正方形のドラフト。ご利用のOpenAI APIアカウントに請求されます。",
- "botIdentity.ai.xaiHint": "Grok Imagine · APIの料金は、Grokのサブスクリプションとは別に請求されます。",
- "botIdentity.ai.customHint": "ローカルルーターまたは画像プロバイダーを接続します。",
- "botIdentity.ai.shared": "この接続は、すべてのボットのアバターで共有されます。",
"botIdentity.ai.generating": "生成中…",
"botIdentity.ai.generate": "アバターを生成",
- "botIdentity.ai.baseUrl": "ベースURL",
- "botIdentity.ai.imageModel": "画像モデル",
- "botIdentity.ai.optional": "任意",
- "botIdentity.ai.savedKey": "キーを保存済み · 置き換えるには貼り付け",
- "botIdentity.ai.keyless": "キーなしで接続する場合は空欄のままにしてください",
- "botIdentity.ai.pasteKey": "APIキーを貼り付け",
- "botIdentity.ai.removeKey": "保存済みのキーを削除",
- "botIdentity.ai.saveConnection": "接続を保存",
- "botIdentity.ai.saveKey": "キーを保存",
- "botIdentity.ai.connectionSettings": "接続設定",
- "botIdentity.ai.saveBeforeGenerate": "生成する前に、接続の変更を保存してください。",
- "botIdentity.ai.openaiKey": "OpenAI画像APIキー",
- "botIdentity.ai.xaiKey": "Grok APIキー",
- "botIdentity.ai.customKey": "カスタム画像APIキー",
"botIdentity.ai.directionPlaceholder": "方向性(任意)。例:「{name}にインスパイアされた、穏やかなナビゲーター」",
"botIdentity.ai.directionLabel": "アバター生成の方向性",
"botIdentity.soul.label": "常時有効な指示(SOUL.md)",
@@ -6601,5 +6582,39 @@
"server.browser.stoppedWaiting": "ブラウザの待機を終了しました。",
"composer.queued.capacityStarter": "順番待ちです。Starter はボットごとに一度に 1 つのスレッドを実行するので、実行中のものが終わると始まります。より大きなプランではもっと実行できます。",
"composer.queued.seePlans": "プランを見る",
- "settings.threads.starter": "Starter はボットごとに一度に 1 つのスレッドを実行し、より大きなプランではもっと実行できます。ボットが自分で始めた作業はそのまま実行され、ボットごとに 1 つずつ使えます。"
+ "settings.threads.starter": "Starter はボットごとに一度に 1 つのスレッドを実行し、より大きなプランではもっと実行できます。ボットが自分で始めた作業はそのまま実行され、ボットごとに 1 つずつ使えます。",
+ "settings.section.imageGeneration": "画像生成",
+ "imageGen.intro": "チャットで画像を頼んだときにボットがこれを使い、ボットのアバターも同じです。バックアップは、基本のプロバイダーが開始できなかったときだけ試されます。キーなし、クレジットなし、レート制限、または接続不能の場合です。",
+ "imageGen.status.ready": "準備完了 · 画像は {provider} で作成されます",
+ "imageGen.status.backupOnly": "バックアップのみ準備完了 · 画像は {provider} で作成されます",
+ "imageGen.status.notReady": "未設定 · 基本またはバックアップのプロバイダーのキーを追加してください",
+ "imageGen.primary.label": "基本プロバイダー",
+ "imageGen.primary.help": "すべての画像でまず使われます。",
+ "imageGen.fallback.label": "バックアッププロバイダー",
+ "imageGen.fallback.help": "基本のプロバイダーが開始できなかったときだけ使われます。",
+ "imageGen.fallback.none": "なし",
+ "imageGen.slot.needsKey": "キーが必要です。下に追加してください。",
+ "imageGen.slot.needsConnection": "ベース URL とモデル ID が必要です。下に追加してください。",
+ "imageGen.model.label": "{slot}のモデル",
+ "imageGen.model.placeholder": "モデル ID",
+ "imageGen.maxPerTurn.label": "1 回の返信あたりの画像数",
+ "imageGen.maxPerTurn.help": "ボットが 1 回の返信で作成できる画像の最大数です。",
+ "imageGen.key.openai": "OpenAI API キー",
+ "imageGen.key.gemini": "Gemini API キー",
+ "imageGen.key.custom": "カスタム画像 API キー",
+ "imageGen.key.paste": "API キーを貼り付け",
+ "imageGen.key.get": "キーを取得",
+ "imageGen.key.saved": "キーを保存しました",
+ "imageGen.key.missing": "キーがありません",
+ "imageGen.key.optional": "キーは任意",
+ "imageGen.key.sharedXai": "API キーにあるものと同じ Grok (xAI) キーで、ほかの Grok 機能でも使われます。Grok のサブスクリプションには API アクセスは含まれません。",
+ "imageGen.key.sharedOpenrouter": "API キーにあるものと同じ OpenRouter キーで、ボットが使う OpenRouter のモデルでも使われます。",
+ "imageGen.key.manage": "API キーを開く",
+ "imageGen.custom.url": "ベース URL",
+ "imageGen.custom.help": "OpenAI 互換の Images API ならどれでも使えます。localhost は {app} を実行しているコンピューターです。",
+ "botIdentity.ai.usingProvider": "画像生成の設定どおり、{provider} を使います。",
+ "botIdentity.ai.noProvider": "画像プロバイダーはまだ設定されていません。",
+ "botIdentity.ai.openImageSettings": "画像設定を開く",
+ "imageGen.key.xai": "Grok (xAI) API キー",
+ "imageGen.key.openrouter": "OpenRouter API キー"
}
diff --git a/src/locales/ko.json b/src/locales/ko.json
index 14a9767c40..9d536ff1e1 100644
--- a/src/locales/ko.json
+++ b/src/locales/ko.json
@@ -6548,27 +6548,8 @@
"botIdentity.crop.rounded": "둥근 모서리",
"botIdentity.crop.square": "사각형",
"botIdentity.ai.generateWith": "AI로 생성",
- "botIdentity.ai.provider": "이미지 제공자",
- "botIdentity.ai.openaiHint": "GPT Image 2 · 저화질 정사각형 초안. OpenAI API 계정으로 청구돼요.",
- "botIdentity.ai.xaiHint": "Grok Imagine · API 요금은 Grok 구독과 별개예요.",
- "botIdentity.ai.customHint": "로컬 라우터나 이미지 제공자를 연결하세요.",
- "botIdentity.ai.shared": "이 연결은 모든 봇 아바타가 함께 써요.",
"botIdentity.ai.generating": "생성 중…",
"botIdentity.ai.generate": "아바타 생성",
- "botIdentity.ai.baseUrl": "기본 URL",
- "botIdentity.ai.imageModel": "이미지 모델",
- "botIdentity.ai.optional": "선택",
- "botIdentity.ai.savedKey": "저장된 키 · 붙여 넣으면 교체",
- "botIdentity.ai.keyless": "키 없이 연결하려면 비워 두세요",
- "botIdentity.ai.pasteKey": "API 키 붙여 넣기",
- "botIdentity.ai.removeKey": "저장된 키 제거",
- "botIdentity.ai.saveConnection": "연결 저장",
- "botIdentity.ai.saveKey": "키 저장",
- "botIdentity.ai.connectionSettings": "연결 설정",
- "botIdentity.ai.saveBeforeGenerate": "생성하기 전에 연결 변경 사항을 저장하세요.",
- "botIdentity.ai.openaiKey": "OpenAI 이미지 API 키",
- "botIdentity.ai.xaiKey": "Grok API 키",
- "botIdentity.ai.customKey": "사용자 지정 이미지 API 키",
"botIdentity.ai.directionPlaceholder": "선택 사항인 방향, 예: “{name}에서 영감을 받은 차분한 항해사”",
"botIdentity.ai.directionLabel": "아바타 생성 방향",
"botIdentity.soul.label": "상시 지침(SOUL.md)",
diff --git a/src/locales/pl.json b/src/locales/pl.json
index e99002faec..9ba1321d07 100644
--- a/src/locales/pl.json
+++ b/src/locales/pl.json
@@ -5985,27 +5985,8 @@
"botIdentity.crop.rounded": "Zaokrąglony",
"botIdentity.crop.square": "Kwadrat",
"botIdentity.ai.generateWith": "Wygeneruj z AI",
- "botIdentity.ai.provider": "Dostawca obrazów",
- "botIdentity.ai.openaiHint": "GPT Image 2 · szkic kwadratowy w niskiej jakości. Obciąża twoje konto API OpenAI.",
- "botIdentity.ai.xaiHint": "Grok Imagine · rozliczenia API są oddzielne od twojej subskrypcji Grok.",
- "botIdentity.ai.customHint": "Połącz lokalny router lub dostawcę obrazów.",
- "botIdentity.ai.shared": "To połączenie jest współdzielone przez wszystkie awatary botów.",
"botIdentity.ai.generating": "Generowanie…",
"botIdentity.ai.generate": "Wygeneruj awatar",
- "botIdentity.ai.baseUrl": "Bazowy URL",
- "botIdentity.ai.imageModel": "Model obrazów",
- "botIdentity.ai.optional": "opcjonalnie",
- "botIdentity.ai.savedKey": "Zapisany klucz · wklej, aby zastąpić",
- "botIdentity.ai.keyless": "Pozostaw puste, aby połączyć się bez klucza",
- "botIdentity.ai.pasteKey": "Wklej klucz API",
- "botIdentity.ai.removeKey": "Usuń zapisany klucz",
- "botIdentity.ai.saveConnection": "Zapisz połączenie",
- "botIdentity.ai.saveKey": "Zapisz klucz",
- "botIdentity.ai.connectionSettings": "Ustawienia połączenia",
- "botIdentity.ai.saveBeforeGenerate": "Zapisz zmiany połączenia przed wygenerowaniem.",
- "botIdentity.ai.openaiKey": "Klucz API OpenAI do obrazów",
- "botIdentity.ai.xaiKey": "Klucz API Grok",
- "botIdentity.ai.customKey": "Własny klucz API do obrazów",
"botIdentity.ai.directionPlaceholder": "Opcjonalny kierunek, np. „spokojny nawigator, inspiracja: {name}”",
"botIdentity.ai.directionLabel": "Kierunek generowania awatara",
"botIdentity.soul.label": "Stałe instrukcje (SOUL.md)",
@@ -6517,5 +6498,39 @@
"server.browser.stoppedWaiting": "Przestano czekać na przeglądarkę.",
"composer.queued.capacityStarter": "W kolejce. Starter uruchamia jeden wątek naraz na bota, więc ten ruszy, gdy skończy się bieżący. Większy plan uruchamia więcej.",
"composer.queued.seePlans": "Zobacz plany",
- "settings.threads.starter": "Starter uruchamia jeden wątek naraz na bota, a większy plan więcej. Praca, którą bot zaczyna sam, i tak się wykonuje, a każdy bot ma swój wątek."
+ "settings.threads.starter": "Starter uruchamia jeden wątek naraz na bota, a większy plan więcej. Praca, którą bot zaczyna sam, i tak się wykonuje, a każdy bot ma swój wątek.",
+ "settings.section.imageGeneration": "Generowanie obrazów",
+ "imageGen.intro": "Boty używają tego, gdy prosisz o obraz w czacie, a awatary botów też. Zapasowy dostawca jest próbowany tylko wtedy, gdy podstawowy nie mógł wystartować: brak klucza, brak środków, limit zapytań lub brak połączenia.",
+ "imageGen.status.ready": "Gotowe · obrazy tworzy {provider}",
+ "imageGen.status.backupOnly": "Gotowe tylko z zapasowym · obrazy tworzy {provider}",
+ "imageGen.status.notReady": "Nie skonfigurowano · dodaj klucz dla dostawcy podstawowego lub zapasowego",
+ "imageGen.primary.label": "Dostawca podstawowy",
+ "imageGen.primary.help": "Używany jako pierwszy przy każdym obrazie.",
+ "imageGen.fallback.label": "Dostawca zapasowy",
+ "imageGen.fallback.help": "Używany tylko wtedy, gdy podstawowy nie mógł wystartować.",
+ "imageGen.fallback.none": "Brak",
+ "imageGen.slot.needsKey": "Potrzebny klucz: dodaj go poniżej.",
+ "imageGen.slot.needsConnection": "Potrzebne są bazowy URL i ID modelu: dodaj je poniżej.",
+ "imageGen.model.label": "Model: {slot}",
+ "imageGen.model.placeholder": "ID modelu",
+ "imageGen.maxPerTurn.label": "Obrazy na odpowiedź",
+ "imageGen.maxPerTurn.help": "Największa liczba obrazów, jaką bot może stworzyć w jednej odpowiedzi.",
+ "imageGen.key.openai": "Klucz API OpenAI",
+ "imageGen.key.gemini": "Klucz API Gemini",
+ "imageGen.key.custom": "Własny klucz API obrazów",
+ "imageGen.key.paste": "Wklej klucz API",
+ "imageGen.key.get": "Zdobądź klucz",
+ "imageGen.key.saved": "Klucz zapisany",
+ "imageGen.key.missing": "Jeszcze brak klucza",
+ "imageGen.key.optional": "Klucz opcjonalny",
+ "imageGen.key.sharedXai": "To ten sam klucz Grok (xAI) co w Kluczach API, używany też przez inne funkcje Groka. Subskrypcja Groka nie obejmuje dostępu do API.",
+ "imageGen.key.sharedOpenrouter": "To ten sam klucz OpenRouter co w Kluczach API, używany też przez modele OpenRouter twoich botów.",
+ "imageGen.key.manage": "Otwórz Klucze API",
+ "imageGen.custom.url": "Bazowy URL",
+ "imageGen.custom.help": "Dowolne Images API zgodne z OpenAI. localhost to komputer, na którym działa {app}.",
+ "botIdentity.ai.usingProvider": "Używa: {provider}, zgodnie z ustawieniem w Generowaniu obrazów.",
+ "botIdentity.ai.noProvider": "Nie skonfigurowano jeszcze dostawcy obrazów.",
+ "botIdentity.ai.openImageSettings": "Otwórz ustawienia obrazów",
+ "imageGen.key.xai": "Klucz API Grok (xAI)",
+ "imageGen.key.openrouter": "Klucz API OpenRouter"
}
diff --git a/src/locales/pt-br.json b/src/locales/pt-br.json
index 7290786b5c..12209a2766 100644
--- a/src/locales/pt-br.json
+++ b/src/locales/pt-br.json
@@ -5826,27 +5826,8 @@
"botIdentity.crop.rounded": "Arredondado",
"botIdentity.crop.square": "Quadrado",
"botIdentity.ai.generateWith": "Gerar com IA",
- "botIdentity.ai.provider": "Provedor de imagem",
- "botIdentity.ai.openaiHint": "GPT Image 2 · rascunho quadrado de baixa qualidade. Cobrado na sua conta da API da OpenAI.",
- "botIdentity.ai.xaiHint": "Grok Imagine · a cobrança da API é separada da sua assinatura Grok.",
- "botIdentity.ai.customHint": "Conecte um roteador ou provedor de imagens local.",
- "botIdentity.ai.shared": "Esta conexão é compartilhada por todos os avatares dos bots.",
"botIdentity.ai.generating": "Gerando…",
"botIdentity.ai.generate": "Gerar avatar",
- "botIdentity.ai.baseUrl": "URL base",
- "botIdentity.ai.imageModel": "Modelo de imagem",
- "botIdentity.ai.optional": "opcional",
- "botIdentity.ai.savedKey": "Chave salva · cole para substituir",
- "botIdentity.ai.keyless": "Deixe em branco para uma conexão sem chave",
- "botIdentity.ai.pasteKey": "Cole a chave da API",
- "botIdentity.ai.removeKey": "Remover chave salva",
- "botIdentity.ai.saveConnection": "Salvar conexão",
- "botIdentity.ai.saveKey": "Salvar chave",
- "botIdentity.ai.connectionSettings": "Configurações da conexão",
- "botIdentity.ai.saveBeforeGenerate": "Salve as alterações da conexão antes de gerar.",
- "botIdentity.ai.openaiKey": "Chave da API de imagens da OpenAI",
- "botIdentity.ai.xaiKey": "Chave da API da Grok",
- "botIdentity.ai.customKey": "Chave de API de imagem personalizada",
"botIdentity.ai.directionPlaceholder": "Instrução opcional, por exemplo: “um navegador calmo inspirado em {name}”",
"botIdentity.ai.directionLabel": "Instrução para gerar o avatar",
"botIdentity.soul.label": "Instruções permanentes (SOUL.md)",
@@ -6395,5 +6376,51 @@
"server.browser.stoppedWaiting": "Parou de aguardar o navegador.",
"composer.queued.capacityStarter": "Na fila. O Starter executa uma conversa por vez em cada bot, então esta começa quando a atual terminar. Um plano maior executa mais.",
"composer.queued.seePlans": "Ver planos",
- "settings.threads.starter": "O Starter executa uma conversa por vez em cada bot, e um plano maior executa mais. O trabalho que um bot inicia por conta própria ainda é executado, e cada bot tem a sua."
+ "settings.threads.starter": "O Starter executa uma conversa por vez em cada bot, e um plano maior executa mais. O trabalho que um bot inicia por conta própria ainda é executado, e cada bot tem a sua.",
+ "settings.section.imageGeneration": "Geração de imagem",
+ "imageGen.intro": "Os bots usam isto quando você pede uma imagem no chat, e os avatares dos bots também. A reserva só entra quando a base não conseguiu começar: sem chave, sem crédito, limite de uso ou fora do ar.",
+ "imageGen.status.ready": "Pronto · as imagens são feitas com {provider}",
+ "imageGen.status.backupOnly": "Pronto só com a reserva · as imagens são feitas com {provider}",
+ "imageGen.status.notReady": "Não configurado · adicione uma chave para o provedor base ou o de reserva",
+ "imageGen.primary.label": "Provedor base",
+ "imageGen.primary.help": "Usado primeiro em toda imagem.",
+ "imageGen.fallback.label": "Provedor de reserva",
+ "imageGen.fallback.help": "Usado só quando a base não conseguiu começar.",
+ "imageGen.fallback.none": "Nenhum",
+ "imageGen.slot.needsKey": "Precisa de uma chave: adicione abaixo.",
+ "imageGen.slot.needsConnection": "Precisa de uma URL base e de um ID de modelo: adicione abaixo.",
+ "imageGen.model.label": "Modelo do {slot}",
+ "imageGen.model.placeholder": "ID do modelo",
+ "imageGen.model.other": "Outro (digitar o ID do modelo)",
+ "imageGen.model.idLabel": "ID do modelo do {slot}",
+ "keys.label.imageGemini": "Chave do Gemini para imagens",
+ "keys.purpose.imageGemini": "Imagens dos modelos de imagem Gemini, do Google",
+ "keys.where.imageGeneration": "Configure em Geração de imagem, onde você escolhe o provedor base e o de reserva.",
+ "imageGen.test.ok": "A chave foi aceita. O modelo só é conferido quando a primeira imagem for feita.",
+ "imageGen.test.okOpenrouter": "Funciona: a chave foi aceita e o OpenRouter tem o modelo escolhido.",
+ "imageGen.test.noCredit": "A chave foi aceita, mas essa conta do OpenRouter não tem créditos, e os modelos de imagem são pagos.",
+ "imageGen.test.modelMissing": "O OpenRouter não tem o modelo {model}. Escolha um da lista.",
+ "imageGen.test.rejected": "O provedor recusou esta chave. Confira ou cole uma nova.",
+ "imageGen.test.unreachable": "Não foi possível falar com o provedor. Confira a conexão ou a URL.",
+ "imageGen.test.unexpected": "O provedor deu uma resposta inesperada.",
+ "imageGen.maxPerTurn.label": "Imagens por resposta",
+ "imageGen.maxPerTurn.help": "O máximo de imagens que um bot pode criar numa resposta.",
+ "imageGen.key.openai": "Chave de API da OpenAI",
+ "imageGen.key.gemini": "Chave de API do Gemini",
+ "imageGen.key.custom": "Chave da API de imagem personalizada",
+ "imageGen.key.paste": "Cole a chave de API",
+ "imageGen.key.get": "Obter uma chave",
+ "imageGen.key.saved": "Chave salva",
+ "imageGen.key.missing": "Nenhuma chave ainda",
+ "imageGen.key.optional": "Chave opcional",
+ "imageGen.key.sharedXai": "É a mesma chave do Grok (xAI) de Chaves de API, usada também pelos outros recursos do Grok. A assinatura do Grok não inclui acesso à API.",
+ "imageGen.key.sharedOpenrouter": "É a mesma chave do OpenRouter de Chaves de API, usada também pelos modelos do OpenRouter que seus bots usam.",
+ "imageGen.key.manage": "Abrir Chaves de API",
+ "imageGen.custom.url": "URL base",
+ "imageGen.custom.help": "Qualquer Images API compatível com OpenAI. localhost é o computador que roda o {app}.",
+ "botIdentity.ai.usingProvider": "Usa {provider}, como definido em Geração de imagem.",
+ "botIdentity.ai.noProvider": "Nenhum provedor de imagem configurado ainda.",
+ "botIdentity.ai.openImageSettings": "Abrir configurações de imagem",
+ "imageGen.key.xai": "Chave de API do Grok (xAI)",
+ "imageGen.key.openrouter": "Chave de API do OpenRouter"
}
diff --git a/src/locales/ru.json b/src/locales/ru.json
index 36f21208ea..bdd222d3e5 100644
--- a/src/locales/ru.json
+++ b/src/locales/ru.json
@@ -6076,27 +6076,8 @@
"botIdentity.crop.rounded": "Скруглённый",
"botIdentity.crop.square": "Квадрат",
"botIdentity.ai.generateWith": "Сгенерировать с помощью AI",
- "botIdentity.ai.provider": "Провайдер изображений",
- "botIdentity.ai.openaiHint": "GPT Image 2 · квадратный черновик низкого качества. Списывается с вашего аккаунта OpenAI API.",
- "botIdentity.ai.xaiHint": "Grok Imagine · оплата API осуществляется отдельно от вашей подписки Grok.",
- "botIdentity.ai.customHint": "Подключите локальный маршрутизатор или провайдер изображений.",
- "botIdentity.ai.shared": "Это подключение является общим для всех аватаров ботов.",
"botIdentity.ai.generating": "Генерация…",
"botIdentity.ai.generate": "Сгенерировать аватар",
- "botIdentity.ai.baseUrl": "Базовый URL",
- "botIdentity.ai.imageModel": "Модель изображений",
- "botIdentity.ai.optional": "необязательно",
- "botIdentity.ai.savedKey": "Сохранённый ключ · вставьте новый, чтобы заменить",
- "botIdentity.ai.keyless": "Оставьте пустым для подключения без ключа",
- "botIdentity.ai.pasteKey": "Вставить API-ключ",
- "botIdentity.ai.removeKey": "Удалить сохранённый ключ",
- "botIdentity.ai.saveConnection": "Сохранить подключение",
- "botIdentity.ai.saveKey": "Сохранить ключ",
- "botIdentity.ai.connectionSettings": "Настройки подключения",
- "botIdentity.ai.saveBeforeGenerate": "Сохраните изменения подключения перед генерацией.",
- "botIdentity.ai.openaiKey": "API-ключ OpenAI для изображений",
- "botIdentity.ai.xaiKey": "API-ключ Grok",
- "botIdentity.ai.customKey": "Свой API-ключ для генерации изображений",
"botIdentity.ai.directionPlaceholder": "Необязательное направление, например «спокойный штурман в духе {name}»",
"botIdentity.ai.directionLabel": "Направление генерации аватара",
"botIdentity.soul.label": "Постоянные инструкции (SOUL.md)",
@@ -6579,5 +6560,39 @@
"server.browser.stoppedWaiting": "Ожидание браузера прекращено.",
"composer.queued.capacityStarter": "В очереди. Starter запускает по одному потоку за раз на бота, поэтому этот начнётся, когда завершится текущий. Более крупный план запускает больше.",
"composer.queued.seePlans": "Посмотреть планы",
- "settings.threads.starter": "Starter запускает по одному потоку за раз на бота, а более крупный план запускает больше. Работа, которую бот начинает сам, всё равно выполняется, и у каждого бота свой поток."
+ "settings.threads.starter": "Starter запускает по одному потоку за раз на бота, а более крупный план запускает больше. Работа, которую бот начинает сам, всё равно выполняется, и у каждого бота свой поток.",
+ "settings.section.imageGeneration": "Генерация изображений",
+ "imageGen.intro": "Боты используют это, когда вы просите изображение в чате, и аватары ботов тоже. Резервный провайдер пробуется только если основной не смог запуститься: нет ключа, нет средств, превышен лимит или нет связи.",
+ "imageGen.status.ready": "Готово · изображения создаёт {provider}",
+ "imageGen.status.backupOnly": "Готово только с резервным · изображения создаёт {provider}",
+ "imageGen.status.notReady": "Не настроено · добавьте ключ для основного или резервного провайдера",
+ "imageGen.primary.label": "Основной провайдер",
+ "imageGen.primary.help": "Используется первым для каждого изображения.",
+ "imageGen.fallback.label": "Резервный провайдер",
+ "imageGen.fallback.help": "Используется, только если основной не смог запуститься.",
+ "imageGen.fallback.none": "Нет",
+ "imageGen.slot.needsKey": "Нужен ключ: добавьте его ниже.",
+ "imageGen.slot.needsConnection": "Нужны базовый URL и ID модели: добавьте их ниже.",
+ "imageGen.model.label": "Модель: {slot}",
+ "imageGen.model.placeholder": "ID модели",
+ "imageGen.maxPerTurn.label": "Изображений в ответе",
+ "imageGen.maxPerTurn.help": "Наибольшее число изображений, которое бот может создать в одном ответе.",
+ "imageGen.key.openai": "API-ключ OpenAI",
+ "imageGen.key.gemini": "API-ключ Gemini",
+ "imageGen.key.custom": "API-ключ своего сервиса изображений",
+ "imageGen.key.paste": "Вставьте API-ключ",
+ "imageGen.key.get": "Получить ключ",
+ "imageGen.key.saved": "Ключ сохранён",
+ "imageGen.key.missing": "Ключа пока нет",
+ "imageGen.key.optional": "Ключ необязателен",
+ "imageGen.key.sharedXai": "Это тот же ключ Grok (xAI), что и в разделе API-ключей; его используют и другие функции Grok. Подписка Grok не включает доступ к API.",
+ "imageGen.key.sharedOpenrouter": "Это тот же ключ OpenRouter, что и в разделе API-ключей; его используют и модели OpenRouter ваших ботов.",
+ "imageGen.key.manage": "Открыть API-ключи",
+ "imageGen.custom.url": "Базовый URL",
+ "imageGen.custom.help": "Любой OpenAI-совместимый Images API. localhost — это компьютер, на котором работает {app}.",
+ "botIdentity.ai.usingProvider": "Использует {provider}, как задано в разделе «Генерация изображений».",
+ "botIdentity.ai.noProvider": "Провайдер изображений ещё не настроен.",
+ "botIdentity.ai.openImageSettings": "Открыть настройки изображений",
+ "imageGen.key.xai": "API-ключ Grok (xAI)",
+ "imageGen.key.openrouter": "API-ключ OpenRouter"
}
diff --git a/src/locales/source-hashes.json b/src/locales/source-hashes.json
index 4eec79bd03..4c4e389d85 100644
--- a/src/locales/source-hashes.json
+++ b/src/locales/source-hashes.json
@@ -2832,7 +2832,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59"
},
"es": {
"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",
@@ -8554,7 +8588,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30"
},
"fr": {
"highlevel.unavailable": "87b8ac7f7610e6dd69f520bc59058fd92f307b9f4bcf804075f25d08bcaa7533",
@@ -11333,7 +11401,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59"
},
"hi": {
"highlevel.unavailable": "87b8ac7f7610e6dd69f520bc59058fd92f307b9f4bcf804075f25d08bcaa7533",
@@ -14112,7 +14214,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59"
},
"ja": {
"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",
@@ -19645,27 +19781,8 @@
"botIdentity.crop.rounded": "0a62cd800f27098e67ad0232c3648442a21795b2038a8e16c9a8f15424ded110",
"botIdentity.crop.square": "c11092bc0861591e9ce5d9a97e83d4fae3c6954a318977865fa85f5b3eeafda8",
"botIdentity.ai.generateWith": "0dbd8403738631379e917f1311d1c58261a83114f3749fb885dc9f2e8af4787d",
- "botIdentity.ai.provider": "45b2ecbc11b2ea3cb7aa7bbaa086f061f32a0b3a416cdfa050fe08e0e8185298",
- "botIdentity.ai.openaiHint": "290588644abbeaa91eb2235327ca5cf3d6ee29f5bab8e472ea51c1647f53752f",
- "botIdentity.ai.xaiHint": "f22e9bf2672607f712e94de4c81626c8d1f6d4e13492bd3d4c8beb314b240b86",
- "botIdentity.ai.customHint": "23837c54f4955191d8bc8f56509dca23571ed51bb403ae69655e44018bbcdedb",
- "botIdentity.ai.shared": "c86b88619b5f17d1151133f227a2c121add5ed457308fd871ab14fc27458c8f5",
"botIdentity.ai.generating": "d20a4476a0a85978547a5781e7e575e8358f102137bf253706db20ee0fe6061c",
"botIdentity.ai.generate": "ef312e379b25da818430bbc749c993a8d9b461d40d2b34fc2dcb4f6908146d28",
- "botIdentity.ai.baseUrl": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
- "botIdentity.ai.imageModel": "c1329b9fbe25eeb806af69fbffc373cd415e74ad8d05a087e8e36f34288777ec",
- "botIdentity.ai.optional": "ec91fdd9256cb75ae611249b50cb7eb16533f0fa91b86239ec1d439a1ea033b8",
- "botIdentity.ai.savedKey": "3fd11696b5a635ec03594969cdce54ed520013b69da504a695dcb80ef77b5114",
- "botIdentity.ai.keyless": "30754b8365e359328829aa4379b1d9eef2124da0efb7ab06ab94b85df88b874c",
- "botIdentity.ai.pasteKey": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
- "botIdentity.ai.removeKey": "946b51ef67af12f11f782e22c7ac6e1f9eea0f554892a7ad8b1c7ab8a022dcda",
- "botIdentity.ai.saveConnection": "df24ef128adf67e1234f0740ff776e366e48ebc3392d67c6fb5ade7ff1edb851",
- "botIdentity.ai.saveKey": "b6e0aef2a9f1eda5d44e17f83826029b93502e4c5efe98d56febf36fc8f3b45e",
- "botIdentity.ai.connectionSettings": "b4ddb3c1ca6cd2891d2cf028561f73bfc42aeadc8a4802c4d93ef913cd097a12",
- "botIdentity.ai.saveBeforeGenerate": "3932693b62e068600eb2a136fb39d7766973f4dbb15b247d01652ca0682a13e1",
- "botIdentity.ai.openaiKey": "3c83ff65e901256b1589d5a0755e7cd3e5aadba57d6368ae03af7e045343d8ed",
- "botIdentity.ai.xaiKey": "c721f285a7efaa90b3d97a62bb6752cf02b83fa9509d3c37e6355cd09137e37a",
- "botIdentity.ai.customKey": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
"botIdentity.ai.directionPlaceholder": "6b8be464d939b64495ffe2199e08c6988c0142402684fee16872c47c0aecad02",
"botIdentity.ai.directionLabel": "8390024003ec1356e41d189b9bfa2d6f220dd9b4d33ee3a90235efa732f95be0",
"botIdentity.soul.label": "fde4471e4fbff470202f0620dce0b8a558615a5b76222d88facd703e3cf0c55c",
@@ -20719,7 +20836,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30"
},
"pt-br": {
"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",
@@ -25975,27 +26126,8 @@
"botIdentity.crop.rounded": "0a62cd800f27098e67ad0232c3648442a21795b2038a8e16c9a8f15424ded110",
"botIdentity.crop.square": "c11092bc0861591e9ce5d9a97e83d4fae3c6954a318977865fa85f5b3eeafda8",
"botIdentity.ai.generateWith": "0dbd8403738631379e917f1311d1c58261a83114f3749fb885dc9f2e8af4787d",
- "botIdentity.ai.provider": "45b2ecbc11b2ea3cb7aa7bbaa086f061f32a0b3a416cdfa050fe08e0e8185298",
- "botIdentity.ai.openaiHint": "290588644abbeaa91eb2235327ca5cf3d6ee29f5bab8e472ea51c1647f53752f",
- "botIdentity.ai.xaiHint": "f22e9bf2672607f712e94de4c81626c8d1f6d4e13492bd3d4c8beb314b240b86",
- "botIdentity.ai.customHint": "23837c54f4955191d8bc8f56509dca23571ed51bb403ae69655e44018bbcdedb",
- "botIdentity.ai.shared": "c86b88619b5f17d1151133f227a2c121add5ed457308fd871ab14fc27458c8f5",
"botIdentity.ai.generating": "d20a4476a0a85978547a5781e7e575e8358f102137bf253706db20ee0fe6061c",
"botIdentity.ai.generate": "ef312e379b25da818430bbc749c993a8d9b461d40d2b34fc2dcb4f6908146d28",
- "botIdentity.ai.baseUrl": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
- "botIdentity.ai.imageModel": "c1329b9fbe25eeb806af69fbffc373cd415e74ad8d05a087e8e36f34288777ec",
- "botIdentity.ai.optional": "ec91fdd9256cb75ae611249b50cb7eb16533f0fa91b86239ec1d439a1ea033b8",
- "botIdentity.ai.savedKey": "3fd11696b5a635ec03594969cdce54ed520013b69da504a695dcb80ef77b5114",
- "botIdentity.ai.keyless": "30754b8365e359328829aa4379b1d9eef2124da0efb7ab06ab94b85df88b874c",
- "botIdentity.ai.pasteKey": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
- "botIdentity.ai.removeKey": "946b51ef67af12f11f782e22c7ac6e1f9eea0f554892a7ad8b1c7ab8a022dcda",
- "botIdentity.ai.saveConnection": "df24ef128adf67e1234f0740ff776e366e48ebc3392d67c6fb5ade7ff1edb851",
- "botIdentity.ai.saveKey": "b6e0aef2a9f1eda5d44e17f83826029b93502e4c5efe98d56febf36fc8f3b45e",
- "botIdentity.ai.connectionSettings": "b4ddb3c1ca6cd2891d2cf028561f73bfc42aeadc8a4802c4d93ef913cd097a12",
- "botIdentity.ai.saveBeforeGenerate": "3932693b62e068600eb2a136fb39d7766973f4dbb15b247d01652ca0682a13e1",
- "botIdentity.ai.openaiKey": "3c83ff65e901256b1589d5a0755e7cd3e5aadba57d6368ae03af7e045343d8ed",
- "botIdentity.ai.xaiKey": "c721f285a7efaa90b3d97a62bb6752cf02b83fa9509d3c37e6355cd09137e37a",
- "botIdentity.ai.customKey": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
"botIdentity.ai.directionPlaceholder": "6b8be464d939b64495ffe2199e08c6988c0142402684fee16872c47c0aecad02",
"botIdentity.ai.directionLabel": "8390024003ec1356e41d189b9bfa2d6f220dd9b4d33ee3a90235efa732f95be0",
"botIdentity.soul.label": "fde4471e4fbff470202f0620dce0b8a558615a5b76222d88facd703e3cf0c55c",
@@ -27120,7 +27252,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30"
},
"zh": {
"highlevel.unavailable": "87b8ac7f7610e6dd69f520bc59058fd92f307b9f4bcf804075f25d08bcaa7533",
@@ -33976,27 +34142,8 @@
"botIdentity.crop.rounded": "0a62cd800f27098e67ad0232c3648442a21795b2038a8e16c9a8f15424ded110",
"botIdentity.crop.square": "c11092bc0861591e9ce5d9a97e83d4fae3c6954a318977865fa85f5b3eeafda8",
"botIdentity.ai.generateWith": "0dbd8403738631379e917f1311d1c58261a83114f3749fb885dc9f2e8af4787d",
- "botIdentity.ai.provider": "45b2ecbc11b2ea3cb7aa7bbaa086f061f32a0b3a416cdfa050fe08e0e8185298",
- "botIdentity.ai.openaiHint": "290588644abbeaa91eb2235327ca5cf3d6ee29f5bab8e472ea51c1647f53752f",
- "botIdentity.ai.xaiHint": "f22e9bf2672607f712e94de4c81626c8d1f6d4e13492bd3d4c8beb314b240b86",
- "botIdentity.ai.customHint": "23837c54f4955191d8bc8f56509dca23571ed51bb403ae69655e44018bbcdedb",
- "botIdentity.ai.shared": "c86b88619b5f17d1151133f227a2c121add5ed457308fd871ab14fc27458c8f5",
"botIdentity.ai.generating": "d20a4476a0a85978547a5781e7e575e8358f102137bf253706db20ee0fe6061c",
"botIdentity.ai.generate": "ef312e379b25da818430bbc749c993a8d9b461d40d2b34fc2dcb4f6908146d28",
- "botIdentity.ai.baseUrl": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
- "botIdentity.ai.imageModel": "c1329b9fbe25eeb806af69fbffc373cd415e74ad8d05a087e8e36f34288777ec",
- "botIdentity.ai.optional": "ec91fdd9256cb75ae611249b50cb7eb16533f0fa91b86239ec1d439a1ea033b8",
- "botIdentity.ai.savedKey": "3fd11696b5a635ec03594969cdce54ed520013b69da504a695dcb80ef77b5114",
- "botIdentity.ai.keyless": "30754b8365e359328829aa4379b1d9eef2124da0efb7ab06ab94b85df88b874c",
- "botIdentity.ai.pasteKey": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
- "botIdentity.ai.removeKey": "946b51ef67af12f11f782e22c7ac6e1f9eea0f554892a7ad8b1c7ab8a022dcda",
- "botIdentity.ai.saveConnection": "df24ef128adf67e1234f0740ff776e366e48ebc3392d67c6fb5ade7ff1edb851",
- "botIdentity.ai.saveKey": "b6e0aef2a9f1eda5d44e17f83826029b93502e4c5efe98d56febf36fc8f3b45e",
- "botIdentity.ai.connectionSettings": "b4ddb3c1ca6cd2891d2cf028561f73bfc42aeadc8a4802c4d93ef913cd097a12",
- "botIdentity.ai.saveBeforeGenerate": "3932693b62e068600eb2a136fb39d7766973f4dbb15b247d01652ca0682a13e1",
- "botIdentity.ai.openaiKey": "3c83ff65e901256b1589d5a0755e7cd3e5aadba57d6368ae03af7e045343d8ed",
- "botIdentity.ai.xaiKey": "c721f285a7efaa90b3d97a62bb6752cf02b83fa9509d3c37e6355cd09137e37a",
- "botIdentity.ai.customKey": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
"botIdentity.ai.directionPlaceholder": "6b8be464d939b64495ffe2199e08c6988c0142402684fee16872c47c0aecad02",
"botIdentity.ai.directionLabel": "8390024003ec1356e41d189b9bfa2d6f220dd9b4d33ee3a90235efa732f95be0",
"botIdentity.soul.label": "fde4471e4fbff470202f0620dce0b8a558615a5b76222d88facd703e3cf0c55c",
@@ -34427,7 +34574,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59"
},
"zh-tw": {
"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",
@@ -39032,7 +39213,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59"
},
"uk": {
"highlevel.unavailable": "87b8ac7f7610e6dd69f520bc59058fd92f307b9f4bcf804075f25d08bcaa7533",
@@ -42252,7 +42467,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59"
},
"vi": {
"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",
@@ -47465,7 +47714,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30"
},
"tr": {
"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",
@@ -52678,7 +52961,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30"
},
"pl": {
"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",
@@ -58133,27 +58450,8 @@
"botIdentity.crop.rounded": "0a62cd800f27098e67ad0232c3648442a21795b2038a8e16c9a8f15424ded110",
"botIdentity.crop.square": "c11092bc0861591e9ce5d9a97e83d4fae3c6954a318977865fa85f5b3eeafda8",
"botIdentity.ai.generateWith": "0dbd8403738631379e917f1311d1c58261a83114f3749fb885dc9f2e8af4787d",
- "botIdentity.ai.provider": "45b2ecbc11b2ea3cb7aa7bbaa086f061f32a0b3a416cdfa050fe08e0e8185298",
- "botIdentity.ai.openaiHint": "290588644abbeaa91eb2235327ca5cf3d6ee29f5bab8e472ea51c1647f53752f",
- "botIdentity.ai.xaiHint": "f22e9bf2672607f712e94de4c81626c8d1f6d4e13492bd3d4c8beb314b240b86",
- "botIdentity.ai.customHint": "23837c54f4955191d8bc8f56509dca23571ed51bb403ae69655e44018bbcdedb",
- "botIdentity.ai.shared": "c86b88619b5f17d1151133f227a2c121add5ed457308fd871ab14fc27458c8f5",
"botIdentity.ai.generating": "d20a4476a0a85978547a5781e7e575e8358f102137bf253706db20ee0fe6061c",
"botIdentity.ai.generate": "ef312e379b25da818430bbc749c993a8d9b461d40d2b34fc2dcb4f6908146d28",
- "botIdentity.ai.baseUrl": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
- "botIdentity.ai.imageModel": "c1329b9fbe25eeb806af69fbffc373cd415e74ad8d05a087e8e36f34288777ec",
- "botIdentity.ai.optional": "ec91fdd9256cb75ae611249b50cb7eb16533f0fa91b86239ec1d439a1ea033b8",
- "botIdentity.ai.savedKey": "3fd11696b5a635ec03594969cdce54ed520013b69da504a695dcb80ef77b5114",
- "botIdentity.ai.keyless": "30754b8365e359328829aa4379b1d9eef2124da0efb7ab06ab94b85df88b874c",
- "botIdentity.ai.pasteKey": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
- "botIdentity.ai.removeKey": "946b51ef67af12f11f782e22c7ac6e1f9eea0f554892a7ad8b1c7ab8a022dcda",
- "botIdentity.ai.saveConnection": "df24ef128adf67e1234f0740ff776e366e48ebc3392d67c6fb5ade7ff1edb851",
- "botIdentity.ai.saveKey": "b6e0aef2a9f1eda5d44e17f83826029b93502e4c5efe98d56febf36fc8f3b45e",
- "botIdentity.ai.connectionSettings": "b4ddb3c1ca6cd2891d2cf028561f73bfc42aeadc8a4802c4d93ef913cd097a12",
- "botIdentity.ai.saveBeforeGenerate": "3932693b62e068600eb2a136fb39d7766973f4dbb15b247d01652ca0682a13e1",
- "botIdentity.ai.openaiKey": "3c83ff65e901256b1589d5a0755e7cd3e5aadba57d6368ae03af7e045343d8ed",
- "botIdentity.ai.xaiKey": "c721f285a7efaa90b3d97a62bb6752cf02b83fa9509d3c37e6355cd09137e37a",
- "botIdentity.ai.customKey": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
"botIdentity.ai.directionPlaceholder": "6b8be464d939b64495ffe2199e08c6988c0142402684fee16872c47c0aecad02",
"botIdentity.ai.directionLabel": "8390024003ec1356e41d189b9bfa2d6f220dd9b4d33ee3a90235efa732f95be0",
"botIdentity.soul.label": "fde4471e4fbff470202f0620dce0b8a558615a5b76222d88facd703e3cf0c55c",
@@ -59201,7 +59499,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30"
},
"ru": {
"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",
@@ -64794,27 +65126,8 @@
"botIdentity.crop.rounded": "0a62cd800f27098e67ad0232c3648442a21795b2038a8e16c9a8f15424ded110",
"botIdentity.crop.square": "c11092bc0861591e9ce5d9a97e83d4fae3c6954a318977865fa85f5b3eeafda8",
"botIdentity.ai.generateWith": "0dbd8403738631379e917f1311d1c58261a83114f3749fb885dc9f2e8af4787d",
- "botIdentity.ai.provider": "45b2ecbc11b2ea3cb7aa7bbaa086f061f32a0b3a416cdfa050fe08e0e8185298",
- "botIdentity.ai.openaiHint": "290588644abbeaa91eb2235327ca5cf3d6ee29f5bab8e472ea51c1647f53752f",
- "botIdentity.ai.xaiHint": "f22e9bf2672607f712e94de4c81626c8d1f6d4e13492bd3d4c8beb314b240b86",
- "botIdentity.ai.customHint": "23837c54f4955191d8bc8f56509dca23571ed51bb403ae69655e44018bbcdedb",
- "botIdentity.ai.shared": "c86b88619b5f17d1151133f227a2c121add5ed457308fd871ab14fc27458c8f5",
"botIdentity.ai.generating": "d20a4476a0a85978547a5781e7e575e8358f102137bf253706db20ee0fe6061c",
"botIdentity.ai.generate": "ef312e379b25da818430bbc749c993a8d9b461d40d2b34fc2dcb4f6908146d28",
- "botIdentity.ai.baseUrl": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
- "botIdentity.ai.imageModel": "c1329b9fbe25eeb806af69fbffc373cd415e74ad8d05a087e8e36f34288777ec",
- "botIdentity.ai.optional": "ec91fdd9256cb75ae611249b50cb7eb16533f0fa91b86239ec1d439a1ea033b8",
- "botIdentity.ai.savedKey": "3fd11696b5a635ec03594969cdce54ed520013b69da504a695dcb80ef77b5114",
- "botIdentity.ai.keyless": "30754b8365e359328829aa4379b1d9eef2124da0efb7ab06ab94b85df88b874c",
- "botIdentity.ai.pasteKey": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
- "botIdentity.ai.removeKey": "946b51ef67af12f11f782e22c7ac6e1f9eea0f554892a7ad8b1c7ab8a022dcda",
- "botIdentity.ai.saveConnection": "df24ef128adf67e1234f0740ff776e366e48ebc3392d67c6fb5ade7ff1edb851",
- "botIdentity.ai.saveKey": "b6e0aef2a9f1eda5d44e17f83826029b93502e4c5efe98d56febf36fc8f3b45e",
- "botIdentity.ai.connectionSettings": "b4ddb3c1ca6cd2891d2cf028561f73bfc42aeadc8a4802c4d93ef913cd097a12",
- "botIdentity.ai.saveBeforeGenerate": "3932693b62e068600eb2a136fb39d7766973f4dbb15b247d01652ca0682a13e1",
- "botIdentity.ai.openaiKey": "3c83ff65e901256b1589d5a0755e7cd3e5aadba57d6368ae03af7e045343d8ed",
- "botIdentity.ai.xaiKey": "c721f285a7efaa90b3d97a62bb6752cf02b83fa9509d3c37e6355cd09137e37a",
- "botIdentity.ai.customKey": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
"botIdentity.ai.directionPlaceholder": "6b8be464d939b64495ffe2199e08c6988c0142402684fee16872c47c0aecad02",
"botIdentity.ai.directionLabel": "8390024003ec1356e41d189b9bfa2d6f220dd9b4d33ee3a90235efa732f95be0",
"botIdentity.soul.label": "fde4471e4fbff470202f0620dce0b8a558615a5b76222d88facd703e3cf0c55c",
@@ -65786,7 +66099,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30"
},
"it": {
"whop.description": "1a07cf04ef17029448d3781415cbac16d54e66b821907a40d94e0e6349710e70",
@@ -71194,27 +71541,8 @@
"botIdentity.crop.rounded": "0a62cd800f27098e67ad0232c3648442a21795b2038a8e16c9a8f15424ded110",
"botIdentity.crop.square": "c11092bc0861591e9ce5d9a97e83d4fae3c6954a318977865fa85f5b3eeafda8",
"botIdentity.ai.generateWith": "0dbd8403738631379e917f1311d1c58261a83114f3749fb885dc9f2e8af4787d",
- "botIdentity.ai.provider": "45b2ecbc11b2ea3cb7aa7bbaa086f061f32a0b3a416cdfa050fe08e0e8185298",
- "botIdentity.ai.openaiHint": "290588644abbeaa91eb2235327ca5cf3d6ee29f5bab8e472ea51c1647f53752f",
- "botIdentity.ai.xaiHint": "f22e9bf2672607f712e94de4c81626c8d1f6d4e13492bd3d4c8beb314b240b86",
- "botIdentity.ai.customHint": "23837c54f4955191d8bc8f56509dca23571ed51bb403ae69655e44018bbcdedb",
- "botIdentity.ai.shared": "c86b88619b5f17d1151133f227a2c121add5ed457308fd871ab14fc27458c8f5",
"botIdentity.ai.generating": "d20a4476a0a85978547a5781e7e575e8358f102137bf253706db20ee0fe6061c",
"botIdentity.ai.generate": "ef312e379b25da818430bbc749c993a8d9b461d40d2b34fc2dcb4f6908146d28",
- "botIdentity.ai.baseUrl": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
- "botIdentity.ai.imageModel": "c1329b9fbe25eeb806af69fbffc373cd415e74ad8d05a087e8e36f34288777ec",
- "botIdentity.ai.optional": "ec91fdd9256cb75ae611249b50cb7eb16533f0fa91b86239ec1d439a1ea033b8",
- "botIdentity.ai.savedKey": "3fd11696b5a635ec03594969cdce54ed520013b69da504a695dcb80ef77b5114",
- "botIdentity.ai.keyless": "30754b8365e359328829aa4379b1d9eef2124da0efb7ab06ab94b85df88b874c",
- "botIdentity.ai.pasteKey": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
- "botIdentity.ai.removeKey": "946b51ef67af12f11f782e22c7ac6e1f9eea0f554892a7ad8b1c7ab8a022dcda",
- "botIdentity.ai.saveConnection": "df24ef128adf67e1234f0740ff776e366e48ebc3392d67c6fb5ade7ff1edb851",
- "botIdentity.ai.saveKey": "b6e0aef2a9f1eda5d44e17f83826029b93502e4c5efe98d56febf36fc8f3b45e",
- "botIdentity.ai.connectionSettings": "b4ddb3c1ca6cd2891d2cf028561f73bfc42aeadc8a4802c4d93ef913cd097a12",
- "botIdentity.ai.saveBeforeGenerate": "3932693b62e068600eb2a136fb39d7766973f4dbb15b247d01652ca0682a13e1",
- "botIdentity.ai.openaiKey": "3c83ff65e901256b1589d5a0755e7cd3e5aadba57d6368ae03af7e045343d8ed",
- "botIdentity.ai.xaiKey": "c721f285a7efaa90b3d97a62bb6752cf02b83fa9509d3c37e6355cd09137e37a",
- "botIdentity.ai.customKey": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
"botIdentity.ai.directionPlaceholder": "6b8be464d939b64495ffe2199e08c6988c0142402684fee16872c47c0aecad02",
"botIdentity.ai.directionLabel": "8390024003ec1356e41d189b9bfa2d6f220dd9b4d33ee3a90235efa732f95be0",
"botIdentity.soul.label": "fde4471e4fbff470202f0620dce0b8a558615a5b76222d88facd703e3cf0c55c",
@@ -72169,7 +72497,41 @@
"server.browser.stoppedWaiting": "0c6d8041de6e6077f9be0ddaddeebe4457e29a1231de7aa6a8b9288704e5ccb2",
"composer.queued.capacityStarter": "b04ed386a880964a1438f12746471df1a3f2dd4894ca97dcb3fbd22b1834da88",
"composer.queued.seePlans": "d989893356eeff0f22804648f79ee465c509800917fe8d64ec31ab5aa6557220",
- "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f"
+ "settings.threads.starter": "8837e4531b35bb772dcbdd6067cf3a494bca815a6620e7319bd01d9af0e1574f",
+ "imageGen.slot.needsKey": "c041ccad8c12e4cb37f9212230e71e7526c81b313b6a935b059962eab012d6d8",
+ "imageGen.fallback.help": "e6818c4795cdf0c62449e1406716e390b4037f633a151bb00207ea523b0af83a",
+ "botIdentity.ai.openImageSettings": "2ea2e5c8b7a855d5df52664a4d4c7178266afef14dba4cc58c5208d91cc140f9",
+ "imageGen.key.missing": "395c854050cd9736dfaee44d4b1cde63d23af5b432db5bceaa81a3796f9b13ce",
+ "imageGen.key.gemini": "88774da5d424f1506de2317bc38d40fcefa789e724144d2211dbb9fb458161f9",
+ "imageGen.key.optional": "459ce3dacd19c2bf5685f359dbbbb01556a77e0f6069bf0113936444a8a9d32c",
+ "imageGen.slot.needsConnection": "f9d19d203f8d17b5aa7d15e12f5deaa083b2901ed333789e6d12f7f9a1b544db",
+ "imageGen.status.backupOnly": "4f0d13c69ed4d5174776f1810c3320ebc78f7fbae6b899f7c6b0a129e19ecd0b",
+ "imageGen.fallback.none": "dc937b59892604f5a86ac96936cd7ff09e25f18ae6b758e8014a24c7fa039e91",
+ "imageGen.key.sharedXai": "cfdeabf7435956266b696a86530170f43f7fae8f1fe12fbf0feb984cd1fd9ada",
+ "settings.section.imageGeneration": "23386aba30abf4fa16349636f599485d3de88c6e50f3eed23d8f3ba57d27535d",
+ "imageGen.key.openrouter": "89616b71606749cb60ff685a8d3a659868399545345331bed992a755e5c9e2c4",
+ "imageGen.maxPerTurn.label": "ba03ea4ab5445191d4ebf441d106433afc7197813785890af574a63eaffb0b59",
+ "imageGen.key.saved": "a45a97cbb78083f29f16e56d779178c4e2c6d3f5b05398983006e86cc404a960",
+ "imageGen.key.paste": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
+ "imageGen.key.xai": "a0e3fcfec16e8ce6b63f370d15d185f7503f5fe7f141cbe2490ee41d9d32f8ee",
+ "imageGen.model.label": "54ff461678cf4827512e856d92f6acca8f9460ce7312171dfec31f508defd996",
+ "imageGen.primary.help": "cc6168045481d9704926db339f532dec218726130ba9df0388581dac0d57b690",
+ "imageGen.key.manage": "3bde85282febbce927de815dbea17b921ecdff743bf2460b9f892b692078dbe7",
+ "imageGen.fallback.label": "75f924a169145a90c7681a08f975e4811cecafd3d9857c4350216f35d36e8892",
+ "imageGen.key.sharedOpenrouter": "d0b754f59eb61425478e046a1e6a2472835dd20acdd3cd10dd5990cc4bc02591",
+ "imageGen.key.get": "36d2f296e03d65fd53dedf77b0f1e994db6e4f58d6ceacd9a345eda4feca8665",
+ "imageGen.status.ready": "480d117f1a91a8bb7ae47cde9780fb2b70043d77c8f23069fb52d45d02bf9ee7",
+ "imageGen.model.placeholder": "089ef2b6dbb34fa9bb82acd6a7a001bf8859980102e4b39463bc39a9a0819491",
+ "imageGen.status.notReady": "9814ad45ef0a718ec4ef5aec1319634c4328fca722de9bec565cab6f460628b2",
+ "imageGen.key.openai": "51aa8bdcedfdb0c9eefbf91a6fa25d78b4c367be285bd472553cc0b461d983c8",
+ "imageGen.intro": "2424af0c79fa679764e5c0455c905258c48290c62c558e12e348ad4edf60e3ac",
+ "imageGen.custom.url": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
+ "imageGen.primary.label": "f4e9c2ccaf9ef7cc69a98ba475f05c97a259c053929d658894a4d7741615ad93",
+ "imageGen.maxPerTurn.help": "3c7c43a0ad1482cc0ea541a452c334ee219a90d7ebb190f859bb99fa497f9c47",
+ "botIdentity.ai.usingProvider": "88960c4130b2345fc11f6978c42781083da626210ca7c6dc5f3316504313ea62",
+ "imageGen.custom.help": "0bc1c604947963649ac05fd4b036db04101d552dcaa30b8ef3daef55c9b1eae5",
+ "botIdentity.ai.noProvider": "ede7cf429355234ab1d95a518637f6ed3b7bba675d950f7272e21f7a55225352",
+ "imageGen.key.custom": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30"
},
"ko": {
"connectedWorkspaces.localTitle": "7d6deafeab011d734c3fdd1bfd6f69544fbb746a004019269bdb48544b01164b",
@@ -78458,27 +78820,8 @@
"botIdentity.crop.rounded": "0a62cd800f27098e67ad0232c3648442a21795b2038a8e16c9a8f15424ded110",
"botIdentity.crop.square": "c11092bc0861591e9ce5d9a97e83d4fae3c6954a318977865fa85f5b3eeafda8",
"botIdentity.ai.generateWith": "0dbd8403738631379e917f1311d1c58261a83114f3749fb885dc9f2e8af4787d",
- "botIdentity.ai.provider": "45b2ecbc11b2ea3cb7aa7bbaa086f061f32a0b3a416cdfa050fe08e0e8185298",
- "botIdentity.ai.openaiHint": "290588644abbeaa91eb2235327ca5cf3d6ee29f5bab8e472ea51c1647f53752f",
- "botIdentity.ai.xaiHint": "f22e9bf2672607f712e94de4c81626c8d1f6d4e13492bd3d4c8beb314b240b86",
- "botIdentity.ai.customHint": "23837c54f4955191d8bc8f56509dca23571ed51bb403ae69655e44018bbcdedb",
- "botIdentity.ai.shared": "c86b88619b5f17d1151133f227a2c121add5ed457308fd871ab14fc27458c8f5",
"botIdentity.ai.generating": "d20a4476a0a85978547a5781e7e575e8358f102137bf253706db20ee0fe6061c",
"botIdentity.ai.generate": "ef312e379b25da818430bbc749c993a8d9b461d40d2b34fc2dcb4f6908146d28",
- "botIdentity.ai.baseUrl": "70589413a3c9793339fcf764276727ac652fa7dfe2f15fb5671251303a52ca49",
- "botIdentity.ai.imageModel": "c1329b9fbe25eeb806af69fbffc373cd415e74ad8d05a087e8e36f34288777ec",
- "botIdentity.ai.optional": "ec91fdd9256cb75ae611249b50cb7eb16533f0fa91b86239ec1d439a1ea033b8",
- "botIdentity.ai.savedKey": "3fd11696b5a635ec03594969cdce54ed520013b69da504a695dcb80ef77b5114",
- "botIdentity.ai.keyless": "30754b8365e359328829aa4379b1d9eef2124da0efb7ab06ab94b85df88b874c",
- "botIdentity.ai.pasteKey": "8358f1f0a95beda918848d2d18effd58f6480ae594c340d8cc6078edce7e5189",
- "botIdentity.ai.removeKey": "946b51ef67af12f11f782e22c7ac6e1f9eea0f554892a7ad8b1c7ab8a022dcda",
- "botIdentity.ai.saveConnection": "df24ef128adf67e1234f0740ff776e366e48ebc3392d67c6fb5ade7ff1edb851",
- "botIdentity.ai.saveKey": "b6e0aef2a9f1eda5d44e17f83826029b93502e4c5efe98d56febf36fc8f3b45e",
- "botIdentity.ai.connectionSettings": "b4ddb3c1ca6cd2891d2cf028561f73bfc42aeadc8a4802c4d93ef913cd097a12",
- "botIdentity.ai.saveBeforeGenerate": "3932693b62e068600eb2a136fb39d7766973f4dbb15b247d01652ca0682a13e1",
- "botIdentity.ai.openaiKey": "3c83ff65e901256b1589d5a0755e7cd3e5aadba57d6368ae03af7e045343d8ed",
- "botIdentity.ai.xaiKey": "c721f285a7efaa90b3d97a62bb6752cf02b83fa9509d3c37e6355cd09137e37a",
- "botIdentity.ai.customKey": "fad63e62cd6b4dc5329c7f67b0d0fbd164c33b2769ff19e0dfb56a78a0a6df30",
"botIdentity.ai.directionPlaceholder": "6b8be464d939b64495ffe2199e08c6988c0142402684fee16872c47c0aecad02",
"botIdentity.ai.directionLabel": "8390024003ec1356e41d189b9bfa2d6f220dd9b4d33ee3a90235efa732f95be0",
"botIdentity.soul.label": "fde4471e4fbff470202f0620dce0b8a558615a5b76222d88facd703e3cf0c55c",
diff --git a/src/locales/tr.json b/src/locales/tr.json
index 014e35f861..cdfa0b01e6 100644
--- a/src/locales/tr.json
+++ b/src/locales/tr.json
@@ -5208,5 +5208,39 @@
"server.browser.stoppedWaiting": "Tarayıcı beklemesi durduruldu.",
"composer.queued.capacityStarter": "Sırada. Starter, bot başına aynı anda bir konu çalıştırır; bu, çalışan bitince başlar. Daha büyük bir plan daha fazlasını çalıştırır.",
"composer.queued.seePlans": "Planları gör",
- "settings.threads.starter": "Starter, bot başına aynı anda bir konu çalıştırır, daha büyük bir plan daha fazlasını çalıştırır. Botun kendi başlattığı iş yine çalışır ve her botun kendi konusu vardır."
+ "settings.threads.starter": "Starter, bot başına aynı anda bir konu çalıştırır, daha büyük bir plan daha fazlasını çalıştırır. Botun kendi başlattığı iş yine çalışır ve her botun kendi konusu vardır.",
+ "settings.section.imageGeneration": "Görsel oluşturma",
+ "imageGen.intro": "Botlar, bir sohbette görsel istediğinizde bunu kullanır; bot avatarları da kullanır. Yedek sağlayıcı yalnızca ana sağlayıcı başlayamadığında denenir: anahtar yok, kredi yok, hız sınırı veya erişilemiyor.",
+ "imageGen.status.ready": "Hazır · görseller {provider} ile oluşturulur",
+ "imageGen.status.backupOnly": "Yalnızca yedekle hazır · görseller {provider} ile oluşturulur",
+ "imageGen.status.notReady": "Ayarlanmadı · ana veya yedek sağlayıcı için bir anahtar ekleyin",
+ "imageGen.primary.label": "Ana sağlayıcı",
+ "imageGen.primary.help": "Her görsel için önce bu kullanılır.",
+ "imageGen.fallback.label": "Yedek sağlayıcı",
+ "imageGen.fallback.help": "Yalnızca ana sağlayıcı başlayamadığında kullanılır.",
+ "imageGen.fallback.none": "Yok",
+ "imageGen.slot.needsKey": "Anahtar gerekli: aşağıya ekleyin.",
+ "imageGen.slot.needsConnection": "Temel URL ve model kimliği gerekli: aşağıya ekleyin.",
+ "imageGen.model.label": "{slot} modeli",
+ "imageGen.model.placeholder": "Model kimliği",
+ "imageGen.maxPerTurn.label": "Yanıt başına görsel",
+ "imageGen.maxPerTurn.help": "Bir botun tek yanıtta oluşturabileceği en fazla görsel sayısı.",
+ "imageGen.key.openai": "OpenAI API anahtarı",
+ "imageGen.key.gemini": "Gemini API anahtarı",
+ "imageGen.key.custom": "Özel görsel API anahtarı",
+ "imageGen.key.paste": "API anahtarını yapıştırın",
+ "imageGen.key.get": "Anahtar al",
+ "imageGen.key.saved": "Anahtar kaydedildi",
+ "imageGen.key.missing": "Henüz anahtar yok",
+ "imageGen.key.optional": "Anahtar isteğe bağlı",
+ "imageGen.key.sharedXai": "API anahtarları bölümündeki Grok (xAI) anahtarının aynısıdır; diğer Grok özellikleri de kullanır. Grok aboneliği API erişimi içermez.",
+ "imageGen.key.sharedOpenrouter": "API anahtarları bölümündeki OpenRouter anahtarının aynısıdır; botlarınızın OpenRouter modelleri de kullanır.",
+ "imageGen.key.manage": "API anahtarlarını aç",
+ "imageGen.custom.url": "Temel URL",
+ "imageGen.custom.help": "OpenAI uyumlu herhangi bir Images API. localhost, {app}'u çalıştıran bilgisayardır.",
+ "botIdentity.ai.usingProvider": "Görsel oluşturma bölümünde ayarlandığı gibi {provider} kullanır.",
+ "botIdentity.ai.noProvider": "Henüz bir görsel sağlayıcı ayarlanmadı.",
+ "botIdentity.ai.openImageSettings": "Görsel ayarlarını aç",
+ "imageGen.key.xai": "Grok (xAI) API anahtarı",
+ "imageGen.key.openrouter": "OpenRouter API anahtarı"
}
diff --git a/src/locales/uk.json b/src/locales/uk.json
index 14c34fd934..bbc28a0429 100644
--- a/src/locales/uk.json
+++ b/src/locales/uk.json
@@ -3216,5 +3216,39 @@
"server.browser.stoppedWaiting": "Очікування браузера припинено.",
"composer.queued.capacityStarter": "У черзі. Starter запускає по одному потоку за раз на бота, тож цей почнеться, коли завершиться поточний. Більший план запускає більше.",
"composer.queued.seePlans": "Переглянути плани",
- "settings.threads.starter": "Starter запускає по одному потоку за раз на бота, а більший план запускає більше. Робота, яку бот починає сам, усе одно виконується, і кожен бот має свій потік."
+ "settings.threads.starter": "Starter запускає по одному потоку за раз на бота, а більший план запускає більше. Робота, яку бот починає сам, усе одно виконується, і кожен бот має свій потік.",
+ "settings.section.imageGeneration": "Генерація зображень",
+ "imageGen.intro": "Боти використовують це, коли ви просите зображення в чаті, і аватари ботів теж. Резервний провайдер пробується лише якщо основний не зміг запуститися: немає ключа, немає коштів, перевищено ліміт або немає зв'язку.",
+ "imageGen.status.ready": "Готово · зображення створює {provider}",
+ "imageGen.status.backupOnly": "Готово лише з резервним · зображення створює {provider}",
+ "imageGen.status.notReady": "Не налаштовано · додайте ключ для основного або резервного провайдера",
+ "imageGen.primary.label": "Основний провайдер",
+ "imageGen.primary.help": "Використовується першим для кожного зображення.",
+ "imageGen.fallback.label": "Резервний провайдер",
+ "imageGen.fallback.help": "Використовується лише якщо основний не зміг запуститися.",
+ "imageGen.fallback.none": "Немає",
+ "imageGen.slot.needsKey": "Потрібен ключ: додайте його нижче.",
+ "imageGen.slot.needsConnection": "Потрібні базовий URL і ID моделі: додайте їх нижче.",
+ "imageGen.model.label": "Модель: {slot}",
+ "imageGen.model.placeholder": "ID моделі",
+ "imageGen.maxPerTurn.label": "Зображень у відповіді",
+ "imageGen.maxPerTurn.help": "Найбільша кількість зображень, яку бот може створити в одній відповіді.",
+ "imageGen.key.openai": "API-ключ OpenAI",
+ "imageGen.key.gemini": "API-ключ Gemini",
+ "imageGen.key.custom": "API-ключ власного сервісу зображень",
+ "imageGen.key.paste": "Вставте API-ключ",
+ "imageGen.key.get": "Отримати ключ",
+ "imageGen.key.saved": "Ключ збережено",
+ "imageGen.key.missing": "Ключа ще немає",
+ "imageGen.key.optional": "Ключ необов'язковий",
+ "imageGen.key.sharedXai": "Це той самий ключ Grok (xAI), що й у розділі API-ключів; його використовують і інші функції Grok. Підписка Grok не містить доступу до API.",
+ "imageGen.key.sharedOpenrouter": "Це той самий ключ OpenRouter, що й у розділі API-ключів; його використовують і моделі OpenRouter ваших ботів.",
+ "imageGen.key.manage": "Відкрити API-ключі",
+ "imageGen.custom.url": "Базовий URL",
+ "imageGen.custom.help": "Будь-який OpenAI-сумісний Images API. localhost — це комп'ютер, на якому працює {app}.",
+ "botIdentity.ai.usingProvider": "Використовує {provider}, як задано в розділі «Генерація зображень».",
+ "botIdentity.ai.noProvider": "Провайдер зображень ще не налаштовано.",
+ "botIdentity.ai.openImageSettings": "Відкрити налаштування зображень",
+ "imageGen.key.xai": "API-ключ Grok (xAI)",
+ "imageGen.key.openrouter": "API-ключ OpenRouter"
}
diff --git a/src/locales/vi.json b/src/locales/vi.json
index a5dde251bb..c9c8895a91 100644
--- a/src/locales/vi.json
+++ b/src/locales/vi.json
@@ -5208,5 +5208,39 @@
"server.browser.stoppedWaiting": "Đã dừng chờ trình duyệt.",
"composer.queued.capacityStarter": "Đang xếp hàng. Starter chạy mỗi bot một luồng một lúc, nên luồng này bắt đầu khi luồng đang chạy xong. Gói lớn hơn chạy được nhiều hơn.",
"composer.queued.seePlans": "Xem các gói",
- "settings.threads.starter": "Starter chạy mỗi bot một luồng một lúc, gói lớn hơn chạy được nhiều hơn. Việc do bot tự bắt đầu vẫn chạy, và mỗi bot có luồng riêng."
+ "settings.threads.starter": "Starter chạy mỗi bot một luồng một lúc, gói lớn hơn chạy được nhiều hơn. Việc do bot tự bắt đầu vẫn chạy, và mỗi bot có luồng riêng.",
+ "settings.section.imageGeneration": "Tạo ảnh",
+ "imageGen.intro": "Bot dùng mục này khi bạn nhờ tạo ảnh trong trò chuyện, và ảnh đại diện của bot cũng vậy. Nhà cung cấp dự phòng chỉ được thử khi nhà cung cấp chính không khởi động được: không có khóa, hết tín dụng, bị giới hạn tốc độ hoặc không truy cập được.",
+ "imageGen.status.ready": "Sẵn sàng · ảnh được tạo bằng {provider}",
+ "imageGen.status.backupOnly": "Chỉ sẵn sàng với dự phòng · ảnh được tạo bằng {provider}",
+ "imageGen.status.notReady": "Chưa thiết lập · thêm khóa cho nhà cung cấp chính hoặc dự phòng",
+ "imageGen.primary.label": "Nhà cung cấp chính",
+ "imageGen.primary.help": "Được dùng trước cho mọi ảnh.",
+ "imageGen.fallback.label": "Nhà cung cấp dự phòng",
+ "imageGen.fallback.help": "Chỉ dùng khi nhà cung cấp chính không khởi động được.",
+ "imageGen.fallback.none": "Không có",
+ "imageGen.slot.needsKey": "Cần một khóa: thêm ở bên dưới.",
+ "imageGen.slot.needsConnection": "Cần URL gốc và ID mô hình: thêm ở bên dưới.",
+ "imageGen.model.label": "Mô hình của {slot}",
+ "imageGen.model.placeholder": "ID mô hình",
+ "imageGen.maxPerTurn.label": "Số ảnh mỗi câu trả lời",
+ "imageGen.maxPerTurn.help": "Số ảnh tối đa một bot có thể tạo trong một câu trả lời.",
+ "imageGen.key.openai": "Khóa API OpenAI",
+ "imageGen.key.gemini": "Khóa API Gemini",
+ "imageGen.key.custom": "Khóa API ảnh tùy chỉnh",
+ "imageGen.key.paste": "Dán khóa API",
+ "imageGen.key.get": "Lấy khóa",
+ "imageGen.key.saved": "Đã lưu khóa",
+ "imageGen.key.missing": "Chưa có khóa",
+ "imageGen.key.optional": "Khóa không bắt buộc",
+ "imageGen.key.sharedXai": "Đây là cùng khóa Grok (xAI) trong mục Khóa API, cũng được các tính năng Grok khác dùng. Gói Grok không bao gồm quyền truy cập API.",
+ "imageGen.key.sharedOpenrouter": "Đây là cùng khóa OpenRouter trong mục Khóa API, cũng được các mô hình OpenRouter của bot dùng.",
+ "imageGen.key.manage": "Mở Khóa API",
+ "imageGen.custom.url": "URL gốc",
+ "imageGen.custom.help": "Bất kỳ Images API nào tương thích OpenAI. localhost là máy tính đang chạy {app}.",
+ "botIdentity.ai.usingProvider": "Dùng {provider}, theo thiết lập trong Tạo ảnh.",
+ "botIdentity.ai.noProvider": "Chưa thiết lập nhà cung cấp ảnh nào.",
+ "botIdentity.ai.openImageSettings": "Mở cài đặt ảnh",
+ "imageGen.key.xai": "Khóa API Grok (xAI)",
+ "imageGen.key.openrouter": "Khóa API OpenRouter"
}
diff --git a/src/locales/zh-tw.json b/src/locales/zh-tw.json
index 9438c47b31..278e475320 100644
--- a/src/locales/zh-tw.json
+++ b/src/locales/zh-tw.json
@@ -4600,5 +4600,39 @@
"server.browser.stoppedWaiting": "已停止等待瀏覽器。",
"composer.queued.capacityStarter": "排隊中。Starter 每個機器人一次執行一個對話,所以這則會在目前對話結束後開始。更大的方案可以執行更多。",
"composer.queued.seePlans": "查看方案",
- "settings.threads.starter": "Starter 每個機器人一次執行一個對話,更大的方案可以執行更多。機器人自己發起的工作仍會執行,每個機器人各有一個。"
+ "settings.threads.starter": "Starter 每個機器人一次執行一個對話,更大的方案可以執行更多。機器人自己發起的工作仍會執行,每個機器人各有一個。",
+ "settings.section.imageGeneration": "圖像生成",
+ "imageGen.intro": "你在聊天中要求產生圖像時,機器人會用到這裡的設定,機器人頭像也一樣。只有主要供應商無法啟動時才會嘗試備用供應商:沒有金鑰、沒有額度、被限流或無法連線。",
+ "imageGen.status.ready": "已就緒 · 圖像由 {provider} 產生",
+ "imageGen.status.backupOnly": "僅備用已就緒 · 圖像由 {provider} 產生",
+ "imageGen.status.notReady": "尚未設定 · 請為主要供應商或備用供應商新增金鑰",
+ "imageGen.primary.label": "主要供應商",
+ "imageGen.primary.help": "每張圖像都優先使用。",
+ "imageGen.fallback.label": "備用供應商",
+ "imageGen.fallback.help": "僅在主要供應商無法啟動時使用。",
+ "imageGen.fallback.none": "無",
+ "imageGen.slot.needsKey": "需要金鑰:請在下方新增。",
+ "imageGen.slot.needsConnection": "需要基礎 URL 和模型 ID:請在下方新增。",
+ "imageGen.model.label": "{slot}的模型",
+ "imageGen.model.placeholder": "模型 ID",
+ "imageGen.maxPerTurn.label": "每次回覆的圖像數",
+ "imageGen.maxPerTurn.help": "機器人在一次回覆中最多可產生的圖像數。",
+ "imageGen.key.openai": "OpenAI API 金鑰",
+ "imageGen.key.gemini": "Gemini API 金鑰",
+ "imageGen.key.custom": "自訂圖像 API 金鑰",
+ "imageGen.key.paste": "貼上 API 金鑰",
+ "imageGen.key.get": "取得金鑰",
+ "imageGen.key.saved": "金鑰已儲存",
+ "imageGen.key.missing": "還沒有金鑰",
+ "imageGen.key.optional": "金鑰為選填",
+ "imageGen.key.sharedXai": "這與「API 金鑰」中的 Grok (xAI) 金鑰相同,其他 Grok 功能也會使用。Grok 訂閱不包含 API 存取權。",
+ "imageGen.key.sharedOpenrouter": "這與「API 金鑰」中的 OpenRouter 金鑰相同,你的機器人使用的 OpenRouter 模型也會使用。",
+ "imageGen.key.manage": "開啟 API 金鑰",
+ "imageGen.custom.url": "基礎 URL",
+ "imageGen.custom.help": "任何相容 OpenAI 的 Images API。localhost 指執行 {app} 的這台電腦。",
+ "botIdentity.ai.usingProvider": "依「圖像生成」中的設定使用 {provider}。",
+ "botIdentity.ai.noProvider": "尚未設定圖像供應商。",
+ "botIdentity.ai.openImageSettings": "開啟圖像設定",
+ "imageGen.key.xai": "Grok (xAI) API 金鑰",
+ "imageGen.key.openrouter": "OpenRouter API 金鑰"
}
diff --git a/src/locales/zh.json b/src/locales/zh.json
index 27f7877297..304b419543 100644
--- a/src/locales/zh.json
+++ b/src/locales/zh.json
@@ -6714,27 +6714,8 @@
"botIdentity.crop.rounded": "圆角",
"botIdentity.crop.square": "方形",
"botIdentity.ai.generateWith": "用 AI 生成",
- "botIdentity.ai.provider": "图片提供方",
- "botIdentity.ai.openaiHint": "GPT Image 2 · 低质量方形草图。费用计入你的 OpenAI API 账户。",
- "botIdentity.ai.xaiHint": "Grok Imagine · API 计费与你的 Grok 订阅分开计算。",
- "botIdentity.ai.customHint": "连接本地路由或图片提供方。",
- "botIdentity.ai.shared": "这个连接由所有机器人头像共用。",
"botIdentity.ai.generating": "正在生成…",
"botIdentity.ai.generate": "生成头像",
- "botIdentity.ai.baseUrl": "Base URL",
- "botIdentity.ai.imageModel": "图片模型",
- "botIdentity.ai.optional": "可选",
- "botIdentity.ai.savedKey": "已存密钥 · 粘贴可替换",
- "botIdentity.ai.keyless": "留空表示不使用密钥的连接",
- "botIdentity.ai.pasteKey": "粘贴 API 密钥",
- "botIdentity.ai.removeKey": "移除已保存的密钥",
- "botIdentity.ai.saveConnection": "保存连接",
- "botIdentity.ai.saveKey": "保存密钥",
- "botIdentity.ai.connectionSettings": "连接设置",
- "botIdentity.ai.saveBeforeGenerate": "生成前请先保存连接设置。",
- "botIdentity.ai.openaiKey": "OpenAI 图片 API 密钥",
- "botIdentity.ai.xaiKey": "Grok API 密钥",
- "botIdentity.ai.customKey": "自定义图片 API 密钥",
"botIdentity.ai.directionPlaceholder": "可选的方向描述,例如「一个以 {name} 为灵感的沉稳领航员」",
"botIdentity.ai.directionLabel": "头像生成方向",
"botIdentity.soul.label": "长期指示(SOUL.md)",
@@ -7301,5 +7282,39 @@
"server.browser.stoppedWaiting": "已停止等待浏览器。",
"composer.queued.capacityStarter": "排队中。Starter 每个机器人一次运行一个对话,所以这条会在当前对话结束后开始。更大的方案可以运行更多。",
"composer.queued.seePlans": "查看方案",
- "settings.threads.starter": "Starter 每个机器人一次运行一个对话,更大的方案可以运行更多。机器人自己发起的工作仍会运行,每个机器人各有一个。"
+ "settings.threads.starter": "Starter 每个机器人一次运行一个对话,更大的方案可以运行更多。机器人自己发起的工作仍会运行,每个机器人各有一个。",
+ "settings.section.imageGeneration": "图像生成",
+ "imageGen.intro": "你在聊天中要求生成图像时,机器人会用到这里的设置,机器人头像也一样。只有主提供方无法启动时才会尝试备用提供方:没有密钥、没有额度、被限流或无法连接。",
+ "imageGen.status.ready": "已就绪 · 图像由 {provider} 生成",
+ "imageGen.status.backupOnly": "仅备用已就绪 · 图像由 {provider} 生成",
+ "imageGen.status.notReady": "尚未设置 · 请为主提供方或备用提供方添加密钥",
+ "imageGen.primary.label": "主提供方",
+ "imageGen.primary.help": "每张图像都优先使用。",
+ "imageGen.fallback.label": "备用提供方",
+ "imageGen.fallback.help": "仅在主提供方无法启动时使用。",
+ "imageGen.fallback.none": "无",
+ "imageGen.slot.needsKey": "需要密钥:请在下方添加。",
+ "imageGen.slot.needsConnection": "需要基础 URL 和模型 ID:请在下方添加。",
+ "imageGen.model.label": "{slot}的模型",
+ "imageGen.model.placeholder": "模型 ID",
+ "imageGen.maxPerTurn.label": "每次回复的图像数",
+ "imageGen.maxPerTurn.help": "机器人在一次回复中最多可生成的图像数。",
+ "imageGen.key.openai": "OpenAI API 密钥",
+ "imageGen.key.gemini": "Gemini API 密钥",
+ "imageGen.key.custom": "自定义图像 API 密钥",
+ "imageGen.key.paste": "粘贴 API 密钥",
+ "imageGen.key.get": "获取密钥",
+ "imageGen.key.saved": "密钥已保存",
+ "imageGen.key.missing": "还没有密钥",
+ "imageGen.key.optional": "密钥可选",
+ "imageGen.key.sharedXai": "这与“API 密钥”中的 Grok (xAI) 密钥相同,其他 Grok 功能也会使用。Grok 订阅不包含 API 访问权限。",
+ "imageGen.key.sharedOpenrouter": "这与“API 密钥”中的 OpenRouter 密钥相同,你的机器人使用的 OpenRouter 模型也会使用。",
+ "imageGen.key.manage": "打开 API 密钥",
+ "imageGen.custom.url": "基础 URL",
+ "imageGen.custom.help": "任何兼容 OpenAI 的 Images API。localhost 指运行 {app} 的这台电脑。",
+ "botIdentity.ai.usingProvider": "按“图像生成”中的设置使用 {provider}。",
+ "botIdentity.ai.noProvider": "尚未设置图像提供方。",
+ "botIdentity.ai.openImageSettings": "打开图像设置",
+ "imageGen.key.xai": "Grok (xAI) API 密钥",
+ "imageGen.key.openrouter": "OpenRouter API 密钥"
}
diff --git a/src/state/config-status.ts b/src/state/config-status.ts
index b3d56628b0..0c15dcce86 100644
--- a/src/state/config-status.ts
+++ b/src/state/config-status.ts
@@ -1,12 +1,15 @@
// What GET /api/config tells the app about the server and its settings (re-exported by store.tsx).
import type { EffortLevel, LiveSettings } from "../../shared/wire";
+import type { ImageProvider } from "../../shared/image-generation";
import type { OnboardingStatus } from "@/lib/onboarding";
import type { ModelSelection } from "./store";
/** A saved credential: whether it is set and, for admins, its last four characters. The key itself never comes back. */
export interface SavedKey { configured: boolean; last4?: string }
-export type NestedKeyName = "ttsKey" | "fishAudioKey" | "jevApiKey" | "openrouterDeciderKey" | "workersAiToken" | "openaiImageApiKey" | "customImageApiKey" | "openaiLiveKey";
+export type NestedKeyName = "ttsKey" | "fishAudioKey" | "jevApiKey" | "openrouterDeciderKey" | "workersAiToken" | "openaiImageApiKey" | "customImageApiKey" | "openaiLiveKey" | "geminiImageApiKey";
+
+export interface ImageSlotStatus { provider: ImageProvider; model: string; configured: boolean }
/** GET /api/config — configured flags only; secrets are never echoed. */
export interface ConfigStatus {
@@ -106,16 +109,21 @@ export interface ConfigStatus {
live?: LiveSettings;
/** Keys kept inside another setting (voice, decisions, pictures, live calls), by their desktop credential name. */
savedKeys?: Partial<Record<NestedKeyName, SavedKey>>;
- /** Shared write-only credential for on-demand GPT Image avatars. */
imageGen?: {
configured: boolean;
- provider?: "openai" | "xai" | "custom";
+ provider?: ImageProvider;
model?: string;
+ primary?: ImageSlotStatus;
+ fallback?: ImageSlotStatus | null;
+ ready?: boolean;
+ maxPerTurn?: number;
customUrl?: string;
customModel?: string;
openaiConfigured?: boolean;
xaiConfigured?: boolean;
customKeyConfigured?: boolean;
+ geminiConfigured?: boolean;
+ openrouterConfigured?: boolean;
};
/** who's using the app — collected in onboarding, shown in the sidebar */
profile?: { name: string; email: string; aboutMe?: string; avatarUrl?: string };
diff --git a/src/state/store.tsx b/src/state/store.tsx
index c977bf6ff9..77377c32e2 100644
--- a/src/state/store.tsx
+++ b/src/state/store.tsx
@@ -516,7 +516,7 @@ export type AppSettingsSection =
| "appearance"
| "experimental"
| "connections"
- | "decisionModel"
+ | "decisionModel" | "imageGeneration"
| "engines"
| "companion"
| "remote"
diff --git a/src/types/ogb.d.ts b/src/types/ogb.d.ts
index df2fd31d88..fc237dc3ba 100644
--- a/src/types/ogb.d.ts
+++ b/src/types/ogb.d.ts
@@ -415,7 +415,7 @@ const __APP_VERSION__: string;
openAtLogin?: { state(): Promise<{ available: boolean; on: boolean }>; set(on: boolean): Promise<{ available: boolean; on: boolean }> };
/** Save a provider credential through Electron's OS-backed store. */
setCredential?(
- name: "composioApiKey" | "xaiApiKey" | "boxToken" | "opencodeGoApiKey" | "ttsKey" | "fishAudioKey" | "jevApiKey" | "openrouterDeciderKey" | "workersAiToken" | "openaiImageApiKey" | "customImageApiKey" | "openaiLiveKey" | "tregApiKey" | "postizApiKey",
+ name: "composioApiKey" | "xaiApiKey" | "boxToken" | "opencodeGoApiKey" | "ttsKey" | "fishAudioKey" | "jevApiKey" | "openrouterDeciderKey" | "workersAiToken" | "openaiImageApiKey" | "customImageApiKey" | "openaiLiveKey" | "tregApiKey" | "postizApiKey" | "geminiImageApiKey",
value: string,
): Promise<ConfigStatus>;
/** In-app auto-update (packaged app only; dormant in dev). Updates