feat: add image model config + tool

This commit is contained in:
Peter Steinberger
2026-01-04 19:35:00 +01:00
parent 0716a624a8
commit 78998dba9e
20 changed files with 856 additions and 144 deletions

View File

@@ -88,7 +88,9 @@ const FIELD_LABELS: Record<string, string> = {
"gateway.reload.debounceMs": "Config Reload Debounce (ms)",
"agent.workspace": "Workspace",
"agent.model": "Default Model",
"agent.imageModel": "Image Model",
"agent.modelFallbacks": "Model Fallbacks",
"agent.imageModelFallbacks": "Image Model Fallbacks",
"ui.seamColor": "Accent Color",
"browser.controlUrl": "Browser Control URL",
"session.agentToAgent.maxPingPongTurns": "Agent-to-Agent Ping-Pong Turns",
@@ -114,6 +116,10 @@ const FIELD_HELP: Record<string, string> = {
"Debounce window (ms) before applying config changes.",
"agent.modelFallbacks":
"Ordered fallback models (provider/model). Used when the primary model fails.",
"agent.imageModel":
"Optional image-capable model (provider/model) used by the image tool.",
"agent.imageModelFallbacks":
"Ordered fallback image models (provider/model) used by the image tool.",
"session.agentToAgent.maxPingPongTurns":
"Max reply-back turns between requester and target (05).",
};

View File

@@ -660,6 +660,8 @@ export type ClawdbotConfig = {
agent?: {
/** Model id (provider/model), e.g. "anthropic/claude-opus-4-5". */
model?: string;
/** Optional image-capable model (provider/model) used by the image tool. */
imageModel?: string;
/** Agent working directory (preferred). Used as the default cwd for agent runs. */
workspace?: string;
/** Optional allowlist for /model (provider/model or model-only). */
@@ -668,6 +670,8 @@ export type ClawdbotConfig = {
modelAliases?: Record<string, string>;
/** Ordered fallback models (provider/model). */
modelFallbacks?: string[];
/** Ordered fallback image models (provider/model) for the image tool. */
imageModelFallbacks?: string[];
/** Optional display-only context window override (used for % in status UIs). */
contextTokens?: number;
/** Default thinking level when no /think directive is present. */

View File

@@ -363,10 +363,12 @@ export const ClawdbotSchema = z.object({
agent: z
.object({
model: z.string().optional(),
imageModel: z.string().optional(),
workspace: z.string().optional(),
allowedModels: z.array(z.string()).optional(),
modelAliases: z.record(z.string(), z.string()).optional(),
modelFallbacks: z.array(z.string()).optional(),
imageModelFallbacks: z.array(z.string()).optional(),
contextTokens: z.number().int().positive().optional(),
thinkingDefault: z
.union([