feat: consume server model reasoning capabilities

This commit is contained in:
2026-09-01 14:16:18 +08:00
parent 850947c092
commit ae79361742
20 changed files with 711 additions and 20 deletions

View File

@@ -12,7 +12,7 @@ import {
} from '../route-utils';
import { decodeRouteId, sendCodingRouteError } from './coding-route-errors';
const THINKING_LEVELS = new Set(['off', 'minimal', 'low', 'medium', 'high']);
const THINKING_LEVELS = new Set(['off', 'minimal', 'low', 'medium', 'high', 'max']);
function invalidRequest(message: string): never {
throw new CodingConversationServiceError(400, 'CODING_CONVERSATION_REQUEST_INVALID', message);
@@ -187,7 +187,7 @@ export async function handleCodingConversationRoutes(
sendJson(res, 200, {
model: await service.setThinking(
conversationId,
body.thinkingLevel as 'off' | 'minimal' | 'low' | 'medium' | 'high',
body.thinkingLevel as 'off' | 'minimal' | 'low' | 'medium' | 'high' | 'max',
),
});
return true;