diff --git a/package.json b/package.json index 8dcbeb7..d906cb6 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "ode", - "version": "0.1.19", + "version": "0.1.20", "description": "Coding anywhere with your coding agents connected", "module": "packages/core/index.ts", "type": "module", diff --git a/packages/agents/codex/client.ts b/packages/agents/codex/client.ts index bccfd75..2dd033f 100644 --- a/packages/agents/codex/client.ts +++ b/packages/agents/codex/client.ts @@ -40,7 +40,7 @@ type CodexJsonEvent = { function getCodexModel(options?: OpenCodeOptions): string | undefined { const configured = options?.model?.modelID?.trim(); if (configured) return configured; - return DEFAULT_CODEX_MODEL; + return undefined; } type CodexModelCatalog = { diff --git a/packages/agents/test/cli-command.test.ts b/packages/agents/test/cli-command.test.ts index 309b68a..cd5f32b 100644 --- a/packages/agents/test/cli-command.test.ts +++ b/packages/agents/test/cli-command.test.ts @@ -139,6 +139,18 @@ describe("agent cli command formatting", () => { expect(command).toContain("'plan this change'"); }); + it("omits the Codex model flag when no model is configured", () => { + const args = buildCodexCommandArgs({ + sessionId: "session-3", + prompt: "hello from codex", + }); + const command = buildCodexCommand(args); + + expect(command).not.toContain("--model"); + expect(command).toContain("session-3"); + expect(command).toContain("'hello from codex'"); + }); + it("builds the Kimi print command", () => { const args = buildKimiCommandArgs({ sessionId: "session-4", diff --git a/packages/core/runtime/message-options.ts b/packages/core/runtime/message-options.ts index ada0f87..8143460 100644 --- a/packages/core/runtime/message-options.ts +++ b/packages/core/runtime/message-options.ts @@ -1,4 +1,4 @@ -import { DEFAULT_CODEX_MODEL, getChannelModel } from "@/config"; +import { getChannelModel } from "@/config"; import type { OpenCodeOptions } from "@/agents"; type ProviderId = "opencode" | "claudecode" | "codex" | "kimi" | "kiro" | "kilo" | "qwen" | "goose" | "gemini"; @@ -24,7 +24,7 @@ export function buildMessageOptions(params: { const channelModel = getChannelModel(channelId)?.trim(); const codexModel = providerId === "codex" - ? (channelModel && channelModel.length > 0 ? channelModel : DEFAULT_CODEX_MODEL) + ? (channelModel && channelModel.length > 0 ? channelModel : undefined) : undefined; const kiloModel = providerId === "kilo" ? toKiloModel(channelModel) : undefined; diff --git a/packages/ims/shared/settings-domain.ts b/packages/ims/shared/settings-domain.ts index a898f3e..7222667 100644 --- a/packages/ims/shared/settings-domain.ts +++ b/packages/ims/shared/settings-domain.ts @@ -66,9 +66,9 @@ export function describeChannelSettingsIssues(channelId: string): string[] { ? lists.codex : lists.kilo; const modelSet = new Set(models.map(normalizeModel)); - if (!model) { + if (!model && provider !== "codex") { issues.push("Model not configured."); - } else if (!modelSet.has(normalizeModel(model))) { + } else if (model && !modelSet.has(normalizeModel(model))) { issues.push(`Model not available in configured ${getAgentProviderLabel(provider)} models.`); } } diff --git a/packages/ims/slack/commands.ts b/packages/ims/slack/commands.ts index 42405c2..249c6f4 100644 --- a/packages/ims/slack/commands.ts +++ b/packages/ims/slack/commands.ts @@ -291,7 +291,6 @@ function buildSettingsModal(params: { blocks.push({ type: "input" as const, block_id: WORKING_DIR_BLOCK, - optional: true, label: { type: "plain_text" as const, text: "Working Directory" }, element: { type: "plain_text_input" as const, @@ -700,6 +699,10 @@ export function setupInteractiveHandlers(): void { } } + if (!workingDirectory.trim()) { + errors[WORKING_DIR_BLOCK] = "Enter a working directory."; + } + if (Object.keys(errors).length > 0) { await ack({ response_action: "errors", errors }); return;