feat: add thinking support (#100)

* feat: add thinking support

* feat: improve thinking block render in web and filter thinking content in channels

* fix: migrate
This commit is contained in:
Acbox Liu
2026-02-23 14:41:27 +08:00
committed by GitHub
parent 18535f97f2
commit 17cd077f34
31 changed files with 530 additions and 118 deletions
+6
View File
@@ -12,12 +12,18 @@ export const ClientTypeModel = z.enum([
'openai-responses', 'openai-completions', 'anthropic-messages', 'google-generative-ai',
])
export const ReasoningConfigModel = z.object({
enabled: z.boolean(),
effort: z.enum(['low', 'medium', 'high']),
}).optional()
export const ModelConfigModel = z.object({
modelId: z.string().min(1, 'Model ID is required'),
clientType: ClientTypeModel,
input: z.array(z.enum(['text', 'image', 'audio', 'video', 'file'])),
apiKey: z.string().min(1, 'API key is required'),
baseUrl: z.string(),
reasoning: ReasoningConfigModel,
})
export const AllowedActionModel = z.enum(allActions)