Fix server: remove DEFAULT_OPENCODE_LOCAL_MODEL from agents route
Same issue as the UI fix — merge conflict resolution kept HEAD's reference to the removed constant. OpenCode uses strict model selection with no default. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -37,7 +37,6 @@ import {
|
|||||||
DEFAULT_CODEX_LOCAL_MODEL,
|
DEFAULT_CODEX_LOCAL_MODEL,
|
||||||
} from "@paperclipai/adapter-codex-local";
|
} from "@paperclipai/adapter-codex-local";
|
||||||
import { DEFAULT_CURSOR_LOCAL_MODEL } from "@paperclipai/adapter-cursor-local";
|
import { DEFAULT_CURSOR_LOCAL_MODEL } from "@paperclipai/adapter-cursor-local";
|
||||||
import { DEFAULT_OPENCODE_LOCAL_MODEL } from "@paperclipai/adapter-opencode-local";
|
|
||||||
import { ensureOpenCodeModelConfiguredAndAvailable } from "@paperclipai/adapter-opencode-local/server";
|
import { ensureOpenCodeModelConfiguredAndAvailable } from "@paperclipai/adapter-opencode-local/server";
|
||||||
|
|
||||||
export function agentRoutes(db: Db) {
|
export function agentRoutes(db: Db) {
|
||||||
@@ -196,9 +195,7 @@ export function agentRoutes(db: Db) {
|
|||||||
}
|
}
|
||||||
return next;
|
return next;
|
||||||
}
|
}
|
||||||
if (adapterType === "opencode_local" && !asNonEmptyString(next.model)) {
|
// OpenCode requires explicit model selection — no default
|
||||||
next.model = DEFAULT_OPENCODE_LOCAL_MODEL;
|
|
||||||
}
|
|
||||||
if (adapterType === "cursor" && !asNonEmptyString(next.model)) {
|
if (adapterType === "cursor" && !asNonEmptyString(next.model)) {
|
||||||
next.model = DEFAULT_CURSOR_LOCAL_MODEL;
|
next.model = DEFAULT_CURSOR_LOCAL_MODEL;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user