room: add a per-room thinking effort
ci / checks (push) Successful in 52s
ci / test (push) Successful in 1m9s
ci / chart (push) Successful in 6s
ci / web (push) Successful in 19s
ci / docker (push) Successful in 2m0s
ci / publish-edge-image (push) Successful in 12s
ci / publish-edge-chart (push) Successful in 4s
ci / checks (push) Successful in 52s
ci / test (push) Successful in 1m9s
ci / chart (push) Successful in 6s
ci / web (push) Successful in 19s
ci / docker (push) Successful in 2m0s
ci / publish-edge-image (push) Successful in 12s
ci / publish-edge-chart (push) Successful in 4s
Every turn sent ThinkingEffort::Default, so a room could not ask for more or less reasoning. The owner now picks default, low, medium, or high in room settings. An existing database gains the column with a default of 'default', which sends no effort parameter and leaves the provider's choice alone.
This commit is contained in:
1 parent
0a3c7b7b45
commit
1289f5f0c2
7 files changed
+118
-6
No files matched your search
@@ -5,6 +5,7 @@ import type {
|
||||
ProviderConfig,
|
||||
ProviderListResponse,
|
||||
Room,
|
||||
ThinkingEffort,
|
||||
UpdateRoomBody,
|
||||
UpdateRoomResponse,
|
||||
} from '~/types'
|
||||
@@ -24,6 +25,7 @@ const providersError = ref('')
|
||||
const name = ref(props.room.name)
|
||||
const providerId = ref(props.room.provider_config_id ?? '')
|
||||
const model = ref(props.room.model ?? '')
|
||||
const thinkingEffort = ref<ThinkingEffort>(props.room.thinking_effort)
|
||||
const maxSteps = ref<number | string>(props.room.max_turn_steps)
|
||||
const pickerOpen = ref(false)
|
||||
|
||||
@@ -69,6 +71,7 @@ async function save() {
|
||||
error.value = ''
|
||||
const body: UpdateRoomBody = {
|
||||
name: name.value.trim(),
|
||||
thinking_effort: thinkingEffort.value,
|
||||
max_turn_steps: Math.min(500, Math.max(1, Math.round(Number(maxSteps.value) || 1))),
|
||||
}
|
||||
if (providerId.value) body.provider_config_id = providerId.value
|
||||
@@ -149,6 +152,19 @@ async function archive() {
|
||||
<span class="hint">{{ effectiveModel ? 'The room uses this model for every turn.' : 'Pick a model before saving the room.' }}</span>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="field-label" for="room-settings-thinking">Thinking effort</label>
|
||||
<select id="room-settings-thinking" v-model="thinkingEffort" class="select">
|
||||
<option value="default">Provider default</option>
|
||||
<option value="low">Low</option>
|
||||
<option value="medium">Medium</option>
|
||||
<option value="high">High</option>
|
||||
</select>
|
||||
<span class="hint">
|
||||
How much reasoning the model does on each turn. Provider default sends no effort parameter.
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="field">
|
||||
<label class="field-label" for="room-settings-steps">Max turn steps</label>
|
||||
<input id="room-settings-steps" v-model.number="maxSteps" class="input" type="number" min="1" max="500" required>
|
||||
|
||||
@@ -62,6 +62,8 @@ export interface RoomListResponse {
|
||||
rooms: RoomSummary[]
|
||||
}
|
||||
|
||||
export type ThinkingEffort = 'default' | 'low' | 'medium' | 'high'
|
||||
|
||||
export interface Room {
|
||||
id: string
|
||||
name: string
|
||||
@@ -71,6 +73,7 @@ export interface Room {
|
||||
workspace: string
|
||||
repo_url: string | null
|
||||
model: string | null
|
||||
thinking_effort: ThinkingEffort
|
||||
model_vision: boolean | null
|
||||
max_turn_steps: number
|
||||
created_at: number
|
||||
@@ -123,6 +126,7 @@ export interface UpdateRoomBody {
|
||||
provider_config_id?: string
|
||||
model?: string
|
||||
max_turn_steps?: number
|
||||
thinking_effort?: ThinkingEffort
|
||||
}
|
||||
|
||||
export interface UpdateRoomResponse {
|
||||
|
||||
Reference in new issue
Block a user