Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
2 changes: 1 addition & 1 deletion packages/agents/codex/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand Down
12 changes: 12 additions & 0 deletions packages/agents/test/cli-command.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions packages/core/runtime/message-options.ts
Original file line number Diff line number Diff line change
@@ -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";
Expand All @@ -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;

Expand Down
4 changes: 2 additions & 2 deletions packages/ims/shared/settings-domain.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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.`);
}
}
Expand Down
5 changes: 4 additions & 1 deletion packages/ims/slack/commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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;
Expand Down
Loading