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
5 changes: 2 additions & 3 deletions src/cli/debug/agentSessionCli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import {
type SendMessageOptions,
type WorkspaceChatMessage,
} from "@/common/types/ipc";
import { getDefaultModel } from "@/common/utils/model/defaults";
import { defaultModel } from "@/common/utils/ai/models";
import { ensureProvidersConfig } from "@/common/utils/providers/ensureProvidersConfig";
import { modeToToolPolicy, PLAN_MODE_INSTRUCTION } from "@/common/utils/ui/modeUtils";
import {
Expand Down Expand Up @@ -183,8 +183,7 @@ async function main(): Promise<void> {
throw new Error("Message must be provided via --message or stdin");
}

const model =
values.model && values.model.trim().length > 0 ? values.model.trim() : getDefaultModel();
const model = values.model && values.model.trim().length > 0 ? values.model.trim() : defaultModel;
const timeoutMs = parseTimeout(values.timeout);
const thinkingLevel = parseThinkingLevel(values["thinking-level"]);
const initialMode = parseMode(values.mode);
Expand Down
4 changes: 2 additions & 2 deletions src/cli/debug/costs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as path from "path";
import { defaultConfig } from "@/node/config";
import type { MuxMessage } from "@/common/types/message";
import { calculateTokenStats } from "@/common/utils/tokens/tokenStatsCalculator";
import { getDefaultModel } from "@/common/utils/model/defaults";
import { defaultModel } from "@/common/utils/ai/models";

/**
* Debug command to display cost/token statistics for a workspace
Expand Down Expand Up @@ -35,7 +35,7 @@ export async function costsCommand(workspaceId: string) {

// Detect model from first assistant message
const firstAssistantMessage = messages.find((msg) => msg.role === "assistant");
const model = firstAssistantMessage?.metadata?.model ?? getDefaultModel();
const model = firstAssistantMessage?.metadata?.model ?? defaultModel;

// Calculate stats using shared logic (now synchronous)
const stats = await calculateTokenStats(messages, model);
Expand Down
4 changes: 2 additions & 2 deletions src/cli/debug/send-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as path from "path";
import { defaultConfig } from "@/node/config";
import type { MuxMessage } from "@/common/types/message";
import type { SendMessageOptions } from "@/common/types/ipc";
import { getDefaultModel } from "@/common/utils/model/defaults";
import { defaultModel } from "@/common/utils/ai/models";
import { getMuxSessionsDir } from "@/common/constants/paths";

/**
Expand Down Expand Up @@ -104,7 +104,7 @@ export function sendMessageCommand(

// Prepare options
const options: SendMessageOptions = {
model: getDefaultModel(),
model: defaultModel,
};

if (editMessageId) {
Expand Down
13 changes: 0 additions & 13 deletions src/common/utils/model/defaults.ts

This file was deleted.