Skip to content

Commit c343e75

Browse files
authored
fix: use default modal (#862)
1 parent 722f254 commit c343e75

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

  • apps/twig/src/renderer/features/sessions/service
  • packages/agent/src/adapters/claude/session

apps/twig/src/renderer/features/sessions/service/service.ts

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,8 @@ export class SessionService {
136136
}
137137

138138
private async doConnect(params: ConnectParams): Promise<void> {
139-
const { task, repoPath, initialPrompt, executionMode, adapter } = params;
139+
const { task, repoPath, initialPrompt, executionMode, adapter, model } =
140+
params;
140141
const { id: taskId, latest_run: latestRun } = task;
141142
const taskTitle = task.title || task.description || "Task";
142143

@@ -212,6 +213,7 @@ export class SessionService {
212213
initialPrompt,
213214
executionMode,
214215
adapter,
216+
model,
215217
);
216218
}
217219
} catch (error) {
@@ -357,6 +359,7 @@ export class SessionService {
357359
initialPrompt?: ContentBlock[],
358360
executionMode?: ExecutionMode,
359361
adapter?: "claude" | "codex",
362+
model?: string,
360363
): Promise<void> {
361364
if (!auth.client) {
362365
throw new Error("Unable to reach server. Please check your connection.");
@@ -405,8 +408,9 @@ export class SessionService {
405408
execution_type: "local",
406409
});
407410

408-
// Set the user's preferred model if available
409-
const preferredModel = useModelsStore.getState().getEffectiveModel();
411+
// Set the model - use passed model if provided, otherwise use store's effective model
412+
const preferredModel =
413+
model ?? useModelsStore.getState().getEffectiveModel();
410414
if (preferredModel) {
411415
await this.setSessionConfigOptionByCategory(
412416
taskId,

packages/agent/src/adapters/claude/session/models.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ export const DEFAULT_MODEL = "opus";
22

33
const GATEWAY_TO_SDK_MODEL: Record<string, string> = {
44
"claude-opus-4-5": "opus",
5+
"claude-opus-4-6": "opus",
56
"claude-sonnet-4-5": "sonnet",
67
"claude-haiku-4-5": "haiku",
78
};

0 commit comments

Comments
 (0)