mirror of
https://github.com/aljazceru/opencode.git
synced 2025-12-21 01:34:22 +01:00
wip: zen
This commit is contained in:
@@ -11,7 +11,7 @@ const getModelsInfo = query(async (workspaceID: string) => {
|
||||
return withActor(async () => {
|
||||
return {
|
||||
all: Object.keys(ZenModel.list())
|
||||
.filter((model) => !["claude-3-5-haiku", "glm-4.6", "qwen3-max"].includes(model))
|
||||
.filter((model) => !["claude-3-5-haiku", "qwen3-max"].includes(model))
|
||||
.sort(([a], [b]) => a.localeCompare(b)),
|
||||
disabled: await Model.listDisabled(),
|
||||
}
|
||||
@@ -66,7 +66,7 @@ export function ModelSection() {
|
||||
const isEnabled = createMemo(() => !modelsInfo()!.disabled.includes(modelId))
|
||||
return (
|
||||
<tr data-slot="model-row" data-disabled={!isEnabled()}>
|
||||
<td data-slot="model-name">{modelId}</td>
|
||||
<td data-slot="model-name">{ZenModel.list()[modelId].name}</td>
|
||||
<td data-slot="model-toggle">
|
||||
<form action={updateModel} method="post">
|
||||
<input type="hidden" name="model" value={modelId} />
|
||||
|
||||
@@ -17,6 +17,7 @@ export namespace ZenModel {
|
||||
})
|
||||
|
||||
export const ModelSchema = z.object({
|
||||
name: z.string(),
|
||||
cost: ModelCostSchema,
|
||||
cost200K: ModelCostSchema.optional(),
|
||||
allowAnonymous: z.boolean().optional(),
|
||||
|
||||
Reference in New Issue
Block a user