Expose context window size in model settings

Move the ctx_length control for main and utility model slots above the Advanced disclosure while keeping embeddings excluded. Add a static regression guard so primary context controls stay visible outside Advanced.
This commit is contained in:
Alessandro 2026-06-23 20:07:59 +02:00
parent f051d6580f
commit 3fae1f49e7
2 changed files with 17 additions and 14 deletions

View file

@ -141,6 +141,19 @@
</div>
</template>
<!-- Context window size (main and utility only) -->
<template x-if="modelType !== 'embedding'">
<div class="field">
<div class="field-label">
<div class="field-title">Context window size</div>
<div class="field-description">Maximum number of tokens in the context window. System prompt, chat history, RAG and response all count towards this limit.</div>
</div>
<div class="field-control">
<input type="number" x-model.number="model.ctx_length" />
</div>
</div>
</template>
<!-- Advanced Settings (collapsed by default) -->
<div class="advanced-section" x-data="{ advOpen: false }">
<div class="advanced-toggle" @click="advOpen = !advOpen">
@ -162,19 +175,6 @@
</div>
</div>
<!-- Context length (not for embedding) -->
<template x-if="modelType !== 'embedding'">
<div class="field">
<div class="field-label">
<div class="field-title">Context length</div>
<div class="field-description">Maximum number of tokens in the context window. System prompt, chat history, RAG and response all count towards this limit.</div>
</div>
<div class="field-control">
<input type="number" x-model.number="model.ctx_length" />
</div>
</div>
</template>
<!-- Chat-specific: ctx_history, max_embeds -->
<template x-if="modelType === 'chat'">
<div>